Thursday, October 07, 2004

Formatting a drive for OS 9 drivers when host machine cannot boot OS 9 (Mac OS X)

MacInTouch Home Page: "Following up on the issue of lost Mac OS 9 disk support, readers offered a workaround that uses the Unix command line:

[Wayne Linder] The only computers that will show the option to place Mac OS 9 drivers onto a hard drive while formatting are computers that will boot Mac OS 9 themselves. However, you can do this via the Terminal via the diskutil command. Here's an example, assuming you want the drive to be named Bob and the BSD name is 'disk1:' (findable under System Profiler - look for BSD Name under the interface of your connected drive).

sudo diskutil eraseDisk HFS Bob OS9Drivers disk1

That should result in a newly-formatted disk with Mac OS 9 drivers. The usual caveats apply while mucking around in the Terminal.

[Samuel Smith] Any Mac OS X Panther Mac can format any drive with Mac OS 9 disk support (OS9 Wrappers); you just have to use the command line.
To do it, you must login with an administrator account. Open Terminal, and type df - you will get something like this:

Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/disk0s9 156286104 131354216 24419888 84% /
devfs 222 222 0 100% /dev
fdesc 2 2 0 100% /dev
1024 1024 0 100% /.vol
automount -nsl [247] 0 0 0 100% /Network
automount -fstab [250] 0 0 0 100% /automount/Servers
automount -static [250] 0 0 0 100% /automount/static
/dev/disk1s9 156286104 130560384 25725720 84% /Volumes/ABEHD
/dev/disk2s3 157013088 29323962 127689126 19% /Volumes/SamHD1
/dev/disk2s5 233152182 72232390 160919792 31% /Volumes/SamHD2

Note the /dev/diskxxx name of the volume you wish to reformat - for example, ABEHD is /dev/disk1s9.

* Open Disk Utility
* Select the volume (not hard drive) you wish to format and click on the unmount button
* Go back to Terminal
* Type in:

sudo newfs_hfs -w -J -b 512 -v volname /dev/diskxxx

where volname is the human-friendly name that you see on the desktop and diskxxx is the device name shown by the df command above. So, to reformat ABEHD:

sudo newfs_hfs -w -J -b 512 -v ABEHD /dev/disk1s9

The -w adds the OS9 wrappers
The -J makes it journaled
The -b 512 sets the block size to something smaller than the default 4096 so you can fit more files on a disk. If you prefer the default then don't include the -b 512. If you set the blocksize to smaller than 4096, it will complain that it is not optimal but will still work. (I don't think you can set the block size to anything smaller than 512 which is the sector size on most drives.)
* Go back to DiskUtility, select the grayed-out volume, and click the Mount button.

Voila, you have a hard drive with Mac OS 9 wrappers."

No comments: