Windows

Apple's incompatible filesystem


I'm not going to deny it, there are things about Apple that I like. I own an iPhone and an iPod. My wife uses a Mac. I like their design concepts and their marketing. But there are some issues that I do have with Apple, and these issues are inches from wanting me to pull the plug on my support of Apple.

One of these issues is the Apple hfs+ filesystem. Let me tell you where I am coming from.

A client of mine had a MacBook Pro that was the victim of a friend dumping an entire glass of water over. The laptop was fried. Outside of that fact, the friend was a deadbeat and wouldn't help pay to replace the laptop, my client had a year's worth of data on the drive and no backup (another hard lesson for the client). So I told the client I would do everything I could to recover the music.

Naturally, I figured the easiest route was to take out the hard drive, put it in a case, connect it via USB to my Ubuntu machine, mount it, and copy the files onto my data drive -- the best laid plans of mice and men....

The first time I plugged it in and mounted it with the mount command, I was able to see the drive and even see the data. But I couldn't retrieve the data because the only way to mount the drive was read-only. So I unmounted it to try something else. Problem was, after unmounting it, the drive was no longer accessible with the mount command. So I tried hpmount and hmount (part of the hfsutils program) and gparted. Nothing would work. I was getting errors that the drive was not a Macintosh HFS volume or that the volume wasn't wrapped. No matter what tool I tried, I couldn't get to the data.

So much to my dismay I had to hop over to a Windows machine and attempt to save the data with various third-party applications. Naturally, being an open source guy, I downloaded demo after demo to see if I could find a tool that would "for sure" get the data off the drive. After going through a number of applications, I found none that would ensure the data would come off the drive -- so I wasn't about to purchase the tools.

After going back to the client to let them know there was no "free" tool to get the data, the client said the data wasn't that important, and I could just re-partition the drive so that it could be used as a storage device so the client could back up data and move it from machine to machine.

That's where gparted came into play. I was happy that there was finally a tool in this ordeal that had no problem doing what it needed to do.

But what this little rant is ultimately about is that dastardly Mac filesystem. What I don't get is that Apple took the BSD subsystem and the AT&T System V and created OS X. What I don't get is why didn't they just stick with a standard UNIX-like file system? Wouldn't this have: (a) made less work and (b) ensured UNIX compatibility?

Or is that my answer? Did Apple not want UNIX compatibility? On a number of occasions (and with a number of devices), I have had to deal with incompatibilities on the part of Apple. And the more I deal with it, the more I start feeling like Apple is like Windows back in the 90s -- when I was struggling to get any given version of Windows to talk with Linux. Ultimately, I won that battle. But the OS X battle seems to be one that might be more of a challenge, and that is disturbing.

The more I look at it from the inside, the more I realize that Apple is really no better than Microsoft when it comes to not wanting to play well with others. Sure, there are things that OS X does better than Windows (like connecting to Samba shares), but at least I can, without much headache, mount a Windows drive on a Linux machine to recover data.

I wonder -- in the end -- is Microsoft going to come around before Apple will and fully embrace Linux?

Did I really just ask that question?

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

62 comments
thomas
thomas

The reason for OSX's filesystem (HFS+ with extensions) is OS9 and earlier MacOS. It had data and resource forks and the OS9 software - and there was a lot of it for SEVERAL transitional years had to run. The dual-forks don't translate into unix at all, so had Apple done nothing, OS9 software would not have run, nor could you simply install OSX over OS9. There are other things like attribute bits that don't exist, or case sensitivity (doesn't ReiserFS have similar disjoint mappings?). Why do we have FAT filesystems? The DOS-like command line? Windows had similar things going on for similar intervals. Can you run a Windows 3.1 program under XP? 2000? I think OS9 worked for at least 5 years (it may still work now) after OSX became the standard Apple OS. NTFS write (at least reliable) is a recent addition to Linux, but it still doesn't support symlinks. I suspect the problem with hfs+ was that journaling was turned on (and isn't supported yet in Linux) and you weren't using a new enough toolset. This would be analogous to trying to use an old ext2 set of tools on ext3. I've never had any problems like you describe, and move external drives across all the time. Another problem is that an HFS plus volume (which it probably was) WILL mount as the old HFS - but it only mounts a stub. This is also backwards compatibility (I forget if it was OS6,7,or 8 that introduced the new FS). If you tried mounting HFS+ as HFS you would get the results you saw. Also the Mac partitioning scheme is different (I managed to get my HFS+ iPod mounted on my Nokia tablet which supports neither out of the box without updating the kernel using the loopback device, but I understood what was going on). It probably wouldn't have been a problem if you simply attached the hard drive to another Mac, or even a hacked OSX "any laptop" install boot CD, where you could get a disk utility and console to copy files. If I hand you a random disk from a computer, and you don't understand its filesystems, and don't take time to research, you shouldn't complain. Linux supports dozens of filesystems, but most must be built and installed as extras, and then the right one with the right parameters has to be selected.

CharlieSpencer
CharlieSpencer

What's with all the derogatory posts from day-old members? Is this thread flypaper for newbies? Was this article discussed at the last meeting of the local chapter of "Apples for Morons"? Is it just a single individual registering multiple times? In any case, he / they are bringing nothing worthwhile to the conversation. This is one of those times when I wish the "Spam" button was labeled "Pointless Content". Jack, ignore them.

jdclyde
jdclyde

In read only, why were you not able to read the data? And anything you can read, you can copy. An oops?

tobybray
tobybray

Nimble, open, and flexible. Something every cutting edge OS should strive for.

jmosher2
jmosher2

Debian linux is the best OS I have ever used. Stable, reliable, but be aware, not for the brain dead.

jon
jon

"But I couldn???t retrieve the data because the only way to mount the drive was read-only" Dude... seriously, are you fscking kidding?

srswart
srswart

Kookie story, daft logic, kookie result, daft conclusion, kookie writing; Kookie, daft and kookie!

affac7
affac7

mount -t hfsplus ...

poe_diddley
poe_diddley

so basically instead of following the proper procedure by using a Mac to retrieve files from a Mac hard disk, you were too lazy or cheap to do this, and instead tried to use whatever computer you had on hand, and wasted your friend's time and files, and you blame Apple? i really hope that no one anywhere has ever paid you for IT work, because you might be the worst IT guy i have ever heard of. Trying to use an incompatible machine to attempt to salvage files is your fault. Giving up and telling your friend it was a lost cause and him/her choosing to just erase the disk is also your fault. Anyone with a Mac could have retrieved all of the files successfully. I am a Mac and PC user, and I have never once had any problem similar to yours, simply because I would never try to retrieve Mac files on a Windows machine or vice versa. It was just a lazy move on your part. All you did was try to find this or that third party program to solve your problem when all you had to do was borrow someone's mac for a night, or god forbid, take it to the Apple store. They chose the file system for a reason, obviously beyond your comprehension, not to make things more complicated for lazy IT guys....

chelless
chelless

What an uninformed, idiotic article. Not a "Mac guru," huh?

right
right

Clearly the title attracts more readers than your actual story deserves. Drawing the conclusion that Apple's filesystem is incompatible is just bad logic and really dumb. Reading your article was 2 minutes of my life I will never get back. Thanks.

Rejoined
Rejoined

Personally, I think this is one of the most ridiculous articles I've seen written about problems with Apple. Really, it's the HFS+ system? The one that's been in use for god knows how long, close to a decade or more? NOW it's an issue? What, do you have a problem with the lack of a floppy drive, too?

brian.nitz
brian.nitz

Your poll questions are confused. Neither Linux, nor MS Windows nor OSX are "filesystems." Linux is a kernel, MS Windows and OSX are Operating systems (GNU/Linux is an operating system.) As for the most compatible filesystem, the following modern filesystems are supported natively: MS Windows XP:FAT32, NTFS OSX: HFS+, HFS, UFS, FAT32 (NTFS Read Only), ZFS GNU/Linux: UFS, ReiserFS, Ext2, EXT3, FAT32, (Some distributions can be hacked to write NTFS but AFAIK, no distribution yet supports such a configuration.) Linus's fanatical take-only license (aka GPL) prevents its native filesystems from being implemented in any non GPL/Linux kernels. OpenSolaris: UFS, FAT32, ZFS. In summary, UFS, ZFS and FAT32 are the only filesystems which are supported in more than 1 OS and ZFS is _much_ more advanced than UFS or FAT32.

g046678
g046678

I don't appreciate the logic employed to solve this problem. Also downloading freeware isn't the same as open source.

ny7842
ny7842

I bet his MacBook Pro was running Leopard, you can't fix permissions for Leopard using Tier or Panther. How many times have you used a Mac?

LucasConsulting
LucasConsulting

Ontrack makes a nice program for windows that will recover ANY FILE SYSTEM. check it out

fred
fred

Hi Jack, Come on! You call this a story. There are several major reasons Apple utilizes the HFS+ file system. I am not going to share them with you because you are supposed to be the high-priced tech expert. Do a little 'googling' and you may get an education. I guess it must be a slow news day... Yawn... Looks like anyone can get a job writing columns.....

radwansk
radwansk

1. #>man dd 2. execute using if= (as the bad mac raw disk device) to of= (another raw disk device). 3. Stop whining about incompatibility when you don't know other ways of dealing with the problem. Any read operation on a raw disk doesn't require the disk to be mounted. There are all sorts of fileystems ubuntu won't deal with, without risking the corruption of data. For instance the mac, and windows, use these things call ACL's. Your simple copy operation will munge all of it. use DD and get the blocks off the raw device and you'll maintain everything as it was intended, and perhaps save us all from another column talking about incompatibility. Another option is to tar up the raw device. Similar to the above if you can't clone directly to another HDD. Now if you try this and it fails to grab all the blocks on the disk then the HDD is toast. It wouldn't matter if it were windows, linux, solaris, HP, AIX, VMS, or mac. HDD fail the same no matter which OS wrote to a partition on them.

pr05p3r0
pr05p3r0

If they had apple care, you can overnight your macbook to them and they will recover any data from the drive. I had something similar happen to a g3 clamshell running os 9 and I just put the drive in a usb drive enclosure and copied the files right off it using a mac running Tiger. Also, OnTrack and Action Front will recover data cheaply if it was that important. As to why apple does hfs? because they can. Closed architecture, closed everything. Its why they usually don't break. Yours is a disaster recovery issue and poor planning by the user, not a reflection on the product or the company.

nona
nona

to fix a mac - doesn't take a 'mac genius' to figure that out...

Larry the Security Guy
Larry the Security Guy

"But I couldn???t retrieve the data because the only way to mount the drive was read-only." Why?

sharbour
sharbour

I'm probably misunderstanding something here, but you stated you could mount the drive, and see the data in read only form. If you can see it, you can copy it to somewhere else, like another USB drive or HDD, whatever.

winch1020
winch1020

Apples incompatible filesystem is probably one of the net results of the apple engineers trying to develope a superior operating system that has higher ,inherant anti-virus properties than the more popular microsoft windows O.P. system which is a more virus suceptable format , possibly. Even,if the Apple O.P. system happens not to be any more superior than the Microsoft Windows system the Apple engineers have still succeded because by designing a format that differs enough from Windows; the result is like an inoculation that inherently offers better virus protection , since hackers concentrate there virus designing on the more popular Microsoft Windows format and can not as easily get two birds with one stone.

dan.gale
dan.gale

Complaining about this is like complaining that a petro car can use diesel fuel. Why didn't you just attach the drive it to another Mac? If you are expected to "support" macs wouldn't you know about the file system and know what to do. Seems like a simple solution to me.

joudanzuki
joudanzuki

Hopefully these guys aren't coming from Groklaw, most of the Groklaw crowd are at least as polite as I am. (Yeah, I suppose I could have been a little more polite, too.) But Jack does show evidence of unfamiliarity with the Mac platform and of a certain lack of depth on *nix. I'm not sure whether he simplified his description for the expected audience or what, but there were still several points he missed. HFS tools on *nix are not as mature as FAT32 tools for several reasons. Some of those are mentioned in the READMEs for the tools, and HFS usually mounts R/O on Linux systems because of some of those reasons. There's a reason those READMEs are there. The tools work better with HFS than with HFS+, for instance, and struggle a bit still with Journaled HFS+. Some of the tools are intended to be used without mounting the drive, even. I'd recap, to make it easier to see the steps, but I don't have the time. Jack, don't take the negative comments too seriously, we've all been newbs. (I'm still a newb, after how many years? Heh. I'm not telling. ;-) Look at the stuff you can understand, ignore the insults unless they contain technically useful stuff. (Sometimes insults can be worded in such a way as to provide important clues if you read without letting you ego get in the way.) If you have time, play around with some of the stuff suggested, and remember that mv definitely is not supposed to work when the source is a R/O device. (The suggestion about dd of=image.iso is something I going to go practice on known good hardware, because I know I'll want to use it again.) jdz

jdclyde
jdclyde

it would point out which posts are worth reading and which ones aren't. Personally, I never read posts where the poster was to dumb/lazy to even change the title to represent what their post is about. If it means that little to them, it means even less to me.

muir_bear
muir_bear

_ The deeper issue is that current era OS's (Win/Lin/OSX/Unix) put barriers between the user and supporting multiple file systems. 1) I find the lack of Linux swap partition support in both Windows and BSD to be a waste of space (I tested multi-boot Lin/Win/BSD rigs in late 2007). Both OS's should have an option to shrink their native swap files to ~256MB and make the Linux swap partition the primary virtual storage. 2) PuppyLinux was the only distro out of several (others : UBL-EL4, UBL-EL5, OpenSuse, Mepis) that came with a GUI mount/browse/dis-mount tool. Come on people - Linux's target audience includes people who have to support multiple file systems. It's very awkward to use an external DASD (aka HDD) that was factory formatted with NTFS on a Linux system. (I know I could put FAT32 or one of the Linux FS's on there but I don't trust FAT32 and the drive is intended to be a Win/Lin backup.) 3) Errata : ----------- WinXP : FAT16, FAT32, NTFS4 (RO?), NTFS5 Linux : FAT16, FAT32, NTFS (version varies depending on distro), HPFS (remember OS/2 ?), BeFS (remember BeOS ?), etc. Links -HPFS info BeFS aka BFS [STALE] BeOS : BeFS, FAT16, FAT32 (???), NTFS4 FYI - I own copies of DR-DOS, BeOS, and OS/2 Warp 4 in addition to several flavors of Windows and Linux and a downloaded copy of PCBSD 1.4. Putting together a multi-boot rig can be very frustrating and bizarre but also very educational. TK

g046678
g046678

I don't appreciate the logic employed to solve this problem. Also downloading freeware isn't the same as open source.

j-mart
j-mart

And I don't Have to offer any evidence to back it up. Oops sorry I thought I was Fred for a moment. But seriosly, I work in enginnering / manufacturing where we have the advantage of having systems of standards to work to. There are many, ISO, DIN, JIS, ANSI etc and every corner of the world may have their preference, but they are all well defined and published, so it is possible to work with equipment from all over the world. If only the IT world worked on a system of published standards. It would certainly help with different file systems if they were defined standards

CharlieSpencer
CharlieSpencer

"There are several major reasons Apple utilizes the HFS+ file system. I am not going to share them with you because you are supposed to be the high-priced tech expert." Then share them with the rest of us. Your post looks like your struggling for content too, and have resorted to sarcasm as a method of gaining attention.

Neon Samurai
Neon Samurai

I've always kept a third party application in windows to read too iso. With Mandriva, I went looking for third party apps initially before I read that handy tip. I've used DD to write .bin too fd0 but didn't initially think to just write a device too an iso file name; so beautifully simple some times. :)

dspicer777
dspicer777

Apple doesn't offer data recovery with Apple Care, I tried that one with an iMac that the logic board died on. They told me if I wanted to get the data recovered that I had to send it to a recovery company. So I just took the drive out and plugged it into my other Mac at the office and transfered the data.

kingttx
kingttx

I was wondering the same thing. If it's read-only, then you can read the data off the drive and write it elsewhere. That issue is now history in this case, so we return to the original focus - why is it so hard to mount HFS on another OS, whereas there are plenty of tools in all OS's to mount Linux and Windows filesystems?

jlwallen
jlwallen

i was able to see it once. then, after cleaning unmounting the drive (i'm anal about mounting/unmounting) i couldn't see it again. couldn't even mount the drive after that. i believe that is when the inner hfs+ partition became unwrapped.

rhomp2002
rhomp2002

The hackers broke OSX in a matter of just a couple of minutes at the hacker contest only a month or so ago. Windows broke the next day and they never did break Ubuntu.

jlwallen
jlwallen

on two different macs (one with panther and one with leopard). one would see it but couldn't repair it (because of the wrapping issue) and the other couldn't even see it.

eurojames
eurojames

I like your style! I hate reading 'know-it-all' posts that don't elaborate as it may give away their actual lack of knowledge!

jdclyde
jdclyde

After all, he has been here on TR for almost a day, so you should recognize his obvious skills by now?

Dumphrey
Dumphrey

over existing native file systems? Ext3, XFS, ReisersFS, all have usage and place that will surpase HFS if used as intended. HFS would render Windows unreadable, and NTFS in Linux was for compatibility with the major vendor out there. HFS for windows and linux would be solely for compatibility, and thats a low priority seeing Macs market share. But, all that said, Im suprised someone has not written a Linux kernel module for HFS simply "because they could." maybe someone has, its been years since I compiled a kernel, gettinglazy.

ITCowboy
ITCowboy

If you mounted it once, and was able to see it, you should have gotten the Data then, even if it is read only. Any good Tech knows that when recovering data, especially from a system that was "Lost", no matter what the reason, you get what you can when you can. If you would have simply recovered the data first, there would have been no problem. Even if you must manipulate the data on the drive, which I am unsure as to why you would at that point, you would first recover all, or even part of it as a standard before trying to do anything else. It does not matter that after you unmounted the drive, something happened to it. The Data loss in this case seems to be a Rookie mistake that was easily avoidable, as you could have, but chose not to, recover it.

joudanzuki
joudanzuki

So it was Safari, on the Mac OS, that they took down. Only read a file that they shouldn't have been able to read, but of course if that file were the encrypted password file they'd have a good possible path in for brute force. If they could have taken down the OS directly, it'd have gone on the first day. (Stupid passing URLs along in a misguided attempt to try to make the entire web mountable.) And, remember, they were pretty confident they could have taken the Linux box down with the same vulnerability in Flash that they took down the MSWindows box with. Basically a very similar vulnerability. If they had been allowed to use known issues with MSIE, you can bet it'd have gone on the second day, soon after the Mac, if not on the first day well ahead of the Mac. However the grandparent is a little out in left field if he's implying that HFS+ is more resistant to malware than native unix file systems.

dspicer777
dspicer777

Odd, and the HD worked after you re-partitioned it? I've had computers pop on me, and still, I've never run into the inability of being able to somehow recover or repair the data (except when the drive failed) even for our Macs.

nona
nona

and it still didn't work, it's not the fault of the OS - it's a hardware problem

radwansk
radwansk

It does exist: http://www.linuxquestions.org/questions/linux- software-2/mounting-hfs-volumes-under-linux- 521189/ and here's the source: http://sourceforge.net/projects/linux-hfsplus happy hacking so long as we don't use the mv command on the source platter when doing data recovery! (not mentioning any columnist names jwallen) It would seem to me a rookie thing to do, this corrupting the source data from subsequent recovery attempts by using mv, because cp didn't work. If a file level operation fails, you go to the raw level and see if the raw device also fails. Admin 101.

rfabbri
rfabbri

The driver is there, question is how good it really is. When configuring Kernel 2.6.24, you get the option: CONFIG_HFSPLUS_FS: If you say Y here, you will be able to mount extended format Macintosh-formatted hard drive partitions with *full read-write access*. This file system is often called HFS+ and was introduced with MacOS 8. It includes all Mac specific filesystem data such as data forks and creator codes, but it also has several UNIX style features such as file ownership and permissions.

mfarrenk
mfarrenk

No, the mistake was mounting the drive in the first place. An image should have been made of this drive before an attempt to mount it was even made. Although marked read-only, it is not unheard of for a system to make changes to filesystem metadata even in RO mode. dd is your friend. I've never had it happen to me, but I don't want it to happen. That's why I always image first.

CharlieSpencer
CharlieSpencer

First, welcome to TR. You're new around here, and you may not be aware of Jack's standing within the local community. Until you learn who's who, you may want to refrain from judging others. I'm not saying he necessarily took the right approach, but you could post your answers in a less derogatory fashion. Check out someone's profile and history instead posting an opinion on a single discussion. For example, your profile says you're an "IT Consultant" but has no background or history information. Is data recovery your area of expertise?

dr_dukes
dr_dukes

For any disaster recovery efforts, the tech should consider how important the data is in question. With that said... a) You shouldn't assume that your important data will be recovered safely with free tools. b) Your first step should have been to try and mount it on a Mac with commercial grade software tools to copy the data off FIRST. Worry about manipulating the drive after recovery. c) Learn from any mistakes. Looks like you've made plenty.

jlwallen
jlwallen

when i first mounted it i saw the data, tried to copy the data but go the "read only" error. i tried to move the data - same thing. i tried manipulating the data in a file browser (konqueror and nautilus) but no go. i tried forcing the cp and mv as root. nada. so i decided to unmount the drive so i could mount it "rw". but once it was umounted it wouldn't remount. this was not a "rookie error". although i am not an expert on data recovery (never claimed to be) i do know my way around mounting drives and filesystems.

joudanzuki
joudanzuki

speaking of which, I would not trust the drive with important data now, even re-formatted.

Editor's Picks