Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Analysis of 12" PB Software Restore Disc

Analysis of 12" PB Software Restore Disc
Thread Tools
Fresh-Faced Recruit
Join Date: May 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Mar 14, 2003, 10:45 AM
 
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.

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>
1
<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
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Mar 14, 2003, 01:15 PM
 
Interesting info. man asr for some more help on using Apple Software Restore.

A way to make OS X skip the setup assistant, and instead have your user account setup by the installer.
Hmm... on a machine that's already set up, you can make the assistant run at startup by deleting the file /var/db/.AppleSetupDone. Maybe creating it as part of your installer will cause it to skip the assistant? I'm not sure what would happen in terms of automatically-created accounts in that case.

A way to have the Software Restore application automatically install and launch after installing OS X.
Looks like the asr command-line tool could be made part of a post-install script in an Installer package.
Rick Roe
icons.cx | weblog
     
Mac Elite
Join Date: Jan 2001
Location: L.A., CA
Status: Offline
Reply With Quote
Mar 14, 2003, 10:13 PM
 
So, I have yet to actually do anything with this info, but I'd image making a custom Software Restore disc should be doable.
That could be a very popular utility if packaged right. Backup all your shareware and bundled apps (latest versions) to a single CD/DVD and have them auto-reinstall via the software restore. Integrate with a popular password program for the slam-dunk. Huge project, but a lot of potential there.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:48 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2