failing like never before

1Oct/081

HFS+ and Linux

In a talk that Linus Torvalds gave in February this year (2008), Torvalds claimed that Mac OS X's file system is "complete and utter crap, which is scary." That was the first time I ever heardabout Mac OS X's file system.

One of my roommates is a Mac user and is quite ignorant of almost all things technical. Recently, his hard drive crashed and he had to send his shiny Macbook Pro to a company that specialized in data recovery, and so he is currently without a computer. He does however still have a working external hard drive that contains a plethora of videos, and so yesterday I asked him if I could borrow his hard drive and look through some of his videos. He told me that I wouldn't be able to use his hard drive on my computer because one of his roommates last year, "reformatted it in a special way so that only Macs could read it."

Having read a little into Apple's file systems, after Torvald's comment earlier this year, I hypothesized that my roommate's hard drive was using Apple's HFS+ file system. Linux has surprisingly good support for various different file systems, even Microsoft's proprietary NTFS, so I knew that it was extremely likely that there existed a HFS+ driver for Linux.  So I told my roommate, "don't worry, I don't have a PC, I'll be able to read it just fine." It was a little presumptuous of me to think that I wouldn't encounter any issues with mounting a HFS+ drive, but I have great faith in the Linux community.

I plugged his hard drive into my laptop, turned it on, opened xterm and typed:

fdisk -l 

Fdisk listed his hard drive as /dev/sdb, but it also said that the drive's file system was unrecognizable, which I rather expected. A five-second Google search revealed that the modules for HFS and HFS+ are called "hfs" and "hfsplus." So I went into xterm again, and tried:

 modprobe hfsplus

mount -t  hfsplus /dev/sdb /media/hd

And the drive mounted without a problem.

According to SourceForge the hfsplus module offers full support for HFS+ file systems. So, yeah! Go Linux!

Tagged as: , , 1 Comment