Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Run Apple Software Restore from the command line System
While talking with guys from Dantz the other day at Comdex, Apple Software Restore (ASR) came up. The Dantz rep mentioned that ASR has been enabled under Jaguar.

I couldn't find any previous posts saying that ASR works under Jag, so here it is. You can type man asr to get the syntax, too.

[Editor's note: The help for asr is very thorough and explains exactly how to go about creating an image of an OS X installation, as well as including tips on speeding the restore process.]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[11,901 views]  

Run Apple Software Restore from the command line | 7 comments | Create New Account
Click here to return to the 'Run Apple Software Restore from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
asr uses hdiutil and ...
Authored by: Anonymous on Nov 26, '02 12:24:42PM

I still have not been able to get the hdiutil command to convert a read/write disk image into a read-only or compressed image, and have the resulting image mount! Since you need a read-only or compressed image for 'asr' to do its magical checksumming, I am stuck.

I have tried running hdiutil from the command line and running Disk Copy and doing the conversion there. All result in an error "no mountable volumes"!

Until I get past that, I am unable to use 'asr' from the command line, as 'asr' tries to mount the compressed image after computing its checksums.



[ Reply to This | # ]
thanks and hdiutil suggestion
Authored by: copelanduk on Nov 26, '02 03:02:29PM

Thanks for the pointer on ASR, that'll come in handy when I upgrade a lab of 60 iMacs to 10.2.X

As for invictus' problem:
A little while back I combined various hints and wrote a shell script that created a compressed disk image from a folder. I used something like this to convert the r/w image into a ro-compressed image:

hdiutil convert original.dmg -format UDZO -o compressed.dmg

I just tested this again with a a couple of small images (from 1-100MB) and it still seems to work in jaguar. Let me know if this works for you, I haven't tested with a full image of a system, so maybe there's an issue there.



[ Reply to This | # ]
thanks and hdiutil suggestion
Authored by: Anonymous on Nov 26, '02 03:46:48PM
I have prepared images and compressed them or converted them to read-only, mounting them successfully afterwards. Several different sizes, including a 2 gigabyte one that was almost completely full. No problems. It looks like it is just system images (perhaps the boot block info?) that have the problem.

I decided to skip the conversion step and simply go from a disk partition to a compressed image and see what 'asr' could do with that. Here is the sequence I got with the latest one:

% sudo asr -imagescan macosx10.1.5a.dmg
Password:
/usr/bin/hdiutil: detach: "disk1" detached successfully.
/usr/bin/hdiutil: detach: "disk1s1" detached successfully.
/usr/bin/hdiutil: detach: "disk1s2" detached successfully.
asr: unable to unflatten "macosx10.1.5a.dmg" - %s.
asr: unable to write UDIF info into "macosx10.1.5a.dmg" - 78. Function not implemented.
asr: image scan failed - Function not implemented.
There are several things going on, after some reading. A compressed image can still be mounted so that checksums can be computed for many of the files and folders. Once these are done, the image is "unflattened", i.e., made multipart so that the checksums can be appended. Something seems to be going wrong with these steps.

[ Reply to This | # ]
HDIutil and ASR
Authored by: Anonymous on Nov 26, '02 04:39:16PM

Well, I think I have got it, but it will take a few more hours of testing to confirm. I wanted to let you know that I surmounted one of the hurdles.

Since 'asr' cannot seem to 'unflatten' the image, its image scanning function fails. So, I unflattened the image for it:

hdiutil unflatten macosx10.1.5a.dmg

sudo asr -imagescan macosx10.1.5a.dmg

It worked! (or at least, no error messages, which is really not the same thing at all) So, progress at least.



[ Reply to This | # ]
Software Restore on G3 Firewire
Authored by: redleader on Nov 27, '02 06:35:24AM

When I try to use my iBook (OSX 10.2.1) Software Restore CD's on my G3 Firewire PowerBook I get the message "...this disc cannot be used on this model...".

Any idea how to get around this?



[ Reply to This | # ]
Finally got ASR to work
Authored by: Anonymous on Dec 09, '02 04:43:05PM
After a lot of trial and error, mostly error, I got 'asr' to work.

There were two bugs/limitations in Apple software that I had to deal with, that clouded much of the issue.

  1. Disk Copy 10.2.2 supports disk images larger than 2 Gigabytes, essential to imaging a 10.2.2 release. However, when you create the disk image, you cannot use the sparseimage format. You must create a disk image of the appropriate size (perhaps 10% larger than the files you are going to copy to allow for the block size issue), and then do the copy.
  2. asr can only work on compressed or read-only disk images, that have been unflattened.
What this means in practice

I originally tried to use Carbon Copy Cloner 2 to create the image from a prepared partition on the computer. However, CCC creates a sparseimage format image which led subsequently to all of my headaches in later stages. Once I figured out that creating the image beforehand was essential, everything started to work. You can still use CCC to do all of the useful stuff.

The final steps in the sequence are to unflatten the read-only image, do an image scan, and flatten the image again. After that, you can use asr to prepare all of your disks. Thus:

hdiutil unflatten image.z.dmg
sudo asr -imagescan image.z.dmg
hdiutil flatten image.z.dmg


[ Reply to This | # ]
Finally got ASR to work
Authored by: Chazz on May 01, '03 03:00:05PM

I'm trying to maintain my sanity here. I've gone through all of the messages I can find on this but I'm still having issues with ASR. The really frustrating thing is that I'm not getting error messages, just the help screen from ASR. I'm sure that I'm using the correct syntax, I've tried it with flattened and unflattened, and compressed image files but it's the same resuly. I'd really like to benefit from the wisdom of the group - any insight as to what might be missing?

Thanks.



[ Reply to This | # ]