Offline Servicing - Failed to Mount Image

I'm able to deploy an OS perfectly with OSD task sequences with the image I'm using.  However when I attempt to inject the updates using the "Schedule Updates" method, I get the following error.  Failed to mount the image on the system.
I opened SCCM console from the primary site itself just in case, I also retried with elevating permissions on the console.
OfflineServicingMgr.log
Total number of individual updates to be installed is 150.
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:35:56 PM
7076 (0x1BA4)
STATMSG: ID=7903 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMPSQA.playpen.local SITE=DEV PID=1892 TID=7076 GMTDATE=Mon Jul 30 17:35:56.171 2012 ISTR0="DEV0000E" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7=""
ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:35:56 PM 7076 (0x1BA4)
Copy image DEV0000E (size 2679 MB):' SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:35:56 PM 7076 (0x1BA4)
copying file '\\sccmdpqa1.playpen.local\OperatingSystems\Win2k8R2_with_SP1\sources\install.wim' to 'D:\ConfigMgr_OfflineImageServicing\DEV0000E\install.wim' ...
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:35:56 PM
7076 (0x1BA4)
Copying(25% complete)... SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:36:33 PM 7076 (0x1BA4)
Copying(50% complete)... SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:37:08 PM 7076 (0x1BA4)
Copying(75% complete)... SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:37:41 PM 7076 (0x1BA4)
Copying(100% complete)... SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:13 PM 7076 (0x1BA4)
STATMSG: ID=7905 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMPSQA.playpen.local SITE=DEV PID=1892 TID=7076 GMTDATE=Mon Jul 30 17:38:13.915 2012 ISTR0="DEV0000E" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7=""
ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:13 PM 7076 (0x1BA4)
[Schedule ID 16777219] Started processing image package with ID DEV0000E
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
STATMSG: ID=7906 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMPSQA.playpen.local SITE=DEV PID=1892 TID=7076 GMTDATE=Mon Jul 30 17:38:14.087 2012 ISTR0="DEV0000E" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7=""
ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Image package file with ID DEV0000E contains 8 image(s)
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Processing image at index 1 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Mounting image at index 1. Image file='D:\ConfigMgr_OfflineImageServicing\DEV0000E\install.wim', MountDirectory='D:\ConfigMgr_OfflineImageServicing\DEV0000E\ImageMountDir', ImageFileType='WIM', Mode='ReadWrite'
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Unable to mount image file SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
WIM::MountWIMImage returned code 0x80070005
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Failed to mount image SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
MountImage returned code 0x80070005 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Image Mount failed with error 5 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
STATMSG: ID=7912 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMPSQA.playpen.local SITE=DEV PID=1892 TID=7076 GMTDATE=Mon Jul 30 17:38:14.256 2012 ISTR0="DEV0000E" ISTR1="1" ISTR2="D:\ConfigMgr_OfflineImageServicing\DEV0000E\ImageMountDir"
ISTR3="5" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Completed processing image package DEV0000E. Status = Failed
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Updated history for image package DEV0000E in the database
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
Schedule processing failed SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Processing completed for Schedule with ID 16777219 (Schedule Name = )
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
7076 (0x1BA4)
STATMSG: ID=7910 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMPSQA.playpen.local SITE=DEV PID=1892 TID=7076 GMTDATE=Mon Jul 30 17:38:14.348 2012 ISTR0="16777219" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7=""
ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Schedule processing thread stopped SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM 7076 (0x1BA4)
Checking if there are schedule(s) which need to be run at this time.
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM
2260 (0x08D4)
This Schedule with ID 16777217 does not have a next run time
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)
This Schedule with ID 16777218 does not have a next run time
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)
This Schedule with ID 16777219 does not have a next run time
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)
No more schedules are found to be run at this time or in the future. Will sleep till a new schedule is created.
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)
No schedule exists which needs to be run anytime in future.
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)
Offline Servicing Manager thread is exiting.
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:15 PM
2260 (0x08D4)

Image package file with ID DEV0000E contains 8 image(s)SMS_OFFLINE_SERVICING_MANAGER
7/30/2012 12:38:14 PM7076 (0x1BA4)
Unable to mount image file SMS_OFFLINE_SERVICING_MANAGER7/30/2012 12:38:14 PM
7076 (0x1BA4)
WIM::MountWIMImage returned code 0x80070005
SMS_OFFLINE_SERVICING_MANAGER 7/30/2012 12:38:14 PM7076 (0x1BA4)
Failed to mount image SMS_OFFLINE_SERVICING_MANAGER7/30/2012 12:38:14 PM
7076 (0x1BA4)
MountImage returned code 0x80070005 SMS_OFFLINE_SERVICING_MANAGER7/30/2012 12:38:14 PM
7076 (0x1BA4)
Image Mount failed with error 5 SMS_OFFLINE_SERVICING_MANAGER7/30/2012 12:38:14 PM
7076 (0x1BA4)
Hi,
returned code 0x80070005 = access denied.
If I can see it correctly you have imported the install.wim from the installation media, I haven't tried that actually.
What permission do the Primary Site server account have to the source media?
It must have at least Modify permissions, is that granted already?
Regards,
Jörgen
-- My System Center blog ccmexec.com -- Twitter
@ccmexec

Similar Messages

  • Offline Servicing Failed - Unable to delete existing mount directory

    Hi All,
    I'm unable to run offline servicing on my install image, as the deletion of a previous mount point fails (from OfflineServicingMgr.log):
    Deleting file \\?\C:\ConfigMgr_OfflineImageServicing\GRO000E7\ImageMountDir\Windows\Fonts\trebucbi.ttf, FAILED, Win32 Error = 1168
    Failed to remove previously existing staging folder C:\ConfigMgr_OfflineImageServicing\GRO000E7, GLE = 1168
    Failed to remove the staging folder C:\ConfigMgr_OfflineImageServicing, GLE = 1168
    I've tried:
    DISM /cleanup-wim - returns all stale files removed, but the directory remains
    DISM /cleanup-mountpoints - returns all stale files removed, but the directory remains
    Manually deleting the folder - which returns the error 0x80070490 Element not found
    I presume I could work around this by deleting the existing image in SCCM, re-creating using the WIM, then it should have a different packageID and hence use a different mount point for offline servicing?
    I'd rather not do this, so if anyone has any ideas on something else to try, would be greatly appreciated.
    Thanks,
    Iain

    We had a similar problem, after the server had it's standard maintenance reboot, I was able to get the DISM /cleanup-wim to work. Then I was able to delete the folder. Don't know whether or not you've had a chance to reboot the server but that couldn't
    hurt to try if you're able to do that. Good luck.

  • Offline Servicing failing (InstallUpdate returned code 0x800f0830)

    Hello All,
    I've just inherited a SCCM 2012 Setup.
    I was trying to use the Offline Servicing feature and noticed that all updates were failing.
    After reading the forum, I read that this didn't work well in 2012 SP1 (the version the deployment had when I got here) and have upgraded in the mean time to 2012 R2 CU2.
    Unfortunately, the behavior has not changed.
    What I've tried so far:
    - Updated the rights on the folder where the OSD image reside to Full Control for everyone ( to eliminate security issues)
    - added exclusions in the SCEP client for the offline servicing folder and the dism processes.
    - disabled the scep client all together to avoid it interfering
    - Disabled UAC
    The entries I'm seeing in the log are the following:
    Failed to install update with ID 16817599 on the image. ErrorCode = 2096 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:20 PM 4384 (0x1120)
    Checking if update (62 of 62) with ID 16817968 needs to be applied on the image. 1 content binarie(s) are associated with the update. SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:20 PM 4384 (0x1120)
    Applicability State = APPLICABLE, Update Binary = C:\ConfigMgr_OfflineImageServicing\a5bb0642-ac6f-4237-88c9-a0973a9ce22a\windows6.1-kb3001554-x64.cab. SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:23 PM 4384 (0x1120)
    Applying update with ID 16817968 on image at index 1. SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:23 PM 4384 (0x1120)
    Failed to install update with error code -2146498512 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:26 PM 4384 (0x1120)
    InstallUpdate returned code 0x800f0830 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:26 PM 4384 (0x1120)
    STATMSG: ID=7911 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=HQWSCMI1 SITE=RBG PID=2024 TID=4384 GMTDATE=Mon Oct 13 10:25:26.389 2014 ISTR0="16817968" ISTR1="RBG001C1" ISTR2="1"
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:26 PM 4384 (0x1120)
    Failed to install update with ID 16817968 on the image. ErrorCode = 2096 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:26 PM 4384 (0x1120)
    UnMounting Image (Commit Changes = 0) ... SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:25:26 PM 4384 (0x1120)
    Failed processing image at index 1 as one or more updates failed to install. SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:26:54 PM 4384 (0x1120)
    STATMSG: ID=7907 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=HQWSCMI1 SITE=RBG PID=2024 TID=4384 GMTDATE=Mon Oct 13 10:26:54.909 2014 ISTR0="RBG001C1" ISTR1="" ISTR2="" ISTR3=""
    ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:26:54 PM 4384 (0x1120)
    Completed processing image package RBG001C1. Status = Failed SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:26:54 PM 4384 (0x1120)
    Updated history for image package RBG001C1 in the database SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:26:55 PM 4384 (0x1120)
    Schedule processing failed SMS_OFFLINE_SERVICING_MANAGER 10/13/2014 12:26:55 PM 4384 (0x1120)
    All Updates fail with the same errorcodes.
    Can someone help me in finding out what is causing this?
    Thanks!
    Filip

    Hi,
    Have you tried to use another image to see whether the same issue appears?
    Best Regards,
    Joyce
    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.

  • SCCM Offline Servicing

    I scheduled an update to an OS image and checked the OfflineServicingMgr.log. Here is what I found. It did not complete and left a partial "ConfigMgr_OfflineImageServicing" folder. What could be the issue?
    Failed to install update with error code 110
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:00 AM
    3524 (0x0DC4)
    InstallUpdate returned code 0x8007006e SMS_OFFLINE_SERVICING_MANAGER
    2/12/2013 12:34:00 AM 3524 (0x0DC4)
    STATMSG: ID=7911 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=COPTCONFIGMGR.copt.local SITE=CPS PID=2280 TID=3524 GMTDATE=Tue Feb 12 05:34:00.980 2013 ISTR0="16822985" ISTR1="CPS0003A" ISTR2="1"
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:00 AM
    3524 (0x0DC4)
    Failed to install update with ID 16822985 on the image. ErrorCode = 110
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:00 AM
    3524 (0x0DC4)
    Failed to get update applicability. Dism.exe command line is below:
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    "C:\Windows\system32\cmd.exe" /q /c ""C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Image:"D:\ConfigMgr_OfflineImageServicing\CPS0003A\ImageMountDir" /LogPath:%WINDIR%\Logs\Dism\dism_sccm.log /English /Get-PackageInfo
    /Packagepath:"\\coptconfigmgr\Packages$\Software Updates\Windows 7-OSD\8e2eee08-d266-4318-87ad-838352603bcb\windows6.1-kb2758857-x86.cab">>D:\ConfigMgr_OfflineImageServicing\CPS0003A\[email protected]"
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    Dism.exe exit code=-1051721670 SMS_OFFLINE_SERVICING_MANAGER
    2/12/2013 12:34:01 AM 3524 (0x0DC4)
    GetUpdateApplicability returned code 0xc150003a
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    Applicability State = APPLICABILITY_CHECK_NOT_SUPPORTED, Update Binary = \\coptconfigmgr\Packages$\Software Updates\Windows 7-OSD\8e2eee08-d266-4318-87ad-838352603bcb\windows6.1-kb2758857-x86.cab.
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    STATMSG: ID=7917 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=COPTCONFIGMGR.copt.local SITE=CPS PID=2280 TID=3524 GMTDATE=Tue Feb 12 05:34:01.475 2013 ISTR0="\\coptconfigmgr\Packages$\Software Updates\Windows
    7-OSD\8e2eee08-d266-4318-87ad-838352603bcb\windows6.1-kb2758857-x86.cab" ISTR1="16822985" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9=""
    NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER
    2/12/2013 12:34:01 AM 3524 (0x0DC4)
    Not applying this update binary, it is not supported.
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    Checking if update (212 of 242) with ID 16823030 needs to be applied on the image. 2 content binarie(s) are associated with the update.
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)
    Failed to get update applicability. Dism.exe command line is below:
    SMS_OFFLINE_SERVICING_MANAGER 2/12/2013 12:34:01 AM
    3524 (0x0DC4)

    if your interested in changing the default drive for the servicing folder here is the info:
    http://blogs.technet.com/b/configmgrteam/archive/2013/07/15/customizing-offline-servicing-of-operating-system-images.aspx
    My own experience is that the folder gets locked  with full permissions to the trusted installer and not the admin, so that when the operation is finished, the process cannot remove this folder, and then you have the pain of taking ownership, etc.
    Now we can redirect to a usb thumb drive, and after finishing with the updates, format the thumbdrive which should make it a whole lot easier.
    I have also read that there is a bug with DISM which a hot fix may cover out.

  • SCCM 2012 SP1 - Offline Servicing failure - Failed to find or access the update binaries to be applied on the image

    Hi there
    Trying to patch a new Windows 7 SP1 image within SCCM 2012 SP1, but it's failing.
    I've searched for information on the failure messages I am seeing, but although there is a LOT of information online concerning Offline Servicing failures, I can't find anything on the errors I am seeing.
    I've tried injecting a single update, five updates and ten updates, no difference, same messages.
    We have McAfee Access Protection disabled, as we know Offline Servicing simply won't work if this is running.
    In the console, in Schedule Update Status for the image I am trying to update, the following message is shown:
    "Failed to find or access the update binaries to be applied on the image."
    That sounds as if the process can't find the actual .cab file for any update I've tried to inject, but I don't know why it wouldn't be able to do that, we have Software Updates configured and the .cab files are on the same server.
    When I looked at the OfflineServicingMgr.log file, I see the following entries:
    Processing image at index 1        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:52:49        8272 (0x2050)
    Mounting image at index 1. Image file='D:\ConfigMgr_OfflineImageServicing\PackageID\W7_Image.wim', MountDirectory='D:\ConfigMgr_OfflineImageServicing\PackageID\ImageMountDir', ImageFileType='WIM', Mode='ReadWrite'        SMS_OFFLINE_SERVICING_MANAGER       
    14/06/2014 14:52:49        8272 (0x2050)
    Image OS information : MajorVersionMS = 6, MinorVersionMS = 1, MajorVersionLS = 7601, MinorVersionLS = 17514        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:53:31       
    8272 (0x2050)
    Failed to find properties of file 4        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:53:31        8272 (0x2050)
    UnMounting Image (Commit Changes = 0) ...        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:53:31        8272 (0x2050)
    Completed processing image package PackageID. Status = Failed        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:54:04        8272 (0x2050)
    Updated history for image package PackageID in the database        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:54:04        8272 (0x2050)
    Schedule processing failed        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:54:04        8272 (0x2050)
    Processing completed for Schedule with ID 16777237        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:54:04        8272 (0x2050)
    STATMSG: ID=7910 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=SCCMServer.domain SITE=Site_Code PID=8560 TID=8272 GMTDATE=Sat Jun 14 13:54:04.964 2014 ISTR0="16777237" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0        SMS_OFFLINE_SERVICING_MANAGER       
    14/06/2014 14:54:04        8272 (0x2050)
    Schedule processing thread stopped        SMS_OFFLINE_SERVICING_MANAGER        14/06/2014 14:54:05        8272 (0x2050)
    I'm not sure what file "Failed to find properties of file 4" is referring to, whether dism.exe, an update or the image itself, but immediately after this message appears the image is unmounted. After that this message shows:
    "Completed processing image package PackageID. Status = Failed"
    As I say, there's a lot of information available re Offline Servicing but I haven't found anything with these particular messages.
    If anyone has encountered this before, I'd appreciate any information you have.
    Regards,
    John.

    Hi,
    I think file named 'NO_SMS_ON_DRIVE.SMS’ might be causing this issue. If this file is present in logical drives, then please give it a shot one more time after deleting this file from the logical drives.
    Due to this file, it might be preventing 'smsexec' service to skip the drive when looking for content. So worth a try!
    After deleting this file, you also need to restart 'smsexec' service to reflect the changes. You can also verify from below registry value & ensure that all of your logical drives (specially where SCCMContentLib directory resides) should be listed
    over there 
    'HKLM\Software\Microsoft\SMS\DP\ContentLibUsableDrives'
    Hope this will help!
    Cheers | Navdeep Sidhu

  • System Image Utility "volume on diskxsx failed to mount"

    I've been trying to create a NetRestore image using System Image Utility (SIU) for the past couple of days, but no matter what I do it fails.  I was oringally using OSX 10.8.4, but have now upgraded to 10.8.5.
    After reading through the logs, I can see SIU fails whilst it's trying to mount the volume.  Has anyone else had this issue, and if so, were you able to fix it?
    I also noticed the "Create image of /Volume/Macintosh HD/" function stops at 48% instead of 100%.  Is that normal?
    Below is a copy of the log that SIU produced.
    Starting image creation.
    Workflow Started (2013-09-24 08:41:36 +0100)
    OS X Server 10.8.5 (12F37), System Image Utility 10.8.3 (624)
    Starting action: Define Image Source (1.4)
    Finished running action: Define Image Source
    Starting action: Create Image (1.7.2)
    Starting image creation process...
    Create NetRestore Image
    Initiating NetRestore from installed volume.
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    . "${1}/createCommon.sh"
    + . /tmp/niutemp.rDvE48RI/createCommon.sh
    # createCommon.sh
    # Common functionality for the Image creation process.
    # sourced in by the various SIU scripts
    # Copyright © 2007-2012 Apple Inc. All rights reserved.
    # Using dscl, create a user account
    AddLocalUser()
    # $1 volume whose local node database to modify
    # $2 long name
    # $3 short name
    # $4 isAdminUser key
    # $5 password data
    # $6 password hint
    # $7 user picture path
    # $8 Language string
    local databasePath="/Local/Default/Users/${3}"
    local targetVol="${1}"
    # Find a free UID between 501 and 599
    for ((i=501; i<600; i++)); do
    output=`/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -search /Local/Default/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 "${targetVol}/var/db/dslocal/nodes/Default" localonly -create $databasePath
    if [ $? != 0 ]; then
    echo "Failed to create '${databasePath}'."
    return 1
    fi
    # Add long name
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${2}"
    if [ $? != 0 ]; then
    echo "Failed to set the RealName."
    return 1
    fi
    # Set up the users group information
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20
    if [ $? != 0 ]; then
    echo "Failed to set the PrimaryGroupID."
    return 1
    fi
    # Add some additional stuff if the user is an admin
    if [ "${4}" == 1 ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/admin" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the admin group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserveradm" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserveradm group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserverusr" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserverusr group."
    return 1
    fi
    fi
    # Add UniqueID
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i}
    if [ $? != 0 ]; then
    echo "Failed to set the UniqueID."
    return 1
    fi
    # Add Home Directory entry
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath NFSHomeDirectory /Users/${3}
    if [ $? != 0 ]; then
    echo "Failed to set the NFSHomeDirectory."
    fi
    if [ "${6}" != "" ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath AuthenticationHint "${6}"
    if [ $? != 0 ]; then
    echo "Failed to set the AuthenticationHint."
    return 1
    fi
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${7}"
    if [ $? != 0 ]; then
    echo "Failed to set the picture."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -passwd $databasePath "${5}"
    if [ $? != 0 ]; then
    echo "Failed to set the passwd."
    return 1
    fi
    # Add shell
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash"
    if [ $? != 0 ]; then
    echo "Failed to set the UserShell."
    return 1
    fi
    # Create Home directory
    if [ -e "/System/Library/User Template/${8}.lproj/" ]; then
    /usr/bin/ditto "/System/Library/User Template/${8}.lproj/" "${targetVol}/Users/${3}"
    else
    /usr/bin/ditto "/System/Library/User Template/English.lproj/" "${targetVol}/Users/${3}"
    fi
    if [ $? != 0 ]; then
    echo "Failed to copy the User Template."
    return 1
    fi
    /usr/sbin/chown -R $i:$i "${targetVol}/Users/${3}"
    if [ $? != 0 ]; then
    echo "Failed to set ownership on the User folder."
    return 1
    fi
    # Copies a list of files (full paths contained in the file at $1) from source to the path specified in $2
    CopyEntriesFromFileToPath()
    local theFile="$1"
    local theDest="$2"
    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}" "${theDest}/${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Copies a list of packages (full path, destination pairs contained in the file at $1) from source to .../System/Installation/Packages/
    CopyPackagesWithDestinationsFromFile()
    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
    read SUB_PATH
    /usr/bin/ditto $opt "${FILE}" "${mountPoint}/Packages/${SUB_PATH}${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Create an installer package in ${1} wrapping the supplied script ${2}
    CreateInstallPackageForScript()
    local tempDir="$1"
    local scriptPath="$2"
    local scriptName=`basename "${scriptPath}"`
    local entryDir=`pwd`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Create installer for script ${scriptName}"
    opt="-v"
    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" || return 1
    /bin/mkdir $opt "${tempDir}/emptyDir" || return 1
    # Create Archive.pax.gz
    cd "${tempDir}/emptyDir"
    /bin/pax -w -x cpio -f "${tempDir}/${scriptName}.pkg/Contents/Archive.pax" .
    /usr/bin/gzip "${tempDir}/${scriptName}.pkg/Contents/Archive.pax"
    cd "${entryDir}"
    # Create the Archive.bom file
    /usr/bin/mkbom "${tempDir}/emptyDir/" "${tempDir}/${scriptName}.pkg/Contents/Archive.bom" || return 1
    # 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.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"
    # clean up
    /bin/rm -r "${tempDir}/emptyDir"
    return 0
    # Validate or create the requested directory
    CreateOrValidatePath()
    local targetDir="$1"
    if [ ! -d "${targetDir}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${targetDir}"
    fi
    /bin/mkdir -p "${targetDir}" || return 1
    fi
    # If any exist, apply any user accounts
    CreateUserAccounts()
    # $1 volume whose local node database to modify
    local count="${#userFullName[*]}"
    local targetVol="${1}"
    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 "${targetVol}" "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassword[$index]}" "${userPassHint[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
    if [ $? != 0 ]; then
    echo "Failed to create the User '${userUnixName[$index]}'."
    return 1
    fi
    #suppress the Apple ID request
    DisableAppleIDRequestForUser "${targetVol}" "${userUnixName[$index]}"
    done
    # "touch"
    /usr/bin/touch "${targetVol}/private/var/db/.AppleSetupDone"
    /usr/bin/touch "${targetVol}/Library/Receipts/.SetupRegComplete"
    fi
    # retry the hdiutil detach until we either time out or it succeeds
    retry_hdiutil_detach()
    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()
    local theMount="${1}"
    local mountLoc=`mount | grep "${theMount}"`
    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 "${theMount}"
    fi
    fi
    # Finally detach the mount (if it's actually mounted) and dispose the mountPoint directory
    if [ "${mountLoc}" != "" ]; then
    /usr/bin/hdiutil detach "${theMount}" || retry_hdiutil_detach "${theMount}" || return 1
    fi
    /bin/rmdir "${theMount}" || return 1
    return 0
    # Turn off the Apple ID request that happens on first boot after installing the OS
    DisableAppleIDRequestForUser()
    local targetUserLib="${1}/Users/${2}/Library"
    # Only do this if the file doesn't exist
    if [ ! -e "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Disabling Apple ID request for user '${2}'"
    fi
    /usr/libexec/PlistBuddy -c "Add :DidSeeCloudSetup bool 1" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :LastSeenCloudProductVersion string 10.8" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    fi
    return 0
    # 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"
    opt="-v"
    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" || return 1
    if [ -e "${srcVol}/usr/sbin/installer" ]; then
    /usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 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/ssh_host_key
    HostKey /private/var/tmp/ssh_host_rsa_key
    HostKey /private/var/tmp/ssh_host_dsa_key
    END
    fi
    fi
    return 0
    # If it exists, install the sharing names and/or directory binding support to the install image
    HandleNetBootClientHelper()
    local tempDir="${1}"
    local targetVol="${2}"
    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" "${targetVol}/etc/bindingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
    /bin/chmod 644 "${targetVol}/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" "${targetVol}/etc/sharingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
    fi
    if [ -e  "${tempDir}/NetBootClientHelper" ]; then
    /usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
    /bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
    /usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    /bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    # finally, make sure it isn't disabled...
    /usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${targetVol}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
    fi
    return 0
    # If any exist, install configuration profiles to the install image
    InstallConfigurationProfiles()
    local tempDir="${1}"
    local targetVol="${2}"
    local profilesDir="${targetVol}/var/db/ConfigurationProfiles"
    if [ -e  "${tempDir}/configProfiles.txt" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Configuration Profiles"
    fi
    /bin/mkdir -p "${profilesDir}/Setup" || return 1
    # Make sure the perms are correct
    /usr/sbin/chown root:wheel "${profilesDir}"
    /bin/chmod 755 "${profilesDir}"
    /usr/sbin/chown root:wheel "${profilesDir}/Setup"
    /bin/chmod 755 "${profilesDir}/Setup"
    /usr/bin/touch "${profilesDir}/.profilesAreInstalled"
    CopyEntriesFromFileToPath "${tempDir}/configProfiles.txt" "${profilesDir}/Setup" || return 1
    # Enable MCX debugging
    if [ 1 == 1 ]; then
    if [ -e  "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" ]; then
    /usr/libexec/PlistBuddy -c "Delete :debugOutput" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Delete :collateLogs" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    /usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    fi
    # Converts a list of scripts (full paths contained in the file at $1) into packages in $3
    InstallScriptsFromFile()
    local tempDir="${1}"
    local theFile="${2}"
    local targetDir="${3}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Converting scripts into install packages"
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    # make an installer package out of the script
    CreateInstallPackageForScript "$tempDir" "${FILE}" || return 1
    # copy the resulting package to the Packages directory
    local leafName=`basename "${FILE}"`
    /usr/bin/ditto $opt "${tempDir}/${leafName}.pkg" "${targetDir}/${leafName}.pkg" || return 1
    # clean up
    /bin/rm -r "${tempDir}/${leafName}.pkg"
    fi
    done < "${theFile}"
    return 0
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PostFlightDestination()
    local tempDir="${1}"
    local destDir="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Performing post install cleanup"
    opt="-v"
    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 "${mountPoint}"
    if [ $? != 0 ]; then
    echo "Failed to detach and clean up the mount at '${mountPoint}'."
    return 1
    fi
    echo "Correcting permissions. ${ownershipInfoKey} $destDir"
    /usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
    # 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
    opt="-v"
    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 [ -e "$srcVol/private/var/vm/sleepimage" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing sleepimage on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/sleepimage"
    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/*" > /dev/null 2>&1
    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/*" > /dev/null 2>&1
    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/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/dev" ]; then
    /bin/rm $opt "$srcVol/dev/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/run" ]; then
    /bin/rm -r $opt "$srcVol/private/var/run/*" > /dev/null 2>&1
    fi
    # Copy kernel and build the kext cache on the boot image
    PrepareKernelAndKextCache()
    local srcDir="$1"
    local destDir="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Preparing the kernel and kext cache for the boot image"
    opt="-v"
    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 "${srcDir}" || return 1
    # Copy the i386 and, if it exists, the x86_64 architecture
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing the kext cache to the boot image"
    fi
    # make sure this doesn't exist
    if [ -e "${destDir}/i386" ]; then
    /bin/rm -rf "${destDir}/i386"
    fi
    # Install kextcaches to the nbi folder
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating a kernelcache for the boot shell"
    fi
    /bin/mkdir -p $opt "${destDir}/i386/x86_64" || return 1
    /usr/sbin/kextcache -arch x86_64 -L -N -S -z -K "${srcDir}/mach_kernel" -c "${destDir}/i386/x86_64/kernelcache" "${srcDir}/System/Library/Extensions" || return 1
    # 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"
    opt="-v"
    fi
    # Copy the boot.efi to the booter shell
    if [ -e "${mountPoint}/System/Library/CoreServices/boot.efi" ]; then
    /usr/bin/ditto $opt "${mountPoint}/System/Library/CoreServices/boot.efi" "${destDir}/i386/booter" || return 1
    else
    /usr/bin/ditto $opt "${srcVol}/System/Library/CoreServices/boot.efi" "${destDir}/i386/booter" || return 1
    fi
    # Unlock the file so we can change its owner later
    chflags nouchg "${destDir}/i386/booter"
    # Copy the PlatformSupport.plist file
    if [ -e "${mountPoint}/System/Library/CoreServices/PlatformSupport.plist" ]; then
    /usr/bin/ditto $opt "${mountPoint}/System/Library/CoreServices/PlatformSupport.plist" "${destDir}/i386/PlatformSupport.plist" || return 1
    else
    /usr/bin/ditto $opt "${srcVol}/System/Library/CoreServices/PlatformSupport.plist" "${destDir}/i386/PlatformSupport.plist" || return 1
    fi
    # If it exists, install the partitioning application and data onto the install image
    ProcessAutoPartition()
    local tempDir="$1"
    local opt=""
    local targetDir=""
    if [ -e "$tempDir/PartitionInfo.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    # Determine if this is an install source, or a restore source
    if [ -d "${mountPoint}/Packages" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Partitioning application and data to install image"
    fi
    targetDir="${mountPoint}/Packages"
    elif [ -d "${mountPoint}/System/Installation/Packages" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Partitioning application and data to restore image"
    fi
    targetDir="${mountPoint}/System/Installation/Packages"
    else
    echo "There doesn't appear to be either an install or restore source mounted at ${mountPoint}"
    return 1
    fi
    # Create the Extras directory if it doesn't exist
    if [ ! -d "${targetDir}/Extras" ]; then
    /bin/mkdir "${targetDir}/Extras"
    fi
    targetDir="${targetDir}/Extras"
    /usr/bin/ditto $opt "$tempDir/PartitionInfo.plist" "${targetDir}/PartitionInfo.plist" || return 1
    /usr/bin/ditto $opt "$tempDir/AutoPartition.app" "${targetDir}/AutoPartition.app" || return 1
    fi
    return 0
    # If it exists, install the minstallconfig.xml onto the install image
    ProcessMinInstall()
    local tempDir="$1"
    local opt=""
    local targetDir="${mountPoint}/Packages/Extras"
    if [ -e "$tempDir/minstallconfig.xml" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing minstallconfig.xml to install image"
    opt="-v"
    fi
    /usr/bin/ditto $opt "$tempDir/minstallconfig.xml" "${targetDir}/minstallconfig.xml" || return 1
    /usr/sbin/chown root:wheel "${targetDir}/minstallconfig.xml"
    /bin/chmod 644 "${targetDir}/minstallconfig.xml"
    fi
    return 0
    # 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"
    opt="-v"
    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
    # Make a tempdir to mount the image on
    mountPoint=`mktemp -d "/tmp/mnt.XXXXXXXX"`
    mktemp -d "/tmp/mnt.XXXXXXXX"
    ++ mktemp -d /tmp/mnt.XXXXXXXX
    + mountPoint=/tmp/mnt.7E4iD6mQ
    sourceMount=""
    + sourceMount=
    crfsErrExit()
    echo "Execution of '`basename \"${0}\"`' failed. Cleaning up."
    # detach the disk and remove the mount folder
    DetachAndRemoveMount "${mountPoint}"
    # detach the mounted source, if necessary
    if [ "${sourceMount}" != "" ] ; then
    DetachAndRemoveMount "${sourceMount}"
    fi
    # Remove the items we created
    /bin/rm -r "$destPath/i386" > /dev/null 2>&1
    /bin/rm "$destPath/$dmgTarget.dmg" > /dev/null 2>&1
    /bin/rm "$destPath/System.dmg" > /dev/null 2>&1
    # Finally, remove the directory IF empty
    /bin/rmdir "$destPath"
    exit 1
    InstallNetBootClientHelper()
    local tempDir="${1}"
    local destDir="${mountPoint}/Packages/Extras"
    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" || return 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" || return 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" || return 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" || return 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" || return 1
    /usr/sbin/chown root:wheel "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
    /bin/chmod 555 "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
    return 0
    InstallBaseSystemToShell()
    local baseSystemDMG="${1}"
    local shellMount="${2}"
    local tempDir=`/usr/bin/dirname "${1}"`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    opt="-v"
    echo "Copying Base System bits to the boot shell image"
    fi
    baseMount=`mktemp -d "/tmp/mnt_bs.XXXXXXXX"`
    /usr/bin/hdiutil attach "${baseSystemDMG}" -noverify -owners on -nobrowse -noautoopen -mountpoint "${baseMount}" -quiet || return 1
    # Copy the boot.efi and SystemVersion.plist out to the shell dmg
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/boot.efi" "${shellMount}/boot.efi" || return 1
    chflags nouchg "${shellMount}/boot.efi"
    /bin/mkdir -p "${shellMount}/usr/standalone/i386" || return 1
    /bin/ln "${shellMount}/boot.efi" "${shellMount}/usr/standalone/i386/boot.efi" || return 1
    /bin/mkdir -p "${shellMount}/System/Library/CoreServices" || return 1
    /bin/ln "${shellMount}/boot.efi" "${shellMount}/System/Library/CoreServices/boot.efi" || return 1
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/SystemVersion.plist" "${shellMount}/System/Library/CoreServices/SystemVersion.plist" || return 1
    # stash some things we need for later
    /usr/bin/ditto $opt "${baseMount}/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache" "${tempDir}/kernelcache" || return 1
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/com.apple.recovery.boot/PlatformSuppo rt.plist" "${tempDir}/PlatformSupport.plist" || return 1
    # Clean up
    /usr/bin/hdiutil detach "${baseMount}" || retry_hdiutil_detach "${baseMount}" || return 1
    /bin/rmdir "${baseMount}"
    theDmg=`basename "${baseSystemDMG}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Copying ${theDmg} to the boot shell."
    fi
    /usr/bin/ditto $debug_opt "${baseSystemDMG}" "${shellMount}/${theDmg}"
    return 0
    # 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
    # Prepare the destination
    CreateOrValidatePath "${destPath}" || crfsErrExit
    + CreateOrValidatePath '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    + local 'targetDir=/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    + '[' '!' -d '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi' ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Creating working path at /Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    Creating working path at /Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi
    + /bin/mkdir -p '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    # Source in our image building commands
    . "${1}/buildCommands.sh"
    + . /tmp/niutemp.rDvE48RI/buildCommands.sh
    '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/asrFromVolume.sh' "/tmp/niutemp.rDvE48RI" "/Volumes/Macintosh HD" "System" || exit 1
    ++ '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/asrFromVolume.sh' /tmp/niutemp.rDvE48RI '/Volumes/Macintosh HD' System
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    # variables we will need
    created_dest="NO"
    + created_dest=NO
    afvErrExit()
    echo "Execution of '`basename \"${0}\"`' failed. Cleaning up."
    # detach the disk and remove the mount folder
    if [ "${created_dest}" == "YES" ]; then
    /bin/rm -r "${destPath}"
    fi
    exit 1
    retrieveBaseSystemDMG()
    local tempDir="${1}"
    local opt=""
    if [ "${potentialRecoveryDevice}" != "" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Retrieving BaseSystem bits from Recovery HD"
    opt="-v"
    fi
    recoveryMount=`mktemp -d "/tmp/mnt_rp.XXXXXXXX"`
    /usr/sbin/diskutil mount readOnly -mountPoint "${recoveryMount}" "${potentialRecoveryDevice}" || return 1
    # Now make sure this is what was expected
    if [ -e "${recoveryMount}/com.apple.recovery.boot/BaseSystem.dmg" ]; then
    /usr/bin/ditto $opt "${recoveryMount}/com.apple.recovery.boot/BaseSystem.dmg" "${tempDir}/BaseSystem.dmg" || return 1
    /usr/bin/ditto $opt "${recoveryMount}/com.apple.recovery.boot/BaseSystem.chunklist" "${tempDir}/BaseSystem.chunklist"
    fi
    /usr/sbin/diskutil unmount "${potentialRecoveryDevice}" || return 1
    /bin/rmdir "${recoveryMount}"
    fi
    return 0
    # Insure the working path (dmg destination) exists
    if [ ! -d "${destPath}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${destPath}"
    fi
    /bin/mkdir -p "${destPath}" || afvErrExit
    created_dest="YES"
    fi
    + '[' '!' -d '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi' ']'
    # If the volume source is the boot drive we have an asr:// type source
    if [ "${2}" == "/" ]; then
    # Create an empty image to skip the ASR volume creation
    /usr/bin/touch "${destPath}/${3}.dmg"
    # Set aside the needed BaseSystem.dmg
    retrieveBaseSystemDMG "${1}" || afvErrExit
    fi
    + '[' '/Volumes/Macintosh HD' == / ']'
    # Look for an existing System.dmg
    if [ ! -e "${destPath}/${3}.dmg" ]; then
    # Didn't find one, so create it from volume source
    ${1}/makeNetRestoreFromItem.sh "${1}" "${2}" "${3}" || afvErrExit
    fi
    + '[' '!' -e '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi/System.dmg' ']'
    + /tmp/niutemp.rDvE48RI/makeNetRestoreFromItem.sh /tmp/niutemp.rDvE48RI '/Volumes/Macintosh HD' System
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    . "${1}/createCommon.sh"
    + . /tmp/niutemp.rDvE48RI/createCommon.sh
    # createCommon.sh
    # Common functionality for the Image creation process.
    # sourced in by the various SIU scripts
    # Copyright © 2007-2012 Apple Inc. All rights reserved.
    # Using dscl, create a user account
    AddLocalUser()
    # $1 volume whose local node database to modify
    # $2 long name
    # $3 short name
    # $4 isAdminUser key
    # $5 password data
    # $6 password hint
    # $7 user picture path
    # $8 Language string
    local databasePath="/Local/Default/Users/${3}"
    local targetVol="${1}"
    # Find a free UID between 501 and 599
    for ((i=501; i<600; i++)); do
    output=`/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -search /Local/Default/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 "${targetVol}/var/db/dslocal/nodes/Default" localonly -create $databasePath
    if [ $? != 0 ]; then
    echo "Failed to create '${databasePath}'."
    return 1
    fi
    # Add long name
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${2}"
    if [ $? != 0 ]; then
    echo "Failed to set the RealName."
    return 1
    fi
    # Set up the users group information
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20
    if [ $? != 0 ]; then
    echo "Failed to set the PrimaryGroupID."
    return 1
    fi
    # Add some additional stuff if the user is an admin
    if [ "${4}" == 1 ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/admin" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the admin group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserveradm" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserveradm group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserverusr" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserverusr group."
    return 1
    fi
    fi
    # Add UniqueID
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i}
    if [ $? != 0 ]; then
    echo "Failed to set the UniqueID."
    return 1
    fi
    # Add Home Directory entry
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath NFSHomeDirectory /Users/${3}
    if [ $? != 0 ]; then
    echo "Failed to set the NFSHomeDirectory."
    fi
    if [ "${6}" != "" ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath AuthenticationHint "${6}"
    if [ $? != 0 ]; then
    echo "Failed to set the AuthenticationHint."
    return 1
    fi
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${7}"
    if [ $? != 0 ]; then
    echo "Failed to set the picture."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -passwd $databasePath "${5}"
    if [ $? != 0 ]; then
    echo "Failed to set the passwd."
    return 1
    fi
    # Add shell
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash"
    if [ $? != 0 ]; then
    echo "Failed to set the UserShell."
    return 1
    fi
    # Create Home directory
    if [ -e "/System/Library/User Template/${8}.lproj/" ]; then
    /usr/bin/ditto "/System/Library/User Template/${8}.lproj/" "${targetVol}/Users/${3}"
    else
    /usr/bin/ditto "/System/Library/User Template/English.lproj/" "${targetVol}/Users/${3}"
    fi
    if [ $? != 0 ]; then
    echo "Failed to copy the User Template."
    return 1
    fi
    /usr/sbin/chown -R $i:$i "${targetVol}/Users/${3}"
    if [ $? != 0 ]; then
    echo "Failed to set ownership on the User folder."
    return 1
    fi
    # Copies a list of files (full paths contained in the file at $1) from source to the path specified in $2
    CopyEntriesFromFileToPath()
    local theFile="$1"
    local theDest="$2"
    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}" "${theDest}/${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Copies a list of packages (full path, destination pairs contained in the file at $1) from source to .../System/Installation/Packages/
    CopyPackagesWithDestinationsFromFile()
    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
    read SUB_PATH
    /usr/bin/ditto $opt "${FILE}" "${mountPoint}/Packages/${SUB_PATH}${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Create an installer package in ${1} wrapping the supplied script ${2}
    CreateInstallPackageForScript()
    local tempDir="$1"
    local scriptPath="$2"
    local scriptName=`basename "${scriptPath}"`
    local entryDir=`pwd`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Create installer for script ${scriptName}"
    opt="-v"
    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" || return 1
    /bin/mkdir $opt "${tempDir}/emptyDir" || return 1
    # Create Archive.pax.gz
    cd "${tempDir}/emptyDir"
    /bin/pax -w -x cpio -f "${tempDir}/${scriptName}.pkg/Contents/Archive.pax" .
    /usr/bin/gzip "${tempDir}/${scriptName}.pkg/Contents/Archive.pax"
    cd "${entryDir}"
    # Create the Archive.bom file
    /usr/bin/mkbom "${tempDir}/emptyDir/" "${tempDir}/${scriptName}.pkg/Contents/Archive.bom" || return 1
    # 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.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"
    # clean up
    /bin/rm -r "${tempDir}/emptyDir"
    return 0
    # Validate or create the requested directory
    CreateOrValidatePath()
    local targetDir="$1"
    if [ ! -d "${targetDir}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${targetDir}"
    fi
    /bin/mkdir -p "${targetDir}" || return 1
    fi
    # If any exist, apply any user accounts
    CreateUserAccounts()
    # $1 volume whose local node database to modify
    local count="${#userFullName[*]}"
    local targetVol="${1}"
    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 "${targetVol}" "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassword[$index]}" "${userPassHint[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
    if [ $? != 0 ]; then
    echo "Failed to create the User '${userUnixName[$index]}'."
    return 1
    fi
    #suppress the Apple ID request
    DisableAppleIDRequestForUser "${targetVol}" "${userUnixName[$index]}"
    done
    # "touch"
    /usr/bin/touch "${targetVol}/private/var/db/.AppleSetupDone"
    /usr/bin/touch "${targetVol}/Library/Receipts/.SetupRegComplete"
    fi
    # retry the hdiutil detach until we either time out or it succeeds
    retry_hdiutil_detach()
    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()
    local theMount="${1}"
    local mountLoc=`mount | grep "${theMount}"`
    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 "${theMount}"
    fi
    fi
    # Finally detach the mount (if it's actually mounted) and dispose the mountPoint directory
    if [ "${mountLoc}" != "" ]; then
    /usr/bin/hdiutil detach "${theMount}" || retry_hdiutil_detach "${theMount}" || return 1
    fi
    /bin/rmdir "${theMount}" || return 1
    return 0
    # Turn off the Apple ID request that happens on first boot after installing the OS
    DisableAppleIDRequestForUser()
    local targetUserLib="${1}/Users/${2}/Library"
    # Only do this if the file doesn't exist
    if [ ! -e "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Disabling Apple ID request for user '${2}'"
    fi
    /usr/libexec/PlistBuddy -c "Add :DidSeeCloudSetup bool 1" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :LastSeenCloudProductVersion string 10.8" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    fi
    return 0
    # 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"
    opt="-v"
    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" || return 1
    if [ -e "${srcVol}/usr/sbin/installer" ]; then
    /usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 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/ssh_host_key
    HostKey /private/var/tmp/ssh_host_rsa_key
    HostKey /private/var/tmp/ssh_host_dsa_key
    END
    fi
    fi
    return 0
    # If it exists, install the sharing names and/or directory binding support to the install image
    HandleNetBootClientHelper()
    local tempDir="${1}"
    local targetVol="${2}"
    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" "${targetVol}/etc/bindingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
    /bin/chmod 644 "${targetVol}/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" "${targetVol}/etc/sharingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
    fi
    if [ -e  "${tempDir}/NetBootClientHelper" ]; then
    /usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
    /bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
    /usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    /bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    # finally, make sure it isn't disabled...
    /usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${targetVol}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
    fi
    return 0
    # If any exist, install configuration profiles to the install image
    InstallConfigurationProfiles()
    local tempDir="${1}"
    local targetVol="${2}"
    local profilesDir="${targetVol}/var/db/ConfigurationProfiles"
    if [ -e  "${tempDir}/configProfiles.txt" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Configuration Profiles"
    fi
    /bin/mkdir -p "${profilesDir}/Setup" || return 1
    # Make sure the perms are correct
    /usr/sbin/chown root:wheel "${profilesDir}"
    /bin/chmod 755 "${profilesDir}"
    /usr/sbin/chown root:wheel "${profilesDir}/Setup"
    /bin/chmod 755 "${profilesDir}/Setup"
    /usr/bin/touch "${profilesDir}/.profilesAreInstalled"
    CopyEntriesFromFileToPath "${tempDir}/configProfiles.txt" "${profilesDir}/Setup" || return 1
    # Enable MCX debugging
    if [ 1 == 1 ]; then
    if [ -e  "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" ]; then
    /usr/libexec/PlistBuddy -c "Delete :debugOutput" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Delete :collateLogs" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    /usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    fi
    # Converts a list of scripts (full paths contained in the file at $1) into packages in $3
    InstallScriptsFromFile()
    local tempDir="${1}"
    local theFile="${2}"
    local targetDir="${3}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Converting scripts into install packages"
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    # make an installer package out of the script
    CreateInstallPackageForScript "$tempDir" "${FILE}" || return 1
    # copy the resulting package to the Packages directory
    local leafName=`basename "${FILE}"`
    /usr/bin/ditto $opt "${tempDir}/${leafName}.pkg" "${targetDir}/${leafName}.pkg" || return 1
    # clean up
    /bin/rm -r "${tempDir}/${leafName}.pkg"
    fi
    done < "${theFile}"
    return 0
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PostFlightDestination()
    local tempDir="${1}"
    local destDir="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Performing post install cleanup"
    opt="-v"
    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 "${mountPoint}"
    if [ $? != 0 ]; then
    echo "Failed to detach and clean up the mount at '${mountPoint}'."
    return 1
    fi
    echo "Correcting permissions. ${ownershipInfoKey} $destDir"
    /usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
    # 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
    opt="-v"
    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 [ -e "$srcVol/private/var/vm/sleepimage" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing sleepimage on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/sleepimage"
    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/*" > /dev/null 2>&1
    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/*" > /dev/null 2>&1
    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/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/dev" ]; then
    /bin/rm $opt "$srcVol/dev/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/run" ]; then
    /bin/rm -r $opt "$srcVol/private/var/run/*" > /dev/null 2>&1
    fi
    # Copy kernel and build the kext cache on the boot image
    PrepareKernelAndKextCache()
    local srcDir="$1"
    local destDir="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Preparing the kernel and kext cache for the boot image"
    opt="-v"
    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 "${srcDir}" || return 1
    # Copy the i386 and, if it exists, the x86_64 architecture
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing the kext cache to the boot image"
    fi
    # make sure this doesn't exist
    if [ -e "${destDir}/i386" ]; then
    /bin/rm -rf "${destDir}/i386"
    fi
    # Install kextcaches to the nbi folder

    After running your command, and using the mounted image as my source for creating the NetRestore image, SIU was able to complete the first two steps, but failed on the rest.  It was able to complete "Creating Image From Source", and "Preparing Image For Restore", but it fails on "Creating Bootable System".
    I've copied and pasted the end of the error log.  Any idea what caused the Bootable System from successfully being created?
    PERCENT:-1.000000
    Finalizing disk image.
    created: /Users/morgan/Desktop/30sept.nbi/System.dmg
    # Set aside the needed BaseSystem.dmg
    retrieveBaseSystemDMG "${1}" || mnrfiErrExit
    + retrieveBaseSystemDMG /tmp/niutemp.3PZq4yzF
    + local tempDir=/tmp/niutemp.3PZq4yzF
    + local opt=
    + '[' disk2s3 '!=' '' ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + opt=-v
    + echo 'Retrieving BaseSystem bits from Recovery HD'
    Retrieving BaseSystem bits from Recovery HD
    mktemp -d "/tmp/mnt_rp.XXXXXXXX"
    ++ mktemp -d /tmp/mnt_rp.XXXXXXXX
    + recoveryMount=/tmp/mnt_rp.75pVTRHs
    + /usr/sbin/diskutil mount readOnly -mountPoint /tmp/mnt_rp.75pVTRHs disk2s3
    Volume Recovery HD on disk2s3 mounted
    + '[' -e /tmp/mnt_rp.75pVTRHs/com.apple.recovery.boot/BaseSystem.dmg ']'
    + /usr/sbin/diskutil unmount disk2s3
    Volume Recovery HD on disk2s3 unmounted
    + /bin/rmdir /tmp/mnt_rp.75pVTRHs
    + return 0
    # update progress information
    echo "${progressPrefix}_preparingASR_"
    + echo _progress_preparingASR_
    # "Scan the image for restore"
    asr_opt=""
    + asr_opt=
    if [ "${skipReorderingKey}" == 1 ] ; then
    asr_opt="--nostream"
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Preparing image for restore without multicast reordering"
    fi
    else
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Preparing image for restore"
    fi
    fi
    + '[' 0 == 1 ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Preparing image for restore'
    Preparing image for restore
    /usr/sbin/asr imagescan --source "${destPath}/${dmgContainer}.dmg" $asr_opt || mnrfiErrExit
    + /usr/sbin/asr imagescan --source /Users/morgan/Desktop/30sept.nbi/System.dmg
    Checksumming partition of size 63 blocks...done
    Block checksum: ....10....20....30....40....50....60....70....80....90....100
    Reordering:     ....10....20....30....40....50....60....70....80....90....100asr: successfully scanned image "/Users/morgan/Desktop/30sept.nbi/System.dmg"
    # update progress information
    echo "${progressPrefix}_creatingInstallSystem_"
    + echo _progress_creatingInstallSystem_
    restoreSource="${sourceVol}"
    + restoreSource='/Volumes/Macintosh HD'
    # If this is a restore from install media, mount that as our source
    if [ "${restoreSource}" == "(installMedia)" ] ; then
    sourceMount=`mktemp -d "/tmp/mnt_src.XXXXXXXX"`
    /usr/bin/hdiutil attach "${destPath}/System.dmg" -noverify -owners on -nobrowse -noautoopen -mountpoint "${sourceMount}" -quiet || crfsErrExit
    restoreSource="${sourceMount}"
    fi
    + '[' '/Volumes/Macintosh HD' == '(installMedia)' ']'
    # If we don't have a BaseSystem.dmg available to us fail now.
    if [ ! -e "${1}/BaseSystem.dmg" ]; then
    echo "There is no BaseSystem.dmg (Recovery HD) associated with the source ${restoreSource}."
    crfsErrExit
    fi
    + '[' '!' -e /tmp/niutemp.3PZq4yzF/BaseSystem.dmg ']'
    + echo 'There is no BaseSystem.dmg (Recovery HD) associated with the source /Volumes/Macintosh HD.'
    There is no BaseSystem.dmg (Recovery HD) associated with the source /Volumes/Macintosh HD.
    + crfsErrExit
    basename "${0}"
    ++ basename '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/createRestoreFromSources.sh'
    + echo 'Execution of '\''createRestoreFromSources.sh'\'' failed. Cleaning up.'
    Execution of 'createRestoreFromSources.sh' failed. Cleaning up.
    + DetachAndRemoveMount /tmp/mnt.nfN5nVgM
    + local theMount=/tmp/mnt.nfN5nVgM
    mount | grep "${theMount}"
    ++ mount
    ++ grep /tmp/mnt.nfN5nVgM
    + local mountLoc=
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Detaching disk image'
    Detaching disk image
    + '[' DEBUG == DEBUG ']'
    + /usr/sbin/lsof +fg /tmp/mnt.nfN5nVgM
    + '[' '' '!=' '' ']'
    + /bin/rmdir /tmp/mnt.nfN5nVgM
    + return 0
    + '[' '' '!=' '' ']'
    + /bin/rm -r /Users/morgan/Desktop/30sept.nbi/i386
    + /bin/rm /Users/morgan/Desktop/30sept.nbi/NetInstall.dmg
    + /bin/rm /Users/morgan/Desktop/30sept.nbi/System.dmg
    + /bin/rmdir /Users/morgan/Desktop/30sept.nbi
    + exit 1
    Script is done.
    Bridge exited with status 256
    Failed to create image from restore source.
    An unknown error has occurred.
    An unknown error has occurred.
    Image creation process finished...
    Stopping image creation.
    Image creation failed.
    Thanks.

  • Offline Servicing Keeps Failing SCCM 2012 SP1

    Has any one seen this?  Below is my log file.
    The Schedule with ID 16777266 will be run now. It's run time is at Wed Jan 23 21:25:19 2013 Eastern Standard Time SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 5468 (0x155C)
    Schedule with ID 16777266 is active SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 5468 (0x155C)
    Schedule processing thread started. ThreadID = 0x270 (624) SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 5468 (0x155C)
    1 Schedule(s) are marked for RunNow by the administrator SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 624 (0x0270)
    1 Schedule(s) are scheduled to be run at this time SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 624 (0x0270)
    Processing started for Schedule with ID 16777266 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 624 (0x0270)
    STATMSG: ID=7900 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=B04SCCM.gstboces.org SITE=GSB PID=2780 TID=624 GMTDATE=Thu Jan 24 02:25:19.490 2013 ISTR0="16777266" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:19 PM 624 (0x0270)
    Initialization of schedule processing succeeded SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    There is an image associated with this schedule. SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    Total number of individual updates to be installed is 49. SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    STATMSG: ID=7903 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=B04SCCM.gstboces.org SITE=GSB PID=2780 TID=624 GMTDATE=Thu Jan 24 02:25:22.682 2013 ISTR0="GSB00118" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    Copy image ( ID GSB00118, size 6591 MB ) SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    copying file from '\\b04conmgr\images\w8baseTSTX64.wim' SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
          to 'C:\ConfigMgr_OfflineImageServicing\GSB00118\w8baseTSTX64.wim' .... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:25:22 PM 624 (0x0270)
    Copying (25% complete)... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:26:18 PM 624 (0x0270)
    Copying (50% complete)... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:27:05 PM 624 (0x0270)
    Copying (75% complete)... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:27:49 PM 624 (0x0270)
    Copying (100% complete)... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    STATMSG: ID=7905 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=B04SCCM.gstboces.org SITE=GSB PID=2780 TID=624 GMTDATE=Thu Jan 24 02:28:34.068 2013 ISTR0="GSB00118" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    [Schedule ID 16777266] Started processing image package with ID GSB00118 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    STATMSG: ID=7906 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=B04SCCM.gstboces.org SITE=GSB PID=2780 TID=624 GMTDATE=Thu Jan 24 02:28:34.099 2013 ISTR0="GSB00118" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    Image package file with ID GSB00118 contains 1 image(s) SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    Processing image at index 1 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:28:34 PM 624 (0x0270)
    Mounting image at index 1. Image file='C:\ConfigMgr_OfflineImageServicing\GSB00118\w8baseTSTX64.wim', MountDirectory='C:\ConfigMgr_OfflineImageServicing\GSB00118\ImageMountDir', ImageFileType='WIM', Mode='ReadWrite' SMS_OFFLINE_SERVICING_MANAGER 1/23/2013
    9:28:34 PM 624 (0x0270)
    Image OS information : MajorVersionMS = 6, MinorVersionMS = 2, MajorVersionLS = 9200, MinorVersionLS = 16384 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:39:44 PM 624 (0x0270)
    Content '5df26118-a385-425f-ac7b-d6e0c26f5a7a' not found in content library on this site. Software updates should be distributed to this site. SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:39:44 PM 624 (0x0270)
    UnMounting Image (Commit Changes = 0) ... SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:39:44 PM 624 (0x0270)
    Completed processing image package GSB00118. Status = Failed SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Successfully deleted entry from database for schedule ID=16777259 Name="" assigned to ImageID=GSB00118 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Updated history for image package GSB00118 in the database SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Schedule processing failed SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Processing completed for Schedule with ID 16777266 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    STATMSG: ID=7910 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_OFFLINE_SERVICING_MANAGER" SYS=B04SCCM.gstboces.org SITE=GSB PID=2780 TID=624 GMTDATE=Thu Jan 24 02:40:40.929 2013 ISTR0="16777266" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Deleting
    \\?\C:\ConfigMgr_OfflineImageServicing\GSB000A2\ImageMountDir\Program Files\Common Files\SpeechEngines\Microsoft\TTS20\en-US\enu-dsk, FAILED, Win32 Error = 5 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:40 PM 624 (0x0270)
    Failed to remove the staging folder C:\ConfigMgr_OfflineImageServicing, GLE = 5 SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:41 PM 624 (0x0270)
    Schedule processing thread stopped SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:41 PM 624 (0x0270)
    Checking if there are schedule(s) which need to be run at this time. SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:40:41 PM 5468 (0x155C)
    This line in the log seems to be where the process errors out.
    Content '5df26118-a385-425f-ac7b-d6e0c26f5a7a' not found in content library on this site. Software updates should be distributed to this site. SMS_OFFLINE_SERVICING_MANAGER 1/23/2013 9:39:44 PM 624 (0x0270)
    I have looked and this update is deployed and located on the sites distribution points.  I am stumped.  Anyone else see this before.
    Thanks

    Hi yannara
    you're right about getting this error while offline patching my image.
    what I don't understand is the steps to find the KB number?
    on my Software Updates pane the only column with guid I found is Update Unique ID and its guid does not match in anyway from the guids I see in the offlineservicing.log file
    just to be clear, I update Win8.1 x64 image and I created a search criteria with all Windows 8.1 updates and downloaded them to a package on my site.
    Applicability State = INSTALLED, Update Binary = E:\ConfigMgr_OfflineImageServicing\5282016d-a4eb-41fc-97d8-0a5a00e136cc\windows8.1-kb3008242-x64.cab. SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 2:57:13 PM 292 (0x0124)
    No need to apply this update binary since it's already installed. SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 2:57:13 PM 292 (0x0124)
    Content '4e6dbf75-645e-4387-85dc-27bd6db32227' not found in content library on this site. Software updates should be distributed to this site. SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 2:57:13 PM 292 (0x0124)
    UnMounting Image (Commit Changes = 0) ... SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 2:57:13 PM 292 (0x0124)
    Completed processing image package ILP000AB. Status = Failed SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 3:01:57 PM 292 (0x0124)
    Successfully deleted entry from database for schedule ID=50331650 Name="" assigned to ImageID=ILP000AB SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 3:01:57 PM 292 (0x0124)
    Updated history for image package ILP000AB in the database SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 3:01:57 PM 292 (0x0124)
    Schedule processing failed SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 3:01:57 PM 292 (0x0124)
    Processing completed for Schedule with ID 50331658 SMS_OFFLINE_SERVICING_MANAGER 2/18/2015 3:01:57 PM 292 (0x0124)
    notice that my problem is not with KB3008242. it is the one after - which I don't get its number. only the GUID.
    so apparently, I have no way to find this one annoying update from 140 available updates.
    I hope that MS solution is not to deselect  each time updates until I will find it manually
    any solutions please?
    Tamir Levy

  • Tiger 10.4.11 update install reads disk image fails to mount

    i've been trying to download the tiger 10.4.11 upgrade and when i go to open i get the following disc images failed to mount and a reason of item not recognized. i'm at a lose considering ti've downloaded the update several times with my slow dial up and tried disc utilty to correct it, all i want to do is use my new ipod nano but need to upgrade my itunes which means i need to upgrade my software please help pretty frustrated.

    Would the same error occur if the update being downloaded is for an intel based computer and not the PPC, which is what is needed?
    Here's the page for the 10.4.11 combo PPC download
    http://www.apple.com/support/downloads/macosx10411comboupdateppc.html
    Depending also what level of 10.4 you are presently at, downloading smaller combos/increments, may seem time consuming, but actually work better with dial up service. I was once dial up myself, and went through the same difficulty. Also with doing it this way, you would have to repair permissions with each download, and reboot if any were repaired. There would also be numerous security downloads, too.

  • Offline servicing wont work - Failed to remove previously existing staging folder C:\ConfigMgr_OfflineImageServicing\....., GLE = 1168

    Deleting \\?\C:\ConfigMgr_OfflineImageServicing\HAM000E9\ImageMountDir\Program Files\WindowsApps, FAILED, Win32 Error = 5 SMS_OFFLINE_SERVICING_MANAGER 6/11/2014 3:37:31 p.m. 3280 (0x0CD0)
    Failed to remove previously existing staging folder C:\ConfigMgr_OfflineImageServicing\HAM000E9, GLE = 5 SMS_OFFLINE_SERVICING_MANAGER 6/11/2014 3:37:31 p.m. 3280 (0x0CD0)
    Initialization of schedule processing failed SMS_OFFLINE_SERVICING_MANAGER 6/11/2014 3:37:31 p.m. 3280 (0x0CD0)
    Deleting file \\?\C:\ConfigMgr_OfflineImageServicing\HAM00012\ImageMountDir\Windows\winsxs\amd64_microsoft-windows-b..base-serverstandard_31bf3856ad364e35_6.1.7600.16385_none_090a8bf130602695\basebrd.dll, FAILED, Win32 Error = 5 SMS_OFFLINE_SERVICING_MANAGER 6/11/2014 3:37:31 p.m. 3280 (0x0CD0)
    Failed to remove the staging folder C:\ConfigMgr_OfflineImageServicing, GLE = 5 SMS_OFFLINE_SERVICING_MANAGER 6/11/2014 3:37:31 p.m. 3280 (0x0CD0)
    Cant get offline servicing to work
    Have tried rebooting as recommended in other posts and then running DISM /Cleanup-wim , however it still prompts with the above in the offline servivingmgr.log
    Also cant manually delete the folders, need to update my windows 8.1 and server 2012 images. Could this be because my site server that the offline servicing is running 2008 R2?
    Really dont want to have to rebuild and recapture images just so they can have the latter updates....

    "Win32 Error = 5" is "Access Denied"
    A lot of things are possible here, but ultimately it comes down to the account being used and the permissions on the folder. It's possible the permissions have been corrupted. Have you tried resetting them?
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • Cannot load 3.6 - disk image failed to mount - reason: corrupt image

    Tried to load 3.6 and get the msg: disk image failed to mount. Reason: corrupt image.
    == This happened ==
    Every time Firefox opened

    *Firefox 4 versions and later do not run on a PowerPC Mac.
    *Firefox 4 and later require at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/6.0/system-requirements/
    For an unofficial Firefox 4 compatible version (TenFourFox) that runs on PowerPC Macs with OS X 10.4.11 or OS X 10.5.8 you can look at:
    * http://www.floodgap.com/software/tenfourfox/
    * http://tenfourfox.blogspot.com/2011/08/601-now-available.html
    Firefox 3.6.x (Mac OS X 10.4 and later) can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

  • When I download the 3.6.3 version I get a warning pop up saying 'the following disk images failed to mount'. What do I need to do to stop this from happening?

    After downloading the a pop up box called Warning appears with saying 'The following disk images failed to mount' and below that there is a table that has Image with a Firefox 3.6.3 and another field called Reason saying Corrupt image. The current version of firefox I am using is 2.0.0.7
    == This happened ==
    Every time Firefox opened
    == Recently when trying to download a newer version

    Firefox 3.0 and 3.5/6 versions require at least Mac OS X 10.4
    http://www.mozilla.com/en-US/firefox/system-requirements.html - Mozilla Firefox 3.6 System Requirements
    Firefox 2.0.0.20 is the last release that runs on Mac OS X 10.2 and 10.3
    See http://kb.mozillazine.org/Installing_Firefox
    Mac: http://download.mozilla.org/?product=firefox-2.0.0.20&os=osx&lang=en-US

  • I am trying to download Firefox 3.6 to use on my Mac OS X version 10.3.9. Three attempts and I continue to get "mounting failed" and "corrupt image". Help please?

    I am trying to download Firefox 3.6 to use on my Mac OS X version 10.3.9. Three attempts and I continue to get "mounting failed" and "corrupt image". Help please?

    Firefox 3.6 requires at least OS X 10.4, the last version of Firefox that worked on OS X 10.3.9 was Firefox 2.0.0.20 which is available from ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/mac/

  • Disk Imag Failed to mount Reason: No such file or directory

    Hello,
    I've been trying to download firefox and msn messenger for my mac!
    Everytime i try to launch the .dmg it says 'Failed to mount' and the 'reason' is 'No such file or directory'
    This happens with everything i download!
    I dn't know what to do!
    I've searched it, found some soloutions but nothing works!
    Thanks Steve

    I've had this happen before, if I remember correctly it's just because of a corrupt download. Try downloading the .dmg files again and they should work. The other problem is it may be a permissions error. Where are the files located that you're trying to mount? Try putting them in your home directory. My first guess would be a corrupt download though.
    I was suprised to find no information in the support database, or on google for this erorr with disk images.
    Hope this helps.

  • Tried to download Opera Browser 10 and it says disk images failed to mount. reason,not recognized. What do I do to download this browser. using OS 10.4.11 and safari 4.1.3.Thankst sais

    tried to download Opera Browser 10 and it says disk images failed to mount. reason,not recognized. What do I do to download this browser. using OS 10.4.11 and safari 4.1.3.Thankst sais

    These are the requirements for various versions of Opera.
    http://www.opera.com/browser/download/requirements/
    Get the one that matches your Mac's.
    http://www.opera.com/browser/download/?os=mac&list=all
    Peter

  • Disk images failed to mount - codec overrun

    Hi,
    So after searching through the related posts I have been unable to correct my probelm, which is:
    I am unable to open some .dmg files. I have tried to open three different .dmg files from a variety of sources and they all return the same error:
    disk images failed to mount - codec overrun
    However, I was able to update my system to 10.4.7 using the updater. This did not solve the problem. I then tried load the combo version of 10.4.7 as suggested in a different post and while it didn't load (I accidentally grabbed the powerPC version) it was able to open the .dmg and look in them.
    Disk Utility is unable to attach the three that won't open. The first two Disk Utility was unable to verify or repair. The last (a cars game demo) was successfully verified but still came up with the codec overrun error when I tried to attach it. Finally I have tried removing the following two files and then restarting, to no effect.
    /System/Library/Extension.kextcache
    /System/Library/Caches/com.apple.kernalcaches/
    I'd appreciate any help offered. A search on codec overrun was of no use. I searched for "mount failed disk images" and variations of that to find what I have already tried.
    Thanks
    Pete

    I am havin the same problems. codec overrun
    I am trying to download stuffit from their site so I can open a program for school.
    I tried to download the dmg file from the apple site but was given the same error. Codec overrun
    Also I attempted to get the updates from the Apple site.......same error.
    So far this computer will not download much of anything without some kind of an error. Essentially this Imac is a $2000 jukebox. It does play music wonderfully.
    My roommate was able to downlad easily from the same internet connection with no problem the windows version of the program from te same site.
    This is a brand new out of the box iMac. 20" 1 gig 250 GB machine. First Mac for me and it is turning into a real headache.
    Any help with the codec overrun would be appreciated.

Maybe you are looking for

  • How to implement start & stop ai triggers when # scans unknown

    I can't seem to find an implementation example for this application. Some are close but seem to have a big gap on close examination. The application is to log an unknown number of samples for a single rotation of a variable speed drum. The drum is co

  • Charecter Mode Report Proble.(Urgent)

    Hi, I am using report 6i. Now i am generating a charecter mode report. Tha report in the Bitmap mode it is generating properly. But the same report in the charecter mode comming STAR in place of Data. When i change the Font size it also now comming P

  • Migrate  ODI 10.1.3.5 to the last version

    Hi, I would like to migrate my ODI 10G (10.1.3.5) to the last version of ODI 11g (11.1.1.7 I think). Do you know if it is possible and if an guide exist? Thanks

  • Display full headers in Mail 8.2

    Hi, i'd like to occasionally be able to display full message headersin Mail V 8.2, as it used to be possible with previouos versions. Any-one with an idea ?

  • Compatibility with 4400 and 5500

    Folks, I have a doubt, there is an existing setup of 4400 series controller. I would like to add more access points , which the current controller cannot accommodate, also client requires redundancy in the solution. I was wondering, if it is possible