MDT Boot Image Creation
I just upgraded my SCCM 2012 RTM to SP1 and then to R2
I uninstalled the WAIK and installed 8.1 ADK
MDT 2012 Update 1
Now I am trying to add new MDT Boot images and I get this error
Started processing.
Creating boot image.
Copying WIM file.
Error while importing Microsoft Deployment Toolkit Task Sequence.
System.Exception: Unhandled exception occurred:
System.IO.FileNotFoundException: Could not find file '\winpe.wim'.
File name: '\winpe.wim'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.get_Length()
at Microsoft.BDD.Core.DEInfo..ctor(FileInfo theFile)
at Microsoft.BDD.Core.DirectoryUtility.BeginCopyFile(String theSourceFile, String theDestFile)
at Microsoft.BDD.ElevatedProxy.NewBootImage.Create(String platform, String scratchSpace, String[] components, String[] extraContent, String wimFile)
Jacob
You need to remove the old MDT integration components and then reintegrate MDT with the new R2 installation of Configuration Manager by running the Configure ConfigMgr Integration utility from the start menu (inside the Microsoft Deployment Toolkit folder)
, if your on Server 2012 make sure you run the utility as an administrator (elevated) otherwise it will fail.
If you haven't already done so you will also need to update MDT to 2013 as 2012 Update 1 isn't supported in R2.
Its also a good idea to create new MDT Integrated Task Sequences and copy over any custom actions from your old ones to the new ones.
Cheers
Damon
Similar Messages
-
MDT Boot Image Creation Error: The server did provide a meaningful reply
I'm creating an mdt boot image in SCCM 2012 SP1. When I first configured MDT integration everything worked fine (version 6.1.2373). Then after creating 2 boot images, I went to create a 3rd, that's when I started having problems. The wizard starts, copies
the wim file, adds the standard components, then goes to add the winpe-dismcmdlets. After a few minutes this error comes up.
However, I went to check the pemanager.log file in the appdata\local\microsoft\temp\1\pemanager.3392 folder and it was adding the .net 4 components (after the error had already come up). I also opened up the dism.log file. The .net install completed without
error and then the winpe-dismcmdlets install started and finished without error. All this was after the error occured, so the process kept running after the error. This continues to happen after a reboot of the site server.
Log from pemanager.log:
Deployment Image Servicing and Management tool
Version: 6.2.9200.16384
Image Version: 6.2.9200.16384
Processing 1 of 1 - Adding package WinPE-DismCmdlets-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384
The operation completed successfully.
Exit code = 0
Log snippet from dism.log
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 DismApi.dll: Version 6.2.9200.16384 - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 DismApi.dll: Parent process command line: C:\Windows\system32\wbem\wmiprvse.exe - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Enter DismInitializeInternal - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Input parameters: LogLevel: 2, LogFilePath: (null), ScratchDirectory: (null) - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Initialized GlobalConfig - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Initialized SessionTable - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Waiting for m_pInternalThread to start - CCommandThread::Start
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3288 Enter CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 CommandThread StartupEvent signaled - CCommandThread::WaitForStartup
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 m_pInternalThread started - CCommandThread::Start
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Created g_internalDismSession - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3996 Leave DismInitializeInternal - DismInitializeInternal
2013-04-29 20:19:33, Info DISM API: PID=1296 TID=3288 Enter CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=5096 Enter DismShutdownInternal - DismShutdownInternal
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=5096 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=5096 Refcount for DismSession= 1s 0 - CSessionTable::RemoveSession
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=5096 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=3288 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=3288 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=3288 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2013-04-29 20:20:10, Info DISM API: PID=1296 TID=3288 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-04-29 20:20:10, Info DISM PID=1296 TID=3288 Temporarily setting the scratch directory. This may be overridden by user later. - CDISMManager::FinalConstruct
2013-04-29 20:20:10, Info DISM PID=1296 TID=3288 Scratch directory set to 'C:\Windows\TEMP\'. - CDISMManager::put_ScratchDir
2013-04-29 20:20:10, Info DISM PID=1296 TID=3288 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=3288 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 Deleted g_internalDismSession - DismShutdownInternal
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 Shutdown SessionTable - DismShutdownInternal
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 Leave DismShutdownInternal - DismShutdownInternal
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 DismApi.dll:
- DismShutdownInternal
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2013-04-29 20:20:12, Info DISM API: PID=1296 TID=5096 DismApi.dll:
- DismShutdownInternal
I tried removing the mdt integration, uninstalling mdt, reboot, install mdt, configure mdt integration. Error occurs whenever an additional component tries to install .net4 or if it installs directly. This is on an almost brand new install
of the sccm site server on sever 2012. Any ideas?For me disabling the anti virus software (TrendMicro OfficeScan) solved the problem.
-
MDT 2012 Update 1 Boot Image Creation Fails in SP1
I have my site server (SCCM 2012 SP1) installed on Server 2012 with the Windows 8 ADK installed (I've also tried installing the Win7 WAIK with no change to the below problem). It is hosting the site server, FSP, AIS, and Endpoint protection roles. I
installed MDT 2012 Update 1 (build 6.1.2373.0) and installed ConfigMgr integration. I have a share
\\siteserver\bootimages that I'm creating the boot image to and the system account has full control on both the NTFS and Share permissions. When I create the boot image I get an error almost immediately and
a popup that the Microsoft.BDD.ElevatedProxy has stopped working. Details from the pop-up:
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: microsoft.bdd.elevatedproxy.exe
Problem Signature 02: 3.0.0.0
Problem Signature 03: 50400c36
Problem Signature 04: System.ServiceModel
Problem Signature 05: 3.0.0.0
Problem Signature 06: 4fee6b19
Problem Signature 07: fb9
Problem Signature 08: a7
Problem Signature 09: G3DT0URDW53KGT4VJDEEQCRAUIFCNTLL
OS Version: 6.2.9200.2.0.0.272.7
Locale ID: 1033
The error in the boot image creation wizard is:
Started processing.
Creating boot image.
Error while importing Microsoft Deployment Toolkit Task Sequence.
System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug>
configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at INewBootImage.Create(String platform, String scratchSpace, String[] components, String[] extraContent, String wimFile)
at NewBootImageClient.Create(String platform, String scratchSpace, String[] components, String[] extraContent, String wimFile)
at Microsoft.BDD.Wizards.SCCM_ImportTaskSequenceTask.DoWork(SmsPageData smspageData, Dictionary`2 data)
I haven't found anything online on this particular error, I've seen all the ones about MDT 2012 and ConfigMgr 2012 CU 1. Any ideas? Any logs that may be revealing to the cause of this error? I've tried removing integration components, uninstalling MDT, reboot,
re-installing, etc, but same problem occurs each time.I just tried to create a new boot image again, the DISM.log file does not show any evidence of the attempt to create the boot wim, in fact nothing since 0800 this morning. The most recent logs are as follows:
2013-03-03 20:22:59, Info DISM PID=2252 TID=4312 Scratch directory set to 'C:\Windows\TEMP\'. - CDISMManager::put_ScratchDir
2013-03-03 20:22:59, Info DISM PID=2252 TID=4312 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=4312 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 Deleted g_internalDismSession - DismShutdownInternal
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 Shutdown SessionTable - DismShutdownInternal
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 Leave DismShutdownInternal - DismShutdownInternal
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 DismApi.dll:
- DismShutdownInternal
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2013-03-03 20:22:59, Info DISM API: PID=2252 TID=3088 DismApi.dll:
- DismShutdownInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 DismApi.dll:
- DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 DismApi.dll: <----- Starting DismApi.dll session -----> - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 DismApi.dll:
- DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 DismApi.dll: Version 6.2.9200.16384 - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 DismApi.dll: Parent process command line: C:\Windows\system32\wbem\wmiprvse.exe - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 Enter DismInitializeInternal - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 Input parameters: LogLevel: 2, LogFilePath: (null), ScratchDirectory: (null) - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 Initialized GlobalConfig - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 Initialized SessionTable - DismInitializeInternal
2013-03-03 22:02:50, Info DISM API: PID=3544 TID=3672 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath
2013-03-03 22:02:51, Info DISM API: PID=3544 TID=3672 Waiting for m_pInternalThread to start - CCommandThread::Start
2013-03-03 22:02:51, Info DISM API: PID=3544 TID=4172 Enter CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-03 22:02:58, Info DISM API: PID=3544 TID=4172 Enter CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-03 22:02:58, Info DISM API: PID=3544 TID=3672 CommandThread StartupEvent signaled - CCommandThread::WaitForStartup
2013-03-03 22:02:58, Info DISM API: PID=3544 TID=3672 m_pInternalThread started - CCommandThread::Start
2013-03-03 22:02:58, Info DISM API: PID=3544 TID=3672 Created g_internalDismSession - DismInitializeInternal
2013-03-03 22:02:58, Info DISM API: PID=3544 TID=3672 Leave DismInitializeInternal - DismInitializeInternal
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=3672 Enter DismShutdownInternal - DismShutdownInternal
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=3672 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=3672 Refcount for DismSession= 1s 0 - CSessionTable::RemoveSession
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=3672 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=4172 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2013-03-03 22:03:57, Info DISM API: PID=3544 TID=4172 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2013-03-03 22:03:59, Info DISM API: PID=3544 TID=4172 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2013-03-03 22:03:59, Info DISM API: PID=3544 TID=4172 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-03 22:04:39, Info DISM PID=3544 TID=4172 Temporarily setting the scratch directory. This may be overridden by user later. - CDISMManager::FinalConstruct
2013-03-03 22:04:39, Info DISM PID=3544 TID=4172 Scratch directory set to 'C:\Windows\TEMP\'. - CDISMManager::put_ScratchDir
2013-03-03 22:04:39, Info DISM PID=3544 TID=4172 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=4172 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 Deleted g_internalDismSession - DismShutdownInternal
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 Shutdown SessionTable - DismShutdownInternal
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 Leave DismShutdownInternal - DismShutdownInternal
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 DismApi.dll:
- DismShutdownInternal
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2013-03-03 22:04:39, Info DISM API: PID=3544 TID=3672 DismApi.dll:
- DismShutdownInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 DismApi.dll:
- DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 DismApi.dll: <----- Starting DismApi.dll session -----> - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 DismApi.dll:
- DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 DismApi.dll: Version 6.2.9200.16384 - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 DismApi.dll: Parent process command line: C:\Windows\system32\wbem\wmiprvse.exe - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 Enter DismInitializeInternal - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 Input parameters: LogLevel: 2, LogFilePath: (null), ScratchDirectory: (null) - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 Initialized GlobalConfig - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 Initialized SessionTable - DismInitializeInternal
2013-03-04 08:41:07, Info DISM API: PID=1016 TID=1620 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath
2013-03-04 08:41:08, Info DISM API: PID=1016 TID=1620 Waiting for m_pInternalThread to start - CCommandThread::Start
2013-03-04 08:41:08, Info DISM API: PID=1016 TID=4176 Enter CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-04 08:41:09, Info DISM API: PID=1016 TID=4176 Enter CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-04 08:41:09, Info DISM API: PID=1016 TID=1620 CommandThread StartupEvent signaled - CCommandThread::WaitForStartup
2013-03-04 08:41:09, Info DISM API: PID=1016 TID=1620 m_pInternalThread started - CCommandThread::Start
2013-03-04 08:41:09, Info DISM API: PID=1016 TID=1620 Created g_internalDismSession - DismInitializeInternal
2013-03-04 08:41:09, Info DISM API: PID=1016 TID=1620 Leave DismInitializeInternal - DismInitializeInternal
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=1620 Enter DismShutdownInternal - DismShutdownInternal
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=1620 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=1620 Refcount for DismSession= 1s 0 - CSessionTable::RemoveSession
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=1620 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=4176 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=4176 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=4176 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2013-03-04 08:42:25, Info DISM API: PID=1016 TID=4176 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-04 08:42:44, Info DISM PID=1016 TID=4176 Temporarily setting the scratch directory. This may be overridden by user later. - CDISMManager::FinalConstruct
2013-03-04 08:42:44, Info DISM PID=1016 TID=4176 Scratch directory set to 'C:\Windows\TEMP\'. - CDISMManager::put_ScratchDir
2013-03-04 08:42:44, Info DISM PID=1016 TID=4176 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=4176 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 Deleted g_internalDismSession - DismShutdownInternal
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 Shutdown SessionTable - DismShutdownInternal
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 Leave DismShutdownInternal - DismShutdownInternal
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 DismApi.dll:
- DismShutdownInternal
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2013-03-04 08:42:44, Info DISM API: PID=1016 TID=1620 DismApi.dll:
- DismShutdownInternal
2013-03-05 08:44:10, Info DISM API: PID=4140 TID=3140 DismApi.dll:
- DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 DismApi.dll: <----- Starting DismApi.dll session -----> - DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 DismApi.dll:
- DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 DismApi.dll: Version 6.2.9200.16384 - DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 DismApi.dll: Parent process command line: C:\Windows\system32\wbem\wmiprvse.exe - DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 Enter DismInitializeInternal - DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 Input parameters: LogLevel: 2, LogFilePath: (null), ScratchDirectory: (null) - DismInitializeInternal
2013-03-05 08:44:12, Info DISM API: PID=4140 TID=3140 Initialized GlobalConfig - DismInitializeInternal
2013-03-05 08:44:13, Info DISM API: PID=4140 TID=3140 Initialized SessionTable - DismInitializeInternal
2013-03-05 08:44:13, Info DISM API: PID=4140 TID=3140 Lookup in table by path failed for: DummyPath-2BA51B78-C7F7-4910-B99D-BB7345357CDC - CTransactionalImageTable::LookupImagePath
2013-03-05 08:44:14, Info DISM API: PID=4140 TID=3140 Waiting for m_pInternalThread to start - CCommandThread::Start
2013-03-05 08:44:14, Info DISM API: PID=4140 TID=640 Enter CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-05 08:44:32, Info DISM API: PID=4140 TID=3140 CommandThread StartupEvent signaled - CCommandThread::WaitForStartup
2013-03-05 08:44:32, Info DISM API: PID=4140 TID=3140 m_pInternalThread started - CCommandThread::Start
2013-03-05 08:44:32, Info DISM API: PID=4140 TID=3140 Created g_internalDismSession - DismInitializeInternal
2013-03-05 08:44:32, Info DISM API: PID=4140 TID=3140 Leave DismInitializeInternal - DismInitializeInternal
2013-03-05 08:44:32, Info DISM API: PID=4140 TID=640 Enter CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=1320 Enter DismShutdownInternal - DismShutdownInternal
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=1320 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=1320 Refcount for DismSession= 1s 0 - CSessionTable::RemoveSession
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=1320 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=640 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=640 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=640 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2013-03-05 08:45:56, Info DISM API: PID=4140 TID=640 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2013-03-05 08:46:18, Info DISM PID=4140 TID=640 Temporarily setting the scratch directory. This may be overridden by user later. - CDISMManager::FinalConstruct
2013-03-05 08:46:18, Info DISM PID=4140 TID=640 Scratch directory set to 'C:\Windows\TEMP\'. - CDISMManager::put_ScratchDir
2013-03-05 08:46:18, Info DISM PID=4140 TID=640 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=640 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 Deleted g_internalDismSession - DismShutdownInternal
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 Shutdown SessionTable - DismShutdownInternal
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 Leave DismShutdownInternal - DismShutdownInternal
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 DismApi.dll:
- DismShutdownInternal
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2013-03-05 08:46:18, Info DISM API: PID=4140 TID=1320 DismApi.dll: -
Using MDT boot image in SCCM 2012
Hi,
I want to import MDT boot image in SCCM 2012. Please let me know if this is possible.
I have integrated all the driver in it and want to use from SCCM.
Any suggestion on this?
Regards, Shishir Kushawaha "If this thread answered your question, please click on "Mark as Answer"These two blogs explain this process very very well.
http://myitforum.com/myitforumwp/2013/08/01/how-to-create-configmgr-2012-boot-images-from-scratch/
http://www.niallbrady.com/2013/10/09/how-can-i-manually-add-winpe-5-boot-images-to-system-center-2012-configuration-manager-sp1-cu3/
Gerry Hampson | Blog:
www.gerryhampsoncm.blogspot.ie | LinkedIn:
Gerry Hampson | Twitter:
@gerryhampson -
MDT boot image and when we try to PXE boot it won't get the IP Address.
We created a custom MDT boot image and when we try to PXE boot it won't get the IP Address.
I press F8 and type IPCONFIG we get Windows IP Configuration. We are using vmxnet3 network adapter.
I think I need to inject 32-bit vmxnet3 driver to the custom MDT boot image which is 32-bit.
We are using it to deploy Windows Server 2008 R2 with SP1 operating System.
Can I just use the 32-bit custom MDT boot image or do I need to use 64-bit Custom MDT Boot Image?
Also Is there a blog on how to inject vmxnet3 driver to boot image?You can try this:
http://mwesterink.wordpress.com/2013/12/03/configmgr-2012-obtaining-vmxnet3-nic-drivers-for-vmware-virtual-machines/
Honestly, your best bet is to use a different adapter (E1000). I personally have had no luck getting the vmxnet3 driver to work properly in WinPE. It's either really, really slow or it simply doesn't load at all. -
I'm trying to create MDT boot images using MDT 2012 U1 on CM 2012 R2 but I keep getting this error message as desribed by this entry on
James Bannan's blog
The suggested fix/workaround is to launch the CM console as administrator. I've tried that with no success and wondered if anyone else has seen this and perhaps knows what the problem is? Any help would be appreciated. Merry Christmas!Thanks, is 2013 required or recommended? The guys running the server re-installed WAIK and the process completed successfully.
-
Failed to Create MDT Boot Image in SCCM 2007
Hello Everyone,
I am trying to create MDT Integrated Boot Image in SCCM to Enable DART Integration on it. But when i try to Create Boot Image it Fails with below Error Message.
Started processing.
Creating boot image.
Copying WIM file.
Mounting WIM file.
WIM file mounted.
Setting Windows PE system root.
Set Windows PE system root.
Set Windows PE scratch space.
Adding standard components.
Adding extra content from: C:\Users\ADMINI~1\AppData\Local\Temp\1\i5wqsynb.efm
Unmounting WIM.
Copying WIM to the package source directory.
Creating boot image package.
Error while importing Microsoft Deployment Toolkit Task Sequence.
Failed to insert OSD binaries into the WIM file
Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException: The ConfigMgr Provider reported an error.
---> System.Management.ManagementException: Generic failure
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.Put(PutOptions options)
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
--- End of inner exception stack trace ---
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
I have searched over Internet for the same Error and I guess it was a Permission Issue. But my Environment is as below.
AD & SCCM Server on Same Machine
Folder have Full Permissions to SYSTEM, SCCMComputerAccount, DomainAdministrators, and Even I gave to Everyone Full
Control.
This is a LAB Environment with No Antivirus, No UAC
ANY HELP ON THIS Folks..... (:-()
RamHi Ychinnari,
As your question is related to SCCM report. it is not supported here.
you could post it in SCCM forum for better supports, Thanks for your understanding.
SCCM forum link:
https://social.technet.microsoft.com/Forums/systemcenter/en-US/home?category=configurationmanager
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Automatically start DaRT in Boot Image
I have ConfigMgr 2012 SP1 R2 deployed with MDT 2013. I created an MDT boot image and chose DaRT from the checklist and created the new boot image. Once PXE booting into WinPE I can press F8 and execute Windows\System32\RemoteRecovery.exe.
I would like to have RemoteRecovery.exe execute automatically when WinPE starts. I have found some older blogs but nothing for ConfigMgr 2012 R2/MDT 2013/DaRT 8.1. Can someone please recommend the best approach?
ThanksI have ConfigMgr 2012 SP1 R2 deployed with MDT 2013. I created an MDT boot image and chose DaRT from the checklist and created the new boot image. Once PXE booting into WinPE I can press F8 and execute Windows\System32\RemoteRecovery.exe.
I would like to have RemoteRecovery.exe execute automatically when WinPE starts. I have found some older blogs but nothing for ConfigMgr 2012 R2/MDT 2013/DaRT 8.1. Can someone please recommend the best approach?
Thanks
I roughly followed the older instructions from the following URL and it's working as expected:
http://www.deploymentresearch.com/Research/tabid/62/EntryId/36/Software-Assurance-Pays-Off-Remote-Connection-to-WinPE-during-MDT-SCCM-deployments.aspx -
Issues with Boot Images & PXE Booting Since SP1 Install
Good Afternoon All -
I recently updated to SP1, had some issues, but they got resolved. Now, though, I'm having an issue booting to PXE as well as updating any boot images created
before SP1 was installed. Booting to USB Bootable media using a newly created boot image seems to work fine.
Boot Images
When I update my DPs for any of my boot images in SCCM, they fail and i get the below error:
Error: The wizard detected the following problems when updating the boot image.
• Failed to install required components into the boot image
The SMS Provider reported an error.: ConfigMgr Error Object:
instance of SMS_ExtendedStatus
• Description = "Failed to insert OSD binaries into the WIM file";
• ErrorCode = 2152205056;
• File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspbootimagepackage.cpp";
• Line = 4566;
• ObjectInfo = "CSspBootImagePackage::PreRefreshPkgSrcHook";
• Operation = "ExecMethod";
• ParameterInfo = "SMS_BootImagePackage.PackageID=\"BBS0012F\"";
• ProviderName = "WinMgmt";
• StatusCode = 2147749889;
I've even gone as far as removing all drivers from the boot image, but still get the same message. I was able to create a couple of
new MDT boot images which seem to work fine, though. I am not sure which log file is for boot images, but nothing appeared in distmgr.log.
PXE Booting Issue
After trying many things, I removed PXE config from my site and uninstalled WDS then started all over again. Here's what I did and my results. Please tell me what I'm missing...
After uninstall & server reboot, I enabled PXE + every option in DP tab in SCCM
It automatically installed WDS (same server) and added the two boot images I had checked for PXE use. one x64 and one x86.
I checked my DHCP Scope whose values hadn't changed sine it worked (that I know of). They are:
Option #66: 192.168.20.37 (SCCM Server/DP/PXE)
Option #67 \boot\x86\wdsnbp.com. I've tried \boot\x86\pxeboot.com as well as each of these with x64.
When I PXE boot from a workstation, I receive an IP, a bit of info, then it goes to Contacting Server.... When trying one of the boot files above, I was prompted for F12, but receved a blue screen with error. When trying all other boot files,
they just hang at Contacting Server until they timeout.
I looked at SMSPXE.log and found something interesting...
The IDs for the two boot images I have assigned to PXE are ABC003B3 & ABC00B36. In the smspxe.log, though, it keeps repeating "could not find boot image ABC0012F! 12F does exist and is a boot image,
but not the one I want to use by any means and does not have PXE checked.
I went ahead and checked 12F, updated DPs (which failed - see above); unchecked it; then updated the DPs again. PXEBoot.log showed that it was trying to remove the 12F files from RemoteInstall which was a good sign. I then restarted the WDS service
and tried PXE booting again. Yet again, it failed and was still looking for 12F.
Any suggestions / Ideas??? Thanks!
UPDATE 1
I just changed option #67 to \smsboot\x86\pxeboot.com then restarted the WDS service. I booted to PXE and this time was asked to hit F12. I did so and it looked as if it would work.
Instead, I got a blue screen with the following error:
Recovery
Your PC needs to be repaired
The boot configuration disk contains errors or is missing
file: boot\BCD
Error Code: 0x000000f
I think that it's the same error as before, but is blue instead of black due to new Win8ADK perhaps. Thanks
Ben K.Update 4
Sorry to make this the longest post ever :)
I just read that others with this error checked DISM.log. I did so when running a DP update for the boot image and got the below errors:
2013-01-11 16:27:04, Info DISM DISM Provider Store: PID=1636 TID=5104 Failed to get and initialize the PE Provider. Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2013-01-11 16:27:07, Info CBS Failed to find a matching version for servicing stack: C:\Windows\TEMP\BootImages\{DADCFE01-3557-4058-99CC-2A15EDF905AF}\mount\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7600.16385_none_655452efe0fb810b\
[HRESULT = 0x80070490 - ERROR_NOT_FOUND]
2013-01-11 16:27:07, Info CBS Failed to find servicing stack directory in online store. [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
2013-01-11 16:27:07, Warning DISM DISM Provider Store: PID=4104 Failed to Load the provider: C:\Windows\TEMP\0555ABC5-006D-4C3F-B79F-EA0E723FA971\MsiProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2013-01-11 16:27:07, Warning DISM DISM Provider Store: PID=4104 Failed to Load the provider: C:\Windows\TEMP\0555ABC5-006D-4C3F-B79F-EA0E723FA971\TransmogProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2013-01-11 16:27:07, Error DISM DISM Package Manager: PID=4104 The package WinPE-Scripting-Package is not applicable to the image. - CPackageManagerCLIHandler::Private_ProcessPackageChange
2013-01-11 16:27:08, Info DISM DISM Package Manager: PID=4104 Error in operation: the package is not applicable. (CBS HRESULT=0x800f081e) - CCbsConUIHandler::Error
2013-01-11 16:27:08, Info CBS Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Windows/TEMP/BootImages/{DADCFE01-3557-4058-99CC-2A15EDF905AF}/mount/Windows/System32/config/SOFTWARE,
the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
(The above one appears 8 times - almost in a row)
2013-01-11 16:27:08, Error DISM DISM Package Manager: PID=4104 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081e)
Help! Thanks :)
Ben K. -
2 questions - missing boot image, create mdt task sequence button missing
I'm learning SCCM 2012. I am watching a training video and the instructor shows a "Create MDT Task Sequence" button at the top of his ribbon bar when going into Task Sequence. I do not have this button - where did it go? I am
using 2012 SP1.
All I see is "Create Task Sequence" and "Create Task Sequence Media" but not "Create MDT Task Sequence".
Also - I only have an x86 boot image, and no x64. How do I get this into my inventory?
Thank you
Nathan"Create MDT Task Sequence" will be visible after you install MDT and integrate it to SCCM.
MDT is different product and not part of default SCCM installation.
You can integrate MDT to SCCM to create advanced Task Sequence if the default is not suitable for your needs.
Integrate MDT to SCCM.
MDT latest version is 2013:
http://www.microsoft.com/en-us/download/details.aspx?id=40796
For creating x64 boot image:
http://social.technet.microsoft.com/Forums/en-US/a3877a66-d35c-49ca-95c5-1c02d1611f2f/default-x64-boot-image-not-created-during-sccm-2012-setup
Please take a moment to Vote as Helpful and/or Mark as Answer where applicable. Thanks. -
Mdt integration boot image and SCCM boot image
I created a MDT task sequence in SCCM and went through all the steps for setting up the toolkit and settings and boot image. After all that, I distributed everything to my DP. When i try to boot to pxe and run that new MDT task sequence it finds the pxe
server, but just sits at "Contacting server" for some time until it times out. If I select the SCCM boot image in the task sequence properties then it works. the one created when i create the task sequence doesn't.
Any Idea?Sounds like you didn't enable the boot image for PXE. This is a checkbox at the bottom of the Data Source page in the properties of the boot image.
Have you reviewed smspxe.log?
Jason | http://blog.configmgrftw.com | @jasonsandys -
MDT 2013 Boot Image Crashes When Moved To New Server
I tested an MDT 2013 installed on a Windows 7 laptop and it works.
So now I am trying to move it to a Server 2008 R2 server so we can put it into production and the same workstation crashes in Win PE with a generic IRL not equal error.
I installed the same ADK version 8.100.26629 and MDT 2013 6.2.5019.0 on the server along with the.net framework 4.5 and Windows Management Framework 3.0. Both are showing the same PowerShell version 3 0 -1 -1
I updated the deployment share to point to the new paths and regenerated the boot image and copied it into WDS.
When I boot the laptop and try to run it from the server, it crashes in Win PE before the deployment task ever starts.
The same workstation still boots fine when I boot with the old boot image that points to the test laptop. So it does not seem to be a problem with the laptop.
Since I copied the entire deployment share over, I assume it must be using all the same drivers.
What could be causing this problem?Doesn't make sense since the hardware works 100% of the time when the deployment share is hosted from a Windows 7 laptop.
Simply copying the deployment share to a Server 2008 R2 server, updating bootini, customsettingsini, the shares and regenerating the boot image and the same deployment fails 100% of the time. Same laptop and same drivers used both times. -
Hi all,
I'm searching for a while on this one now... I'm unable to perform a "ZeroTouch" Build & Capture of my reference machine to get a master image, with Capture Media it seems to be working, but this is a manual step...
While running a W7SP1 Build & Capture task sequence, the "Capture the reference machine" group fails at "PrepareOS". The step before "PrepareOS", "Prepare ConfigMgr Client" runs without any issues.
The only error I can find, shows up in the report "OSD - history of a TS":
... 0005 that is either already released or we have not connected to it.
BootImage::ResolveImageSource( pszPackageId, sImagePackageSourcePath, sImageSourcePath), HRESULT=80070002 (e:\qfe\nts\sms\framework\tscore\bootimage.cpp,732)
TS::Boot::BootImage::StageBootImage(sPkgID), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\prepareos\prepareos.cpp,917)
PreStageWINPE(m_bDebug), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\prepareos\prepareos.cpp,1363)
pCmd->Sysprep(bActivate, bMsd), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\prepareos\main.cpp,270)
De-Initialization successful
Exiting with error code 2
sending with winhttp failed; 80072ee2
SendResourceRequest() failed. 80072ee2
Download() failed. 80072ee2.
Boot Image package not found.
he system cannot find the file specified. (Error: 80070002; Source: Windows)
Failed to pre-stage WINPE image, hr=0x80070002
Unable to sysprep the machine, hr=80070002
Sysprep'ing the machine failed, hr=80070002
I've searched the smsts.log file hundreds of times for errors, nothing there...
Can anyone give me a clue or just something...? I really don't know what my next step, to make this work, could be...
Thanks!The error Torsten pointed out gave me some clue... After much digging around on the web, I've stumbled upon this
article which led me into adding the following TS-variables:
SMSTSDownloadRetryCount: 5
SMSTSDownloadRetryDelay: 15
It seems to be working now on all types of hardware...
Case closed, thank you for the assistance!
Let's hope this article can save someone a couple of days... :)
Wesley -
Hi to everyone. Currently I am in a process of learning SCCM 2012 R2, having experience in working with MDT & WDS. I want to perform capturing of reference virtual Windows 7 machine image and to deploy it later to bare-metal virtual machine. In order
to do this I have to create task sequence media and while creating it I have to choose boot image. Since I have to "inject" vmxnet3 network drivers into boot image before using it for creation of task sequence media, what is recommended practice
- doing so with default boot image (for example x64 flavour of it) or adding Windows 7 boot image into SCCM and injecting these drivers into it? In MDT I did not have any default boot images so I had to add them from Windows 7 installation media and inject
these network drivers into them.No consequence. As Darrick says IT Admins often add their own custom images. However that is not essential. If you're just learning keep it simple.
Gerry Hampson | Blog:
www.gerryhampsoncm.blogspot.ie | LinkedIn:
Gerry Hampson | Twitter:
@gerryhampson -
Trying to create a NetRestore image.
Used SuperDuper to repair peremissions and create DMG of Client Zero HD
Ran SIU. Log Follows. Seemed to be going OK but hung at this point, or was I too impatient to wait any longer? had been sitting there for 20+ minutes before I Quit SIU...
Any pointers, please?
Starting image creation.
Workflow Started (2011-03-17 08:47:57 +0000)
Mac OS X Server 10.6.6 (10J567), System Image Utility 10.6.5 (447)
Starting action: Define Image Source (1.2)
Finished running action: Define Image Source
Starting action: Create Image (1.5.3)
Starting image creation process...
Create NetInstall Image
Initiating NetInstall from Restore Media.
progressPrefix="_progress"
++ progressPrefix=_progress
scriptsDebugKey="DEBUG"
++ scriptsDebugKey=DEBUG
imageIsUDIFKey="1"
++ imageIsUDIFKey=1
mountPoint="/tmp/mnt.pde0nj"
++ mountPoint=/tmp/mnt.pde0nj
ownershipInfoKey="505:20"
++ ownershipInfoKey=505:20
mkextPathKey="/System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mk ext"
++ mkextPathKey=/System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mk ext
sourceVol="/Volumes/Macintosh HD 1"
++ sourceVol='/Volumes/Macintosh HD 1'
skipFileChecksumKey="0"
++ skipFileChecksumKey=0
dmgTarget="NetInstall"
++ dmgTarget=NetInstall
destPath="/image in here/NetRestore ofRolloutDMG"
++ destPath='/image in here/NetRestore ofRolloutDMG'
asrSource="ASRInstall.pkg"
++ asrSource=ASRInstall.pkg
blockCopyDeviceKey="0"
++ blockCopyDeviceKey=0
. "$1/createCommon.sh"
+ . /tmp/niutemp.laZrfc41/createCommon.sh
# createCommon.sh
# Common functionality for the Image creation process.
# sourced in by the various SIU scripts
# Copyright 2007 Apple Inc. All rights reserved.
# Using dscl, create a user account
AddLocalUser()
# $1 long name
# $2 short name
# $3 isAdminUser key
# $4 password hash
# $5 user picture path
# $6 Language string
local databasePath="/Local/Target/Users/${2}"
# Find a free UID between 501 and 599
for ((i=501; i<600; i++)); do
output=`/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -search /Local/Target/Users UniqueID $i`
# If there is already an account dscl returns it, so we're looking for an empty return value.
if [ "$output" == "" ]; then
break
fi
done
# Create the user record
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -create $databasePath || exit 1
# Add long name
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${1}" || exit 1
# Add PrimaryGroupID
if [ "${3}" == 1 ]; then
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 80 || exit 1
else
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20 || exit 1
fi
# Add UniqueID
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i} || exit 1
# Add Home Directory entry
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath dsAttrTypeNative:home /Users/${2} || exit 1
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath authentication_authority ";ShadowHash;" || exit 1
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${5}" || exit 1
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath passwd "*" || exit 1
# Add shell
/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash" || exit 1
# lookup generated uid
genUID=`/usr/bin/dscl -f "${mountPoint}/var/db/dslocal/nodes/Default" localonly -read /Local/Target/Users/${2} GeneratedUID` || exit 1
genUID=${genUID:14:36}
# make sure the shadow/hash directory exists
if [ ! -e "${mountPoint}/var/db/shadow/hash" ] ; then
/bin/mkdir -p "${mountPoint}/var/db/shadow/hash" || exit 1
/bin/chmod -R 700 "${mountPoint}/var/db/shadow" || exit 1
fi
# to copy our password hash in there...
echo "${4}" > "${mountPoint}/var/db/shadow/hash/$genUID"
/bin/chmod 600 "${mountPoint}/var/db/shadow/hash/$genUID" || exit 1
# Create Home directory
if [ -e "/System/Library/User Template/${6}.lproj/" ]; then
/usr/bin/ditto "/System/Library/User Template/${6}.lproj/" "${mountPoint}/Users/${2}" || exit 1
else
/usr/bin/ditto "/System/Library/User Template/English.lproj/" "${mountPoint}/Users/${2}" || exit 1
fi
/usr/sbin/chown -R $i:$i "${mountPoint}/Users/${2}" || exit 1
# If they exist, apply any Append.bom changes
ApplyAppendBom()
local tempDir="$1"
local srcVol="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "$tempDir/Append.bom" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Applying Append.bom additions from System Image Utility"
fi
/usr/bin/ditto $opt -bom "$tempDir/Append.bom" "$srcVol" "${mountPoint}" || exit 1
fi
if [ -e "$srcVol/Library/Application Support/Apple/System Image Utility/Append.bom" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Applying Append.bom additions from $srcVol"
fi
/usr/bin/ditto $opt -bom "$srcVol/Library/Application Support/Apple/System Image Utility/Append.bom" "$srcVol" "${mountPoint}" || exit 1
fi
# Copies a list of packages (full paths contained in the file at $1) from source to .../System/Installation/Packages/
CopyPackagesFromFile()
local theFile="$1"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
local leafName=`basename "${FILE}"`
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Copying ${FILE}."
fi
/usr/bin/ditto $opt "${FILE}" "${mountPoint}/System/Installation/Packages/${leafName}" || exit 1
fi
done < "
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
local leafName=`basename "${FILE}"`
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Copying ${FILE}."
fi
read SUB_PATH
/usr/bin/ditto $opt "${FILE}" "${mountPoint}/System/Installation/Packages/${SUB_PATH}${leafName}" || exit 1
fi
done < "${theFile}"
# Create the dyld shared cache files
CreateDyldCaches()
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Creating dyld shared cache files"
# This spews too much for verbose mode... only enable for debug
if [ "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-debug"
fi
fi
/usr/bin/updatedyld_sharedcache -root "${mountPoint}" -universal_boot -force $opt
# Validate or create the destination directory and mount point
CreateOrValidateDestination()
local destDir="$1"
if [ ! -d "$destDir" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Creating working path at $destDir"
fi
/bin/mkdir -p "$destDir" || exit 1
fi
# Create mount point
if [ ! -d "${mountPoint}" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Creating mountpoint for in $destDir"
fi
/bin/mkdir -p "${mountPoint}" || exit 1
fi
# If any exist, apply any user accounts
CreateUserAccounts()
local count="${#userFullName[*]}"
if [ $count -gt 0 ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Adding $count user account(s) to the image"
fi
for ((index=0; index<$count; index++)); do
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Adding user ${userFullName[$index]}"
fi
#lay down user here
AddLocalUser "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassHash[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
done
# "touch"
/usr/bin/touch "${mountPoint}/private/var/db/.AppleSetupDone"
/usr/bin/touch "${mountPoint}/Library/Receipts/.SetupRegComplete"
fi
# retry the hdiutil detach until we either time out or it succeeds
retryhdiutildetach()
local mount_point="${1}"
local tries=0
local forceAt=0
local limit=24
local opt=""
forceAt=$(($limit - 1))
while [ $tries -lt $limit ]; do
tries=$(( tries + 1 ))
/bin/sleep 5
echo "Attempting to detach the disk image again..."
/usr/bin/hdiutil detach "${mount_point}" $opt
if [ $? -ne 0 ]; then
# Dump a list of any still open files on the mountPoint
if [ "${scriptsDebugKey}" == "DEBUG" ]; then
/usr/sbin/lsof +fg "${mount_point}"
fi
if [ $tries -eq $forceAt ]; then
echo "Failed to detach disk image at '${mount_point}' normally, adding -force."
opt="-force"
fi
if [ $tries -eq $limit ]; then
echo "Failed to detach disk image at '${mount_point}'."
exit 1
fi
else
tries=$limit
fi
done
# Create the dyld shared cache files
DetachAndRemoveMount()
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Detaching disk image"
# Dump a list of any still open files on the mountPoint
if [ "${scriptsDebugKey}" == "DEBUG" ]; then
/usr/sbin/lsof +fg "${mountPoint}"
fi
fi
# Finally detach the image and dispose the mountPoint directory
/usr/bin/hdiutil detach "${mountPoint}" || retryhdiutildetach "${mountPoint}" || exit 1
/bin/rmdir "${mountPoint}" || exit 1
# If the pieces exist, enable remote access for the shell image
EnableRemoteAccess()
local srcVol="$1"
local opt=""
if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Enabling shell image remote access support"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# install some things (again which aren't part of BaseSystem) needed for remote ASR installs
/usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || exit 1
if [ -e "${srcVol}/usr/sbin/installer" ]; then
/usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || exit 1
fi
# copy the sshd config and add our keys to the end of it
if [ -e "${srcVol}/etc/sshd_config" ]; then
/bin/cat "${srcVol}/etc/sshd_config" - > "${mountPoint}/etc/sshd_config" << END
HostKey /private/var/tmp/sshhostkey
HostKey /private/var/tmp/sshhost_rsakey
HostKey /private/var/tmp/sshhost_dsakey
END
fi
fi
# If it exists, install the sharing names and/or directory binding support to the install image
HandleNetBootClientHelper()
local tempDir="$1"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "$tempDir/bindingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Directory Service binding information"
fi
/usr/bin/ditto $opt "$tempDir/bindingNames.plist" "${mountPoint}/etc/bindingNames.plist" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/etc/bindingNames.plist"
/bin/chmod 644 "${mountPoint}/etc/bindingNames.plist"
fi
if [ -e "$tempDir/sharingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Sharing Names support"
fi
/usr/bin/ditto $opt "$tempDir/sharingNames.plist" "${mountPoint}/etc/sharingNames.plist" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/etc/sharingNames.plist"
/bin/chmod 644 "${mountPoint}/etc/sharingNames.plist"
fi
if [ -e "$tempDir/NetBootClientHelper" ]; then
/usr/bin/ditto $opt "$tempDir/NetBootClientHelper" "${mountPoint}/usr/sbin/NetBootClientHelper" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/usr/sbin/NetBootClientHelper"
/bin/chmod 555 "${mountPoint}/usr/sbin/NetBootClientHelper"
/usr/bin/ditto $opt "$tempDir/com.apple.NetBootClientHelper.plist" "${mountPoint}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist " || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist "
/bin/chmod 644 "${mountPoint}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist "
# finally, make sure it isn't disabled...
/usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${mountPoint}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
fi
# Create an installer package in /System/Installation/Packages/ wrapping the supplied script
InstallerPackageFromScript()
local tempDir="$1"
local scriptPath="$2"
local scriptName=`basename "${scriptPath}"`
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Create installer for script $scriptName"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# shouldn't exist on entry...
if [ -e "${tempDir}/emptyDir" ]; then
/bin/rm -rf "${tempDir}/emptyDir"
fi
# make some directories to work in
/bin/mkdir $opt -p "${tempDir}/$scriptName.pkg/Contents/Resources"
/bin/mkdir $opt "${tempDir}/emptyDir" || exit 1
cd "${tempDir}/emptyDir"
# Create Archive.pax.gz
/bin/pax -w -x cpio -f "$tempDir/$scriptName.pkg/Contents/Archive.pax" .
/usr/bin/gzip "$tempDir/$scriptName.pkg/Contents/Archive.pax"
# Create the Archive.bom file
/usr/bin/mkbom "$tempDir/emptyDir/" "$tempDir/$scriptName.pkg/Contents/Archive.bom"
# Create the Info.plist
/bin/cat > "$tempDir/$scriptName.pkg/Contents/Info.plist" << END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.server.SystemImageUtility.$scriptName</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
<integer>0</integer>
<key>IFPkgFlagDefaultLocation</key>
<string>/tmp</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
END
echo "pkmkrpkg1" > "$tempDir/$scriptName.pkg/Contents/PkgInfo"
echo "major: 1\nminor: 0" > "$tempDir/$scriptName.pkg/Contents/Resources/package_version"
# Copy the script
/bin/cp "$scriptPath" "$tempDir/$scriptName.pkg/Contents/Resources/postflight"
# copy the package to the Packages directory
/usr/bin/ditto $opt "$tempDir/$scriptName.pkg" "${mountPoint}/System/Installation/Packages/$scriptName.pkg" || exit 1
# clean up
/bin/rm -r "$tempDir/emptyDir"
/bin/rm -r "$tempDir/$scriptName.pkg"
# If it exists, install the PowerManagement.plist onto the install image
InstallPowerManagementPlist()
local tempDir="$1"
local opt=""
if [ -e "$tempDir/com.apple.PowerManagement.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing PowerManagement plist to install image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/usr/bin/ditto $opt "$tempDir/com.apple.PowerManagement.plist" "${mountPoint}/Library/Preferences/SystemConfiguration/com.apple.PowerManagemen t.plist" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/Library/Preferences/SystemConfiguration/com.apple.PowerManagemen t.plist"
/bin/chmod 644 "${mountPoint}/Library/Preferences/SystemConfiguration/com.apple.PowerManagemen t.plist"
fi
# If it exists, install the InstallerStatusNotifications.bundle and progress emitter onto the install image
InstallProgressPieces()
local tempDir="$1"
local opt=""
if [ -e "$tempDir/InstallerStatusNotifications.bundle" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing progress announcer to install image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/usr/bin/ditto $opt "$tempDir/InstallerStatusNotifications.bundle" "${mountPoint}/System/Library/CoreServices/InstallerStatusNotifications.bundle" || exit 1
/usr/sbin/chown -R root:wheel "${mountPoint}/System/Library/CoreServices/InstallerStatusNotifications.bundle"
/bin/chmod 755 "${mountPoint}/System/Library/CoreServices/InstallerStatusNotifications.bundle"
fi
if [ -e "$tempDir/com.apple.ProgressEmitter.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing status emitter to image"
fi
/usr/bin/ditto $opt "$tempDir/progress_emitter" "${mountPoint}/usr/sbin/progress_emitter" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/usr/sbin/progress_emitter"
/bin/chmod 555 "${mountPoint}/usr/sbin/progress_emitter"
/usr/bin/ditto $opt "$tempDir/com.apple.ProgressEmitter.plist" "${mountPoint}/System/Library/LaunchDaemons/com.apple.ProgressEmitter.plist" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/System/Library/LaunchDaemons/com.apple.ProgressEmitter.plist"
/bin/chmod 644 "${mountPoint}/System/Library/LaunchDaemons/com.apple.ProgressEmitter.plist"
fi
# Converts a list of scripts (full paths contained in the file at $1) into packages in .../System/Installation/Packages/
InstallScriptsFromFile()
local tempDir="$1"
local theFile="$2"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Converting scripts into install packages"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
# make an installer package out of the script
InstallerPackageFromScript "$tempDir" "${FILE}"
fi
done < "
local destDir="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Performing post install cleanup"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
opt="-v"
fi
fi
# delete the DS indices to force reindexing...
if [ -e "${mountPoint}/var/db/dslocal/indices/Default/index" ]; then
/bin/rm $opt "${mountPoint}/var/db/dslocal/indices/Default/index"
fi
# detach the disk and remove the mount folder
DetachAndRemoveMount || exit 1
# copy the NBImageInfo.plist file
/usr/bin/ditto $opt "$tempDir/NBImageInfo.plist" "$destDir/NBImageInfo.plist" || exit 1
echo "Correcting permissions. ${ownershipInfoKey} $destDir"
/usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
# rename the folder to .nbi
if [ ! -e "$destDir.nbi" ]; then
/bin/mv $opt "$destDir" "$destDir.nbi" || exit 1
else
local parentDir=`dirname "${destDir}"`
local targetName=`basename "${destDir}"`
for ((i=2; i<1000; i++)); do
if [ ! -e "${parentDir}/${targetName}_$i.nbi" ]; then
/bin/mv $opt "$destDir" "${parentDir}/${targetName}_$i.nbi" || exit 1
break
fi
done
fi
# Prepare the source by deleting stuff we don't want to copy if sourcing a volume
PreCleanSource()
local srcVol="$1"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
opt="-v"
fi
fi
if [ -e "$srcVol/private/var/vm/swapfile*" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Removing swapfiles on $1"
fi
/bin/rm $opt "$srcVol/private/var/vm/swapfile*"
fi
if [ -d "$srcVol/private/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/tmp/*"
fi
if [ -d "$srcVol/private/var/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/var/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/var/tmp/*"
fi
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out devices and volumes on $1"
fi
if [ -d "$srcVol/Volumes" ]; then
/bin/rm -r $opt "$srcVol/Volumes/*"
fi
if [ -d "$srcVol/dev" ]; then
/bin/rm $opt "$srcVol/dev/*"
fi
if [ -d "$srcVol/private/var/run" ]; then
/bin/rm -r $opt "$srcVol/private/var/run/*"
fi
# Copy kernel and build the kext cache on the boot image
PrepareKernelAndKextCache()
local destDir="$1"
local opt=""
local archx8664=`/usr/bin/file -b "${mountPoint}/mach_kernel" | /usr/bin/sed -ne 's/.(x86_64)):./\1/p'`
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing the kernel and kext cache for the boot image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# Insure the kext cache on our source volume (the boot shell) is up to date
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Updating kext cache on source volume"
fi
/usr/sbin/kextcache -update-volume "${mountPoint}" || exit 1
# Copy the i386 and, if it exists, the x86_64 architecture
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing Intel architecture"
fi
# Prepare the kernel
/bin/mkdir $opt "$destDir/i386" || exit 1
/usr/bin/lipo -extract i386 "${mountPoint}/mach_kernel" -output "$destDir/i386/mach.macosx" || exit 1
# Build kext cache
/usr/sbin/kextcache -a i386 -s -l -n -z -mkext2 "$destDir/i386/mach.macosx.mkext" "${mountPoint}/System/Library/Extensions" || exit 1
# If the x86_64 architecture exists, copy it
if [ "${archx8664}" = "x86_64" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing x86_64 architecture"
fi
# Prepare the kernel
/bin/mkdir $opt "$destDir/i386/x86_64" || exit 1
/usr/bin/lipo -extract x86_64 "${mountPoint}/mach_kernel" -output "$destDir/i386/x86_64/mach.macosx" || exit 1
# Build kext cache
/usr/sbin/kextcache -a x86_64 -s -l -n -z -mkext2 "$destDir/i386/x86_64/mach.macosx.mkext" "${mountPoint}/System/Library/Extensions" || exit 1
fi
# Create the i386 and x86_64 boot loaders on the boot image
PrepareBootLoader()
local srcVol="$1"
local destDir="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing boot loader"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# Copy the i386 and, by default, the x86_64 architecture
if [ -e "${mountPoint}/usr/standalone/i386/boot.efi" ]; then
/usr/bin/ditto $opt "${mountPoint}/usr/standalone/i386/boot.efi" "$destDir/i386/booter" || exit 1
else
/usr/bin/ditto $opt "$srcVol/usr/standalone/i386/boot.efi" "$destDir/i386/booter" || exit 1
fi
# If it exists, install the partitioning application and data onto the install image
ProcessAutoPartition()
local tempDir="$1"
local opt=""
if [ -e "$tempDir/PartitionInfo.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Partitioning application and data to install image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/usr/bin/ditto $opt "$tempDir/PartitionInfo.plist" "${mountPoint}/System/Installation/PartitionInfo.plist" || exit 1
/usr/bin/ditto $opt "$tempDir/AutoPartition.app" "${mountPoint}/System/Installation/AutoPartition.app" || exit 1
# Tell the installer to run the Partitioning application
/bin/echo "#!/bin/sh
/System/Installation/AutoPartition.app/Contents/MacOS/AutoPartition" > "${mountPoint}/private/etc/rc.cdrom.postWS"
# Due to the way rc.install sources the script, it needs to be executable
/usr/sbin/chown root:wheel "${mountPoint}/private/etc/rc.cdrom.postWS"
/bin/chmod 755 "${mountPoint}/private/etc/rc.cdrom.postWS"
fi
# If it exists, install the InstallPreferences.plist onto the install image
ProcessInstallPreferences()
local tempDir="$1"
local opt=""
if [ -e "$tempDir/InstallPreferences.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing InstallPreferences.plist to install image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/usr/bin/ditto $opt "$tempDir/InstallPreferences.plist" "${mountPoint}/System/Installation/Packages/InstallPreferences.plist" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/System/Installation/Packages/InstallPreferences.plist"
/bin/chmod 644 "${mountPoint}/System/Installation/Packages/InstallPreferences.plist"
fi
# If it exists, install the minstallconfig.xml onto the install image
ProcessMinInstall()
local tempDir="$1"
local opt=""
if [ -e "$tempDir/minstallconfig.xml" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing minstallconfig.xml to install image"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/usr/bin/ditto $opt "$tempDir/minstallconfig.xml" "${mountPoint}/etc/minstallconfig.xml" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/etc/minstallconfig.xml"
/bin/chmod 644 "${mountPoint}/etc/minstallconfig.xml"
fi
# untar the OSInstall.mpkg so it can be modified
untarOSInstallMpkg()
local tempDir="$1"
local opt=""
# we might have already done this, so check for it first
if [ ! -d "${tempDir}/OSInstall_pkg" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "uncompressing OSInstall.mpkg"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
/bin/mkdir "${tempDir}/OSInstall_pkg"
cd "${tempDir}/OSInstall_pkg"
/usr/bin/xar $opt -xf "${mountPoint}/System/Installation/Packages/OSInstall.mpkg"
# make Distribution writeable
/bin/chmod 777 "${tempDir}/OSInstall_pkg"
/bin/chmod 666 "${tempDir}/OSInstall_pkg/Distribution"
fi
handler ()
echo "Terminated. Cleaning up. Unmounting $destPath"
# detach the disk and remove the mount folder
DetachAndRemoveMount
# Remove the items we created
/bin/rm -r "$destPath/i386"
/bin/rm "$destPath/$dmgTarget.dmg"
/bin/rm "$destPath/System.dmg"
# Finally, remove the directory IF empty
/bin/rmdir "$destPath"
exit 1
InstallNetBootClientHelper()
local tempDir="$1"
local destDir="${mountPoint}/System/Installation/Packages/SIUExtras"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "${tempDir}/bindingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Directory Service binding information"
fi
/usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${destDir}/bindingNames.plist" || exit 1
/usr/sbin/chown root:wheel "${destDir}/bindingNames.plist"
/bin/chmod 644 "${destDir}/bindingNames.plist"
fi
if [ -e "${tempDir}/sharingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Sharing Names support"
fi
/usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${destDir}/sharingNames.plist" || exit 1
/usr/sbin/chown root:wheel "${destDir}/sharingNames.plist"
/bin/chmod 644 "${destDir}/sharingNames.plist"
fi
# This is required, make sure it's here
/usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${destDir}/NetBootClientHelper" || exit 1
/usr/sbin/chown root:wheel "${destDir}/NetBootClientHelper"
/bin/chmod 555 "${destDir}/NetBootClientHelper"
/usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${destDir}/com.apple.NetBootClientHelper.plist" || exit 1
/usr/sbin/chown root:wheel "${destDir}/com.apple.NetBootClientHelper.plist"
/bin/chmod 644 "${destDir}/com.apple.NetBootClientHelper.plist"
/usr/bin/ditto $opt "${tempDir}/installClientHelper.sh" "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh" || exit 1
/usr/sbin/chown root:wheel "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
/bin/chmod 555 "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
trap "handler" TERM INT
+ trap handler TERM INT
# Set up for script debugging
debug_opt=""
+ debug_opt=
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
debug_opt="-v"
fi
+ '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
+ debug_opt=-v
# See if the source volume was overridden (NetRestore from install media workflow)
isRestoreFromInstallMedia="NO"
+ isRestoreFromInstallMedia=NO
if [ ! -z "${3:-}" ]; then
sourceVol="${3}"
isRestoreFromInstallMedia="YES"
fi
+ '[' '!' -z '' ']'
# Prepare the destination
CreateOrValidateDestination "$destPath"
+ CreateOrValidateDestination '/image in here/NetRestore ofRolloutDMG'
+ local 'destDir=/image in here/NetRestore ofRolloutDMG'
+ '[' '!' -d '/image in here/NetRestore ofRolloutDMG' ']'
+ '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
+ echo 'Creating working path at /image in here/NetRestore ofRolloutDMG'
Creating working path at /image in here/NetRestore ofRolloutDMG
+ /bin/mkdir -p '/image in here/NetRestore ofRolloutDMG'
+ '[' '!' -d /tmp/mnt.pde0nj ']'
# If the sourceVol is the boot drive we have an asr:// type source
if [ "$sourceVol" == "/" ]; then
# Create an empty image to skip the ASR volume creation
/usr/bin/touch "${destPath}/System.dmg"
fi
+ '[' '/Volumes/Macintosh HD 1' == / ']'
# Look for an existing System.dmg
if [ ! -e "$destPath/System.dmg" ]; then
# update progress information
echo "${progressPrefix}imagingSource"
# Create an image of the source volume
# /usr/bin/hdiutil create "$destPath/System" -srcfolder "$sourceVol" -format UDBZ -uid 0 -gid 80 -mode 1775 -ov -puppetstrings || exit 1
if [ "${blockCopyDeviceKey}" == 1 ] ; then
theDevice=`/usr/sbin/diskutil info "$sourceVol" | grep "Device Identifier:" | awk '{print $3}'`
/usr/sbin/diskutil umount "${theDevice}"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Creating block-level image of $theDevice"
fi
/usr/bin/hdiutil create "$destPath/System" -srcdevice "${theDevice}" -uid 0 -gid 80 -mode 1775 -ov -puppetstrings || exit 1
/usr/sbin/diskutil mount "${theDevice}"
else
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Creating image of $sourceVol"
fi
/usr/bin/hdiutil create "$destPath/System" -srcfolder "${sourceVol}" -fsargs "-c a=16384,c=8192,e=1280" -uid 0 -gid 80 -mode 1775 -ov -puppetstrings || exit 1
fi
# update progress information
echo "${progressPrefix}preparingASR"
# "Scan the image for restore"
asr_opt="--filechecksum"
if [ "${skipFileChecksumKey}" == 1 ] ; then
asr_opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Preparing image for restore without file checksums"
fi
else
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Preparing image for restore"
fi
fi
/usr/sbin/asr imagescan --source "$destPath/System.dmg" $asr_opt || exit 1
fi
+ '[' '!' -e '/image in here/NetRestore ofRolloutDMG/System.dmg' ']'
+ echo progress_imagingSource
+ '[' 0 == 1 ']'
+ '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
+ echo 'Creating image of /Volumes/Macintosh HD 1'
Creating image of /Volumes/Macintosh HD 1
+ /usr/bin/hdiutil create '/image in here/NetRestore ofRolloutDMG/System' -srcfolder '/Volumes/Macintosh HD 1' -fsargs '-c a=16384,c=8192,e=1280' -uid 0 -gid 80 -mode 1775 -ov -puppetstrings
PERCENT:0.000000
PERCENT:0.433633
PERCENT:87.806953
PERCENT:-1.000000
Finalizing disk image.
detachTempimageFile: synchronous unmount /dev/disk1 returned 49153
lsof: status error on /Volumes/Macintosh: No such file or directory
lsof: status error on HD: No such file or directory
lsof 4.82
latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
usage: [-?abhlnNoOPRtUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]
[-F [f]] [-g [s]] [-i ] [+|-L [l]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.
retrying unmount (#1)...
detachTempImageFile: synchronous retry (#1) unmount /Volumes/Macintosh HD (/dev/disk1) returned 0
Workflow Stopped (2011-03-17 10:01:33 +0000)
Workflow Stopped (2011-03-17 10:01:34 +0000)
Stopping image creation.
Terminating script!Thanks for your input...I did wonder if I was being impatient...
subsequently ran it again and was taken out of the office for a few hours, lo and behold on return all was well....
Now however, netboot service won't start, netboot folder is not being created within library...another posting to follow
Message was edited by: DaiVernon
Maybe you are looking for
-
Can you sync from a shared library
we have multiple ipod, ipad, iphone devices and multiple imac computers but only one itunes account. kids are not old enough to have their own account. can i sync their ipad to their mac if it is using a shared library from my imac or do i need to
-
i am very disappointed with my new 8gb ipod already a major fault has oocured , when i play certain songs the song just cuts out and jumps and this does not happen in my itunes libary on my computer and it does this many times in a song . its very an
-
Missing Tint Slider in Illustrator CS5 Colour Palette
Hello Despite following all the intructions on numerous tutorials/help sections etc I can't get the tint slider to appear in the colour palette. I'm thinking I might have a bug with my programme. Any ideas? (it's beyond frustrating!!!!) Jenny
-
Reader X will not install on Vista
Hey all, First time forumer here... Here's the story downloaded pdf zip for taxes. "access is denied" Nowheres to be found in downloads folder... download each pdf indiivually and fine in 8 downloaded pdf to AR831 Scrolls slow Download 1mb pdf...
-
Medication for Ongoing Conditions
How does one list medications for ongoing conditions? The "obvious" thing to me would allow having multiple prescriptions for a single medication entry. For example, if I am on a medication, same dosage, same instructions, everything, for a years, an