Preface: I use my Macs for Photoshop, which I need frequently for image manipulation/creation beyond the abilities of GIMP http://www.gimp.org/ . I also find CSS work in general easier with the Mac and accessing /editing content in SharePoint / MOSS folders is actually pretty easy so creating custom Master pages etc is a relatively smooth process.
The problem: I experienced an AWFUL lot of difficulty in getting to a functional version of 10.5 on my iMac G5 recently. Why? Because I made a DMG of the install disk and promptly lost the original. Duh. These are the steps I took to install from the DMG. Hopefully somebody will find this if they need it and avoid the pain I had.
- Restore the DMG to a partition on the Firewire drive.
- Copy OSInstall.mpkg to another location.
- XAR the copied OSInstall.mpkg and BBEdit the Distribution file inside.
- XAR it back and overwrite the original on the Firewire drive.
- Change boot drive and install.
First of all, just like anything I do with STSADM, put it all in a text file. That way you can just cut and paste and save yourself a fair amount of time and agravation when needed.
1: Restoring to the Firewire drive
- Open Disk Utility application from Applications -> Utilities.
- Click on the Restore tab.
- Drag the DMG file “Source” field or browse to it.
- Drag the icon of the partition (from the left pane) you want to put the installer on to the “Destination” field.
- Check the “Erase Destination” check box.
- To be safe check the Checksum box.
- Click Restore.
If you get device busy errors or something else just reboot and try again. Should take about 10 minutes (depending on your hardware.)
2: Getting XAR
- Download xar (tar and gz file).
- Expand the tar.gz file and open terminal and cd into its directory.
- Issue the folowing commands, pressing Return between each one and then waiting for its completion (Developer Tools required):
$ sudo make install
- Check that the install is in the right location (/usr » local » bin » xar) by issuing which xar; it should return the aforementioned location.
Now here is where the first handbasket from hell appeared. MAKE errored out with the following
ld: Undefined symbols:
/usr/bin/libtool: internal link edit command failed
make: *** [lib/librxar.1.dylib] Error 1
This is a specific issue with XAR 1.52.
The Fix: 1.5.2 seems to be missing the #define xar from lib/archive.c:
#if LIBXML_VERSION <>
#define xmlDictCleanup() /* function doesn’t exist in older API */
Save yourself some pain and add that code in blue above in. MAKE should work just fine now.
3: Working with OSInstall.mpkg: Do this if you need to force the installer to bypass some checks such as for older hardware. The risk is yours if you do as they say…
- Copy the OSInstall.mpkg to the desktop. For 10.5, the package we need is in /System » Installation » Packages/ folder on the drive with 10.5.
- Go into Terminal and cd to the folder you put the mpkg in, then issue the following command to decompress the mpkg to the folder:
$ /usr/local/bin/./xar -x -f OSInstall.mpkg
- Go into the OSInstall folder, and you’ll see a Distribution file and Packages folder.
- Open the Distribution file in a text editor, for example I use BBEdit. It’s an xml script, so you can just edit it. Look for minRam and the processor speed requirments, and change these, and any other options which could prevent install on your setup. Save the changes.
- Issue the following command to compress the files back into xar’d mpkg file:
$ /usr/local/bin/./xar -c -f OSInstall.mpkg *.
- The OSInstall folder should now have a new OSInstall.mpkg file in it. We then need to copy this new file into /System » Installation » Packages folder on the drive with 10.5. Firstly I’d rename the existing OSInstall.mpkg so we have a copy of it, so cd into the /System » Installation » Packages folder on the drive with 10.5, and issue the following command in Terminal:
$ sudo mv OSInstall.mpkg OSInstall_orig.mpkg
- We then need to copy over the new package, so issue the following command in Terminal:
sudo rm "/Volumes/Mac OS X Install DVD/System/Installation/Packages/OSInstall.mpkg"
sudo mv OSInstall.mpkg "/Volumes/Mac OS X Install DVD/System/Installation/Packages/"
4: Change the Startup Disk
Now that all remains is to go into the Startup Disk preference pane and select the drive you copied/restored 10.5 to, boot from that drive, and you should then be able to install without issues.
This may be useful too: http://coreboarder.com/blog/?p=231