Rube Goldberg helps me read ext2 on Mac OS X

Every now and again I find myself wanting to read an ext2/ext3-formatted disk from a Linux box on a Mac. Once there was an OS X kernel module that sort of worked, in the sense that it often would mount an ext2 disk on OS X successfully, but the years have not been kind to it, and at this point it’s mainly good for being the only way I know to induce a kernel panic on Leopard.

Happily, though, we live in a weird sort of future where a surprisingly effective way to solve the problem is to run a Linux virtual machine (say, Ubuntu 8.04) on your Mac, and hand it the USB drive with the Linux filesystem. Being a cheapskate, and having no other real VM needs at the moment, I just downloaded Sun’s free VirtualBox (rather than VMWare or Parallels) and grabbed the current Ubuntu ISO. The only trick at all to mounting an external USB2 drive in the VM was to grant the VM access to the USB device by creating a “USB Device Filter”:

which must be done while the drive is connected, but while the VM is not booted. (When you plug in the drive, Mac OS X will complain about the Linux drive being unreadable and offer to format it, but pay it no mind, and tell it to ignore the problem).

I think I’m entirely over my initial reaction, which was that this approach must be Worse somehow than using the unstable & unmaintained ext2fsx kernel module to achieve the “same” result with less code (and also not working). Yes, this VM approach uses more moving parts, but with the advantage of running the actual filesystem in its original context (i.e. with some presumption of correctness), with the only particular risk being added by whatever trickery is needed to pass USB through to the VM.

Anyhow, yay VirtualBox, and yay for Good Enough solutions.

Category: technology Comment »


Leave a Reply

You must be logged in to post a comment.

Back to top