- This topic has 5 replies, 2 voices, and was last updated 15 years, 3 months ago by
larkost.
-
AuthorPosts
-
January 10, 2010 at 1:45 am #377789
Allister Banks
ParticipantCould someone please point me in the right direction to create the Base Image from Terminal?
I tried a bunch of different flags and haven’t ended up with a working .dmg yet. I had thought I’d be able to figure it out with the imageinfo flag, but I can’t even remember how I did it right in Disk Utility. Here’s the successful image I made via diskutility when analyzed with hdiutil imageinfo:
[code]
Format Description: UDIF read-only
Class Name: CUDIFDiskImage
Checksum Type: CRC32
Size Information:
Compressed Ratio: 1
Total Empty Bytes: 1928338944
Sector Count: 16777216
Total Bytes: 8589934592
CUDIFEncoding-bytes-wasted: 0
Total Non-Empty Bytes: 6661595648
CUDIFEncoding-bytes-in-use: 6661595648
Compressed Bytes: 6661595648
CUDIFEncoding-bytes-total: 6661595648
Checksum Value: $6ED5AF39
Segments:
0: /Volumes/Leftova/instadmg-read-only/InstallerFiles/BaseOS/Mac OS X Install DVD.dmg
Partition Information:
0:
Name: whole disk (Apple_HFS : 0)
Partition Number: 0
Checksum Type: CRC32
Checksum Value: $717A7727
Format: UDRO
Backing Store Information:
URL: file://localhost/Volumes/Leftova/instadmg-read-only/InstallerFiles/BaseOS/Mac%20OS%20X%20Install%20DVD.dmg
Name: Mac OS X Install DVD.dmg
Class Name: CUDIFEncoding
Backing Store Information:
URL: file://localhost/Volumes/Leftova/instadmg-read-only/InstallerFiles/BaseOS/Mac%20OS%20X%20Install%20DVD.dmg
Name: Mac OS X Install DVD.dmg
Class Name: CBSDBackingStore
partitions:
partition-scheme: none
block-size: 512
appendable: true
partitions:
0:
partition-name: whole disk
partition-start: 0
partition-synthesized: true
partition-length: 16777216
partition-hint: Apple_HFS
partition-filesystems:
HFS+:
burnable: true
udif-ordered-chunks: true
Properties:
Encrypted: false
Kernel Compatible: true
Checksummed: true
Software License Agreement: false
Partitioned: false
Compressed: false
Resize limits (per hdiutil resize -limits):
min cur max
13195984 16777216 16777216
[/code]
I’d love to create the cache file in advance as well, if I’m following the script correctly that conversion happens via this command:
[code]
/usr/bin/hdiutil convert -ov -puppetstrings -format UDZO -imagekey zlib-level=6 -o “${ASR_FOLDER}/$ASR_OUPUT_FILE_NAME” “$SHADOW_FILE_LOCATION” | (while read INPUT; do log “$INPUT ” detail; done)
[/code]
I’m not sure exactly where I substitute in my baseimage.dmg and point the output.Any help would be greatly appreciated, please let me know if I’m not asking the right questions or if better documentation than the man page for hdiutil is available. Thanks,
(edited to correct typo)
Allister BanksPOINT
http://www.pointconsultants.com 646.502.4708 368 Broadway Ste. 303 New York, New York 10013January 10, 2010 at 2:59 am #377790larkost
ParticipantI an a little confused about what it is you want to do. My guess is that you want to create an image of your installer DVD (the dmg that does into InstallerFiles/BaseOS), and for some reason you want to avoid doing this through Disk Utility.app. Because you are obviously confused about things your first post should have explained what your overall goal was here. By focusing only on what you think is going wrong in the process you have made it much harder to answer your question.
The hdiutil man page should provide you with all the information you need, but you need to read and understand the whole thing first. Assuming that I am guessing what you really want, then a varient like this will do it:
[code]hdiutil create -srcfolder /Volumes/Mac\ OS\ X\ Install\ DVD -format UDZO -imagekey zlib-level=6 “/tmp/Mac OS X Install DVD.dmg”[/code]But I do thing you are confused about things from there, especially when you are asking about the cached base image. In order for this to be generated successfully you have to go through all of the steps in the script. So if you want a cached base image, just run the script with no extra packages. It will do some extra work at the end, but not all that much really, and it is just computer time.
edit:
Oh… and I would make sure that the output name is “Mac OS X Install DVD.dmg”January 10, 2010 at 3:33 am #377791Allister Banks
ParticipantYes, indeed I was trying to create the Base Image from DVD using hdiutil, mainly because it’s easier to tell my associate to copy/paste a command than click around in Disk Utility. As I had pointed out over on the instadmg-dev list, GUI instructions I had followed in the past(like Mr. DeTroye’s walkthrough) to get started no longer worked in SnowLeopard, so I think I’d rather trust hdiutil.
This response was just the ticket, testing now. Thanks again,
AllisterJanuary 10, 2010 at 4:03 am #377792larkost
ParticipantI should note that I got an error later on in the processing of the image, it was harmless, but I already filed a radar on it, and am confirming that it was not a fluke (I doubt it was). So you might get errors on the command line, but the image looks good (needs more testing of course…).
Update: I have a solid reproducible bug here, and have given Apple what they need to find it. To avoid it you just need to use quotes around paths rather than escaping spaces. But I still have no reason to believe that this will cause actual problems, only some errors printed to the console.
January 10, 2010 at 11:03 pm #377795Allister Banks
ParticipantI am, as always, grateful you were able to quickly see and file the bug, I can only hope Apple appreciates it (as all software development houses and engineers should.)
I messed up while thinking I wanted to specify a different path than /tmp to create the image in, and mistakenly ran the command with no quotes. Which resulted in a nice hard hang after it successfully produced the image, causing me to have to force-quit Terminal.
Just to verify, the workaround would look like:
hdiutil create -srcfolder “/Volumes/Mac\ OS\ X\ Install\ DVD” -format UDZO -imagekey zlib-level=6 “/Volumes/Destination/Mac\ OS\ X\ Install\ DVD.dmg”
?Is it frowned upon to refer to radars by number outside of openradar(I’d love to chime in about chroot not behaving,) and are dupe-submissions not advisable?
Thanks again, AllisterJanuary 10, 2010 at 11:43 pm #377796larkost
ParticipantI actually put this bug up on OpenRadar, and it is Radar number 7527256. I would link to it, but these forums tend to think I am spamming when posting urls. I am pretty sure that Apple doesn’t like posting anything about any radars, and that includes OpenRadar. I generally take that into consideration, and post some of the Radars I file because I think that other people might do exactly what you are asking and post duplicates because they care about the issue. I should have posted the chroot one under this rubric, but right now that Radar is in an account I don’t have access to.
To be clear about this: filing duplicate Radars is a really good thing, it tells the people who control what engineers work on what bugs are being run into by people in the real world. Filing duplicates helps them to justify throwing engineer’s time into fixing this thing, rather than fixing that thing. If you care about the issue behind a Radar, by all means file a duplicate bug. If you have other channels to Apple Engineering (like an Apple Support contract, a Support Engineer, or even a good sales rep), then by all means use those as well. Once I get access to my other account I will try and post the Radar number for my chroot bug. The other day I verified that it is still an issue that I can’t work around.
And the workaround should look like:
[code]hdiutil create -srcfolder “/Volumes/Mac OS X Install DVD” -format UDZO -imagekey zlib-level=6 “/Volumes/Destination/Mac OS X Install DVD.dmg”[/code]
… so you are only using one form of escaping (either quoting, or back-slashes, not both).And I have not seen a hang at this point. Are you sure that it was just not giving feedback?
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed