netbsd macppc drive label can crash os x 10.3.9 disk utility

This is a bug in Apple’s Disk Utility – it will totally choke on my G3 B&W when presented with a drive that has had a NetBSD/macppc disc label applied (ok, incorrectly applied with disklabel and not pdisk, but that’s not the point !). Once logged in the system notices that there is a drive present that is not readable, and prompts to Initialize…, Ignore or Eject. Choosing Initialize… launches Disk Utility, which then crashes saying that a program that it needs to run hasn’t started, and that you should click Quit. The app is 100% unresponsive however, and must be killed by Force Quit. Using Console shows that the DiskManagementTool fails to start, and this brings down Disk Utilty, but it can be worked around using the command line.

Assuming you are booting from /dev/disk0 and the NetBSD drive is /dev/disk1, type the following:

sudo pdisk /dev/disk1 -initialize

and the system will then notice that an uninitialised volume has been inserted and prompt as before, but this time Disk Utility will launch without a problem.

If you want to discover which disc is the correct one, type:

sudo pdisk /dev/disk0 -dump

and then:

sudo pdisk /dev/disk1 -dump

and so on. Correctly functioning drives will display a few lines of sensible values – the broken one will scroll for a very long time reporting:

16608: @ 0 for 0, type: 0x0
16609: @ 0 for 0, type: 0x0
16610: @ 0 for 0, type: 0x0

and so on (it probably starts at zero, but vanished off my screen before I hit CTRL+C).

Comments are Disabled