One way to upgrade from OS 9 to OS X, non-destructively.
I have decided to move my last remaining OS 9 machine to OS X. I am especially interested in a non-destructive upgrade, preserving all the old OS 9 data and applications. Since they will be fine under X’s Classic emulator, it makes no sense to pitch them.
And while it would have been nice if Apple had made it possible to install X onto an existing OS 9 installation, it is possible to use the tools provided for disk image management to make it work.
Disk images are compliant with Steve Jobs’ phrase “insanely great.” You can create a virtual disk of any size and read and write to it, send to someone, mount it as if it were a fileserver volume, etc. So I copied the entire contents of the OS 9 machine to my OS X machine and created an image there.
This would be useful for tech support, I think: rather than just a folder representing a person’s disk contents, a disk image could be more easily managed and protected (checksumming is available for file integrity and validation).
This information is all in the manual page for hdiutil, but this is a real example. The basic steps are:
determine the amount of space you need (I found this worked out to be insufficient on the first try: I would add a few hundred Mb on a similar sized image next time), create a disk image, make a filesystem on it, then copy your backed up files into it.
[/Network/music]# du -s /Volumes/untitled
3259456 /Volumes/untitled
(root@pink)-(01:08 PM / Tue May 14)
[/Network/music]# hdiutil create -sectors 3500000 iMac
.........................................................................................root@pink)-(01:12 PM / Tue May 14)
[/Network/music]# hdid -nomount iMac.dmg
/dev/disk3 Apple_partition_scheme
/dev/disk3s1 Apple_partition_map
/dev/disk3s2 Apple_HFS
(root@pink)-(01:23 PM / Tue May 14)
[/Network/music]# newfs_hfs -v iMac /dev/rdisk3s2
Initialized /dev/rdisk3s2 as a 1591MB HFS Plus volume
(root@pink)-(01:23 PM / Tue May 14)
[[/Network/music]# hdiutil eject /dev/disk3
"disk3s1" ejected successfully.
"disk3s2" ejected successfully.
"disk3" ejected successfully.
(root@pink)-(01:25 PM / Tue May 14)
[/Network/music]# hdid iMac.dmg
/dev/disk3 Apple_partition_scheme
/dev/disk3s1 Apple_partition_map
/dev/disk3s2 Apple_HFS /Volumes/iMac
(root@pink)-(01:25 PM / Tue May 14)
[/Network/music]# ditto -rsrcFork /Volumes/untitled /Volumes/iMac
Reading the manual pages for hdiutil, hdid, and ditto would be informative: here are the basics.
NAME
hdiutil – manipulate disk images
SYNOPSIS
hdiutil verb [options]
DESCRIPTION
hdiutil uses the DiskImages framework to manipulate disk image files.
Common verbs include create, mount, eject, verify, and burn.
The rest of the verbs are: help, info, load, convert, flatten, unflatten,
imageinfo, plugins, resize, segment, checksum, and pmap.
NAME
hdid – HDI driver backing store service
SYNOPSYS
hdid [ options ] imagefile
DESCRIPTION
hdid is the user-level process which handles the loading
and decompression of disk image data for the HDI disk
image driver in the Mac OS X kernel.
NAME
ditto – copy source directories to destination directory
SYNOPSIS
ditto [ -v ] [ -V ] [ -arch archVal ] [ -bom bomFile ] src
[ … src ] dst
DESCRIPTION
Ditto copies one or more source directories to a destina-
tion directory. If the destination directory does not
exist it will be created before the first source directory
is copied. If the destination directory already exists
then the source directories are merged with the previous
contents of the destination.
Ditto overwrites existing files, symbolic links, and
devices in the destination when these are copied from a
source. The resulting files, links, and devices will have
the same mode, owner, and group as the source items from
which they are copied. On the other, ditto does not modify
the mode, owner, or group of existing directories in the
destination.
Ditto can be used to “thin” multi-architecture binaries
during a copy. Ditto can also copy files selectively based
on the contents of a BOM (“Bill of Materials”) file. Ditto
preserves hardlinks present in the source directories and
preserves setuid and setgid modes.
So ditto is much more than hfscopy or other mac<->unix tools: being able to work from a file (the BOM) is very interesting.
So now I have 2 copies of the stuff from the iMac I want to upgrade: one being the folder I copied and the other a disk image I made from the folder. Next step: boot into the OS X installer, partition the disk (do I really need 28 Gb for any single OS?) and restore all this stuff into the Classic environment.