Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

System Image Utility 2: create NetRestore Image, failure at Preparing Image

Two new Intel iMacs running 10.6.1.

Booted source machine in target mode. Created image on external FireWire drive. In SUI, selected the source, and chose NetRestore Image.

The created image:

-rw-r--r--@ 1 root staff 9882697406 Sep 30 12:07 System.dmg

--

System Image Utility 2 (SIU), v. 10.6 (438).

Left pane
Sources
Macintosh HD 1 http://that is how SIU interprets the \"Macintosh HD\" mounted volume of the machine I'm imaging (i.e., I'm sure it adds \"1\" to make the name unique).

Right/main pane
Netrestore of master LLCimage
√ Creating Image from Source http://i.e., success
Preparing Image for Restore http://i.e., failure
Creating NetRestore Disk Image http://i.e., failure
Creating Bootable System http://i.e., failure
Copying Source Image http://i.e., failure
Creating NetBoot System http://i.e., failure
Finishing up http://i.e., failure

--

Log:

Starting image creation.
Workflow Started (2009-09-30 10:15:01 -0700)
Starting action: Define Image Source
Finished running action: Define Image Source
Starting action: Create Image
Starting image creation process...

Create NetInstall Image

Initiating NetInstall from Restore Media.

created: /Users/LLC/Desktop/20090930_0948/NetRestore of Macintosh HD 1/System.dmg
Checksumming partition of size 63 blocks...done
Catalog file is too fragmented for restore.
Try "fsck_hfs -r" on writeable copy of the image volume
unable to get UDIF info from "/Users/LLC/Desktop/20090930_0948/NetRestore of Macintosh HD 1/System.dmg" - Bad file descriptor.
asr: image scan failed - Bad file descriptor.
Script is done.

NetInstall creation failed.

Image creation process finished...

Stopping image creation.
Image creation failed.

ACTION ATTEMPTED:

$ sudo fsck_hfs -r System.dmg

System.dmg is not a character device

--

Repaired permissions on source, made sure machine running SIU would not go to sleep, same failure.

Bob

2009 iMacs, Mac OS X (10.6.1)

Posted on Sep 30, 2009 12:42 PM

Reply
41 replies

Oct 1, 2009 4:11 PM in response to Brian Nesse

OK, so I've done this:

$ hdiutil convert "System.dmg" -format UDRW -o "System-rw.dmg"

Then I had to guess at what to call/where to put the shadow:

$ hdiutil attach -mount suppressed "System.dmg" -shadow "System-rw_shadow.dmg"

. . .
/dev/disk4 Apple partitionscheme
/dev/disk4s1 Apple partitionmap
/dev/disk4s2 Apple_HFS

$ fsck_hfs -fry /dev/disk4s2

** The volume Macintosh HD could not be repaired.

Not sure if that is a deal breaker, but moving on...

$ hdiutil detach disk4s2

"disk4" unmounted.
"disk4" ejected.

$ rm "System.dmg"

$ hdiutil convert -format UDZO "System-rw.dmg" -shadow -o "System.dmg"

$ asr imagescan --source "System.dmg" --filechecksum

Checksumming partition of size 63 blocks...done
Catalog file is too fragmented for restore.
Try "fsck_hfs -r" on writeable copy of the image volume
unable to get UDIF info from "</path/>System.dmg" - Bad file descriptor.
asr: image scan failed - Bad file descriptor.

Message was edited by: Bob222

Oct 2, 2009 9:08 AM in response to Bob222

My apologies, I guess that's what I get for putting up info I received from someone else without actually trying it myself first.

Honestly, looking at the man page, I don't see the point of using the -shadow at all. The disk has been converted to read-write, which should allow the fsck_hfs to do its job. I'd just remove all of the -shadow references and try that.

Oct 8, 2009 9:42 AM in response to Bob222

Hey guys, i've been in the same boat for the past week and finally got a workaround. Here are the steps:

1. Create the 10.6.x image from a 10.5.8 client using Disk Utility.
2. Copy the .dmg over to the tool you use to restore(I use DeployStudio, so i just copied it to my Master image folder).
3. Perform restore.

I think a possible issue that i noticed with 10.6.x image creation was that the dmg(6.06GB) size was nearly half a gig less then the dmg(6.55GB) i created using 10.5.8 Disk Utility. I guess 10.6.x disk utility never finishes creating the image(DeployStudio would stop around 80%~), so you are left with a corrupted dmg file or missing files.

Oct 8, 2009 11:22 AM in response to Brian Nesse

That's odd because i wiped out the same iMac last week and performed a FRESH install of 10.6 updated to 10.6.1 with no extra addons and the NetRestore image creation failed with the same exact error message that everyone is experiencing here. The only way i have gotten this to work was with 10.5.8 Disk Utility.

Brian, what iMac model did you create a successful 10.6 image on? I am using the latest model(E8135 2.66GHZ Core 2 Duo w/ Nvidia 9400) shipped by Apple in summer 09.

Message was edited by: droque

Oct 9, 2009 9:53 AM in response to Bob222

Bob, if that were true then i should of been able to create a NetRestore image with a fresh install of 10.6 with nothing touched but it failed the exact same way as my normal image. I believe the issue is caused only on the iMac models. I've yet to find anyone who has successfully created an image on the latest iMac model.

Oct 29, 2009 11:26 AM in response to Bob222

Brian,

I followed your instructions to the t and was able to successfully convert the image to rw format, preform the filesystem check, fix the catalog, convert back to udzo (compressed format), and pass the asr checksum w/o errors. How exactly does the SIU skip the "source image creation" stage? I renamed the image i had to System.dmg but it failed at exactly the same stage with the same error log.

Here is the output I received in terminal after command completion:
__

myserver:FlexImage7.2 root# hdiutil convert "FlexImage7.2.dmg" -format UDRW -o "FlexImage7.2-rw.dmg"
Reading whole disk (Apple_HFS : 0)…
...
Elapsed Time: 32m 19.965s
Speed: 78.5Mbytes/sec
Savings: 0.0%
created: /private/var/root/Documents/FlexImage7.2/FlexImage7.2-rw.dmg
myserver:FlexImage7.2 root# hdiutil attach -mount suppressed -shadow "FlexImage7.2-rw.dmg"
hdiutil: attach: missing image argument
Usage: hdiutil attach [options] <image>
hdiutil attach -help
myserver:FlexImage7.2 root# hdiutil attach -mount suppressed-shadow "FlexImage7.2-rw.dmg"
hdiutil: attach: unknown "-mount" argument
Usage: hdiutil attach [options] <image>
hdiutil attach -help
myserver:FlexImage7.2 root# hdiutil attach -mount suppressed "FlexImage7.2-rw.dmg"
/dev/disk2
myserver:FlexImage7.2 root# fsck_hfs -fry /dev/disk2
** /dev/rdisk2
Executing fsck_hfs (version diskdev_cmds-491~1).
** Checking Journaled HFS Plus volume.
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
** Rechecking volume.
** Checking Journaled HFS Plus volume.
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
Invalid volume file count
(It should be 284405 instead of 249070)
Invalid volume directory count
(It should be 87292 instead of 75136)
Invalid volume free block count
(It should be 37444237 instead of 36755745)
Volume header needs minor repair
(2, 0)
** Repairing volume.
** Rechecking volume.
** Checking Journaled HFS Plus volume.
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume MacHD was repaired successfully.
myserver:FlexImage7.2 root# hdiutil convert -format UDZO "FlexImage7.2-rw.dmg" -shadow -o "FlexImage7.2.dmg"
Preparing imaging engine…
Reading whole disk (Apple_HFS : 0)…
...............................................................................
(CRC32 $8E8551D5: whole disk (Apple_HFS : 0))
Adding resources…
...............................................................................
Elapsed Time: 3m 17.557s
File size: 4581662317 bytes, Checksum: CRC32 $9E258D31
Sectors processed: 311909984, 12540465 compressed
Speed: 31.0Mbytes/sec
Savings: 97.1%
created: /private/var/root/Documents/FlexImage7.2/FlexImage7.2.dmg
myserver:FlexImage7.2 root# asr imagescan --source "FlexImage7.2.dmg" --filechecksum
Block checksum: ....10....20....30....40....50....60....70....80....90....100
File checksum: ....10....20....30....40....50....60....70....80....90....100
asr: successfully scanned image "/private/var/root/Documents/FlexImage7.2/FlexImage7.2.dmg"

___

Note: I initially had my images stored in ~/Documents/, but was unable to get the hdiutil convert -format UDRW command to complete until I isolated the image I was working on in its own directory ( in my case ~/Documents/FlexImage)! In fact I read this thread 4 times and was not made aware of this detail until my colleague pointed it out to me!

Brian thanks for the info I know we must be close--if only i can make siu recognize the fixed image and skip that initial image creation like you said looks like this is a valid solution!

Error Log:
Create NetInstall Image
Initiating NetInstall from Restore Media.
created: /Library/NetBoot/NetBootSP800/FlexImage7.2/System.dmg
Checksumming partition of size 63 blocks...done
Catalog file is too fragmented for restore.
Try "fsck_hfs -r" on writeable copy of the image volume
unable to get UDIF info from "/Library/NetBoot/NetBootSP800/FlexImage7.2/System.dmg" - Bad file descriptor.
asr: image scan failed - Bad file descriptor.
Script is done.
NetInstall creation failed.
Image creation process finished...
Stopping image creation.
Image creation failed.

System Image Utility 2: create NetRestore Image, failure at Preparing Image

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.