Why I love Macs AKA backing up your Mac in firewire target disk mode using Linux

by Justin Clarke

The little things in Macs and OSX are the ones which end up being the most powerful. In this case, my trusty old G3 iBook has bitten the dust with the dreaded Logic Board failure - leading me to discover the firewire target disk mode.... allowing me to back up my internal hard drive over firewire to my Linux box. I love those little things that Apple puts in! Here's my mini howto.

My first favorite Apple-ism was the "I don't need a cross over cable anymore" NIC. I mean, how convenient is it having an auto sensing NIC so you never need to have both a normal cable and a cross over cable anymore? Firewire target mode is my next favorite.

For those of you who haven't come across it yet, firewire target disk mode allows you to mount your firewire capable Mac's (list of supported systems here) internal drive as a firewire drive on another Mac. You do this by holding down the "T" key after turning on the Mac. Technically, it allows you to mount the internal drive (with some limitations) as a SBP-2 (serial bus protocol) drive on a different machine. Naturally, this works fine on another Mac, but what if you don't have two Mac's? I don't, so I got it working on Linux.

Firstly, your Linux setup is going to have to have a few funny settings, so you may have to recompile your kernel. Also, I'm using Gentoo on a 2.6 kernel, so if you don't have all the options I have, you may have to patch your kernel for some option. In any case, you (I'm guessing here) probably need at least the following options enabled:

File Systems->Miscellaneous file systems->Apple Extended HFS file system

File Systems->Partition Types->Macintosh partition map support

Device drivers->IEEE 1394 (Firewire) support->SBP-2 support

Device drivers->SCSI device support->SCSI disk support

Assuming everything is working properly you should now be able to connect the two computers together using a firewire cable, boot the Mac in target disk mode (holding down the "T" key), and mount the Mac as a firewire disk like follows (note the parameters are for my Mac):

sudo mount -t hfsplus /dev/sdb5 /mnt/mac/

One last note - your normal fdisk won't read a mac partition table, so look at your dmesg output to see which partitions are on your Mac :-)


2005-06-21 11:31:55
you lose all your resource forks, and metadata under Tiger, thus rendering some documents useless.
2005-06-22 06:20:59
Other uses
I have used target disk mode on two occasions where it was a real lifesaver:

  • A friend's iMac wouldn't boot (didn't even see a bootable hard drive). Attached it to my PowerBook in target disk mode, used the PowerBook to clean up the drive.

  • My 4+ year old PowerBook (Pismo) no longer has a reliable DVD drive. I attached it via FireWire to my dual G5, which I restarted into target disk mode, and was able to boot the PowerBook from the Tiger Install DVD in the G5's drive (turning the G5, temporarily, into one very expensive DVD drive).
  • robmiller
    2005-06-22 08:18:38
    I have been using it for years
    I have been using target mode for years. It is also handy for just moving docucments and files. Several months ago my G3 ibook's logic board failed and target mode was there to save the day. I never lost a day of work. I told the story to a PC user and they were like, "Wow" that's neat. I have also used target mode to troubleshoot. It is a pretty great feature. I don't know if the PC folks have something like target mode, but if not they are missing out.