Software Restore disc for 12" PB Analysis

skinlayers

Registered
While doing research on making restore images for Mac OS X, I decided to take a look at how Apple is currently doing it. Our dept. just got some of the new 12" PB in so I poked around some and came up with some interesting results.

edit: I can't turn off HTML code in my post, so it tries to interpret the XML :roll:

Basically, the way the disc works, you boot off of it like any other CD (hold down C). You are then presented with a standard Mac OS X 10.2 installer. After installing OS X, the machine reboots and goes through the initial setup assistant.
Then, looking at the CD from inside the Finder you see 3 files off the bat. One is the OS X installer, another is a Read Me file, and the last is an alias to an installation package called Restore Classic and Applications. The installation package installs a program called Software Restore to your Utilities folder, and immediately launches it.
This is where the fun starts.
From what I can tell Software Restore starts by reading an XML file called .RestoreInfo.plist on the root level of the Restore DVD in the drive. This file starts by defining up to six discs in the set, sets the UUID of the drive (UUID is a method of assigning a unique 5 digit number to a volume as a unique identifier), sets the language, defines the computer model the restore can run on, and (finally) lists the location of the rest of the software in the restore set in groups (called Selections in the XML file). The Selection section start with a Contents section comprising of a variable followed by text

example: <string>$$2 GraphicsConverter, QuickBooks, OmniGraffle, OmniOutliner, FileMaker, Art Directors Toolkit, Eathlink, FAXstf, Microsoft Office</string>

Then a Description section formatted in a similar way.

example: <string>$$2</string>

The variable references a file inside the Software Restore application package at Software Restore/Contents/Resources/English.lproj/Checkboxes.strings. This pretty much defines the rest of the way things look in Software Restore. Going back to out $$2 example, if you look in Checkboxes.strings you'll find the line:
/* The name of the checkbox for $$2 */
"Applications" = "Applications"

and further down

/* The content text for $$2 */
"Restores the Mac OS X applications that came with your computer." = "Restores the Mac OS X applications that came with your computer." (note: the last 2 line are all 1 line, wrapped).

So, when you launch Software Restore, it lists a box called Applications (defined by the Descrition section) , and when you mouse over it, it says to the right:
"Restores the Mac OS X applications that came with your computer. GraphicsConverter, QuickBooks, OmniGraffle, OmniOutliner, FileMaker, Art Directors Toolkit, Eathlink, FAXstf, Microsoft Office"
In other words it slaps the $$2 variable as defined in the Checkboxes.string in front of the rest of the string in the beginning of the Selection in the .RestoreInfo.plist.

Then, the Selection section goes on to define the location of one or more .dmg files in a directory called .images at the root level of the Restore DVD.

example:
<key>Images</key>
<array>
<dict>
<key>DiscNum</key>
<integer>1</integer>
<key>Path</key>
<string>.images/GraphicConverter.dmg</string>
<key>PostCommands</key>
<array>
</array>
<key>Rebuild</key>
<false/>
</dict>

So, this tells Softwar Restore that the image is on Disc number 1 of the restore set, in .images/GraphicConverter.dmg, and not to run any post install commands or to prelink binaries (the last is an unverified assumption, but I'm guessing that's what the Rebuild key is for). If you manually open one of these .dmg files you'll see that contain all of the files where they would need to be in the file system after installation.

example: (from memory)
if you open the Microsoft Office image you'll find 2 folders. 1 called Applications, and 1 called Library. If you dig around in them you'll find they have all the components mapped out to where the would be in OS X after a normal install.

There is one other important file, which is called .DiscInfo.plist. This file looks very similar to .RestoreInfo.plist, but defines what disc's number in the restore set, is a little shorter, and does not list the .dmg paths grouped by Selections. This is the key to having a restore span multiple discs.

So, I have yet to actually do anything with this info, but I'd image making a custom Software Restore disc should be doable. You should be able to image the original Restore DVD on to a partition (I had trouble trying to do this with CCC), edit the .RestoreInfo.plist and .DiscInfo.plist (and Checkboxes.string inside the installation package for the Software Restore application if you feel the need), and add your own custom .dmg files. I would love to find a way to make this as elegant as possible.

wishlist:

1) A way to make OS X skip the setup assistant, and instead have your user account setup by the installer. I know something like this should be possible. I once install OS X on a desktop G3 w/ a 12" monitor. Since OS X couldn't display the setup assistant (the screen was too small) it skipped it and created a user named Administrator (shortname admin) with no password with no user intervention.

2) A way to have the Software Restore application automatically install and launch after installing OS X. Currently, we use custom restore discs made with DiscCopy and ASR under OS 9 that require nothing of the user other than booting from the CD. Once booted, the machine auto launches ASR (startup items). ASR's pref file was hacked with ResEdit so it immediately wipes hard drive and restores the image without prompting the user at all. The closer I can get to a one click solution, the better. The people who use these restore discs are usually far from technically savvy.

Thanks!
skinlayers:rolleyes: :rolleyes: :rolleyes:
 
Back
Top