I’m in the middle of leaving my present job to a new one in another country, and yesterday I was mulling the different options I had to back up all the stuff in my $HOME that I want to take out with me (office documents, data files, idl and matlab programs, images, all kind of crap accumulated during the past 3 years).
Once I had cleaned up $HOME a little (removing the jhbuild directory, for instance…) it amounted to ~13 gigs of data. This was kinda cumbersome to copy to floppy disks – or even CDs, for that matter. DVDs were a viable option, but I don’t have a burner on my machine, the only DVD burner we have around here is an internal one, so it means I would have to take stuff apart, which I was reluctant to do since these are not my machines (also it would mean losing part of the directory tree structure, which is a minor PITA). I could have just snatched the disk and leave with it (nobody’s gonna cry over a 30 gig HD, I guess) but since this place is an administration, I’m sure 10 years from now the FBI would find me. I didn’t have any external hard disk either…
But wait, I thought, I have a perfectly good iPod with more than 30 gigs of free space ! I just need to backup my home directory on it ! Easy as a pie ! Joy ! So I brought my cable at work, and hooked it up to the computer. The fact that I’m running ubuntu dapper at work (I know, it’s not the smartest thing in the world), and that these events just happened in the middle of a hal/dbus transition, didn’t really help : nothing happened. I was not surprised, as since the day before my USB key stopped automounting as well. Pain.
At that point, I still had hopes that it would just be a matter of creating a mount point, figure out the filesystem and mount the damn thing. I was quickly able to browse the contents of the ipod (lots of mp3s and weird thumbnails for pictures) but my joy was short-lived. Apparently the iPod, when formatted for a Mac, uses a filesystem called hfs+. Until recently, there was support for this filesystem right in the linux kernel, but since a recent 2.6.15 release (I guess the rc4) hfs+ can only be mounted read-only because journaled filesystems can’t be modified yet. More pain.
As I’d seen reported elsewhere, dmesg | tail gave me something along the lines of “file system mounted read-only, use mount force option to write at your own risk”. Reasoning that, after all, I was already using an unsupported operating system, and that I couldn’t do much damage anyway (I could always reinstall the iPod software from home), I lost myself in man mount.
Unfortunately, after several attempts mount still would not do anything. Forcing the read/write on the mount command resulted in… nothing at all. I was not able to access the contents of the drive – the mount point was empty, it all looked like nothing was mounted at all.
I decided to try another angle of attack, using one of the tool I had read about in one of the several sites I visited : hpmount. The first times I tried the command, it spewed some error message saying that the drive was not the right kind. I tried several variations (apparently iPod drives are divided into 3 partitions with one for the firmware, etc, so I figured it was just a matter of finding the right one) and after a while I got a different error message, one which got me worried – about trying to write past the end of the drive (I even think there was mention of a superblock or some other black magic stuff).
That’s approximately when I decided that this was enough, that I had reached the limits of my willingness to tinker with an expensive piece of hardware, and that I unplugged the damn thing. Apparently, that was not a smart thing to do. The iPod rebooted (so far, so good), presented me with the usual black-screen-with-apple-logo-on-it (stupid unwarranted feeling of pride) and then… made some cranking hard drive noise and rebooted. Again, and again. There was something wrong in the startup sequence, that made the iPod panic and reboot again. The damn device was lost in a rebooting cycle, which is not very productive for an mp3 player.
Then I started to get a little worried. I mean, it’s hard to reinstall the iPod software when the thing keeps rebooting every 5 seconds. I browsed some Apple support documents (I get a lot done at the office) and finally ended on a page that basically said :
- try resetting the ipod.
- If (1) fails, try charging and resetting the iPod.
- If (2) fails, try reinstalling the iPod software.
- If (3) fails, you’re fucked.
(Of course Apple people are way more polite).I enjoy a lot following instructions, so I tried resetting the iPod. It happily obliged by rebooting, something he was apparently able to do all by itself, and went on its happy reboot cycle without paying any attention to me. I plugged the iPod in the linux machine for power (nothing on the desktop ? At least it’s consistent) and resetted again. No change.
I was getting mildly discouraged. How was I supposed to reinstall the software if the damn thing kept rebooting ? At this point the iPod was a very elaborate and hi-tech battery-draining device, kinda like a symbol of our advanced civilization. I guess that at least I could have used it on my way back from work to warm my hands while driving. Better than nothing.
Then I remembered reading somewhere that you could switch the ipod to a disk mode. You have to press play and menu and select and swing the hold switch back and forth 24 times and the device switches to a weird black-and-white screen without backlight and a very tiny message reading “ok to disconnect”, which is weird considering it was not connected to anything. Apparently it was not possible to turn the device off in this mode either, but at least it had stopped rebooting. Things were getting better.
As, for the first time ever, I had brought my ibook at the office, I was able to plug the iPod in disk mode, mount it (the laptop complained that the disk was unusable… so I *had* fucked up the partition table somehow) and reinstall the iPod software, restoring order and erasing 20 gigs of songs in one fell swoop.
So the moral of the story is : when file systems are not supported, there’s a reason. Also, it can be a lot faster to just tar your entire home directory, gzip it up, and ssh it over the Atlantic, instead of trying to copy everything on an iPod.