Adventures in Data Recovery
The Friday before APE, I biked home from the coffee shop that serves as my pseudo-office and opened my laptop only to get a black screen and a high-pitched whining sound coming from the hard drive area.
Uh-oh. That sounds bad.
Restarted, and it booted into some kind of Ubuntu command-line-only safe-mode/diagnostic mode I had never seen before. Couldn't mount the hard drive so I don't even know where this OS was loaded from. Maybe it got written into firmware when I installed Ubuntu?
Most of my important work is on the evilbrainjono.net servers or on GitHub. I have backups from a couple months ago, at the start of my China trip. If I can't recover the data, the most I've lost is some blog post drafts, some Yuki script drafts, bookmarks, a few email contacts, the Humble Indie Music Bundle, and the China photos I had not yet blogged. That would be the photos from Shanghai comic-con and our trip to Xi'an. I was especially looking forward to sharing the Xi'an pics so those are the saddest thing to lose.
Anyway I decided to get some professionals on the case. Fry's had successfully gotten data off a crashed hard drive for me before, so I took the laptop to them. I specifically told them I was running Ubuntu in case that was important.
Two days later, they called me back and said they couldn't do anything because their recovery software can't read Linux-formatted drives. Gee guys, that would have been a nice thing to tell me before I paid you. So I got everything back from them, bought a new hard drive, and began my attempts to recover the data myself.
I burned Ubuntu Rescue Remix onto a CD-ROM, booted from that, and started trying to ddrescue /dev/sda onto an external USB drive. This is a utility which will copy the raw data from the disk over to one gigantic file, ignoring bad blocks. Then I can hopefully mount the giant file as a virtual filesystem and read my photos off of it.
Well, if it's even the right partition. There's several virtual files in /dev that look like disk partitions, but they're unlabeled so I don't know how to tell which one is the partition I care about. I guess I'll try them all until I find something useful.
I left ddrescue running overnight, but this morning I discovered that it had stopped at 4 gigabytes. Of course! The external USB drive is formatted as a FAT filesystem, which has a maximum size of 4GB for any one file. (FAT was designed in the late 70s so they probably couldn't have imagined we would routinely have disks that large, let alone individual files.)
So next step is to format an external drive to ext3 or some other more modern standard and then try again. Even if I can't get the pictures back, this is kind of fun.