Wednesday, January 16, 2008

Ethernet/Firewire Target Disk Mode.


Apple have designed macintosh hardware in a way that it is trivial to access data on another mac, as if it were an external Harddisk.

Apple's method of doing it is:
1) Turn on the computer you want to treat like an external harddisk and hold down T on the keyboard.
2) Plug in a normal 6-pin firewire cable between both Mac's.
3) All mounted devices (USB memory sticks, inserted CD's and HDD's) will appear on the other computer, as if the computer was a external drive.
4) You may boot off the external drives as if they were internal, and use them as normal.

Some potential uses of this technology are:
1) Easier to service the computer. If the software is dodgy, you can easily determine this because the computers data will still appear on the other computer. This means that you can also copy data off even if it wont boot.
2) Boot off a remote computer. If the video card is faulty on a computer, you can simply put it into target disk mode, start up the other computer, and it will be as if you were on the other computer.
3) Easy migration of data. Many computer manufacturers such as IBM's or Dell's will not allow you to open a computer within the warranty period, so it is not easy to migrate the data over. You cannot just take the harddisk out and put it in the new computer. With this, since the computer can be made to appear as if it were an external Harddisk, it is effortless to program something to migrate the data over.

One problem however is that Apple implements this via EFI or Open firmware. While many PC's are now getting EFI support, its not that common.

One method we could use to deal with the lack of EFI, is to simply include a modified kernel which instead of mounting the directories, etc, acted as a block device over firewire/ATA over ethernet so that the harddisks would appear on the other computer. Loading the kernel would be done in the same way as it is currently, via grub (or even put the kernel and grub on a memory stick, which could be offered to be created during install).

To make the process efficient, grub should employ a hotkey, similar to Apple such as T, because if the video card is broken on a laptop, and you simply want to copy the data off, you wont be able to see the boot menu (in fact, we can beat Apple's implementation by beeping if it is successful, so users dont stand around 5 minutes wondering. You could also offer logging via the serial port too).

This would benefit not only linux, but any computer, and I cant imagine it would be difficult to code either, especially via USB stick (no harder then coding support for a firewire device). In fact, if properly developed, it should even work on macs. It would also allow motherboard manufacturers to include a flash drive on their system with the code.

The advantages of using a kernel on a memory stick is that reading block by block off the harddisk later, is a completely safe, block by block operation, and it would make it possible to even format the harddisk from another computer, as nothign would be used on the harddisk.

This should be easy to do, and would benefit everyone (it could be even used for data recovery), lets get to work. Remember, many computers are under warranty, so users dont like opening them, and many users just want a simple way to copy all their data off reliably, without takign the computer apart, or loading a liveCD to check if the data is still there.

2 comments:

Anonymous said...

Great idea, I made use of the "Target disk mode" for the first time today and love it.
Since I'm also a Linux fan the first thing I thought is "Is there a linux distro that can do this?"

ThePub said...

Are there any projects which are working on this now? I was just thinking this would be great on a 1mb or so partition on the internal drive of my eeepc 701.