Is it possible to save/restore HFS+ resource fork data from Linux?

Posted on 2008-10-01
Last Modified: 2013-12-26
When I boot a Mac(running OSX) with a live linux CD, I can mount the HFS+ partition. If I tar a folder then untar it to a different location, when I reboot into OSX, the resource fork data is missing on the copy. How can I preserve it?
Question by:jasonzx
  • 4
  • 3
LVL 39

Expert Comment

by:Eoin OSullivan
ID: 22615622
Tar does not fully preserve OSX file attributes and has issues with long filenames  in addition to other issues ..
See this forum which explains

OSX uses ditto which preserves everything

I think rsync latest version will also support resource forks

Expert Comment

by:Alex Curylo
ID: 22650944
You'll have to do a little research to figure out exactly whatever your "live linux CD" does to present HFS+ resource forks. If it is conventional, at the same place as the data fork of <filename>, you will see


If that's not it exactly, it'll probably be something similar.

When you create an archive of that under Linux and then unarchive it somewhere else, Linux will create exactly what's in that archive. But what's in the archive is not the same as the internal HFS+ representation. So when you reboot to OS X, you have the data fork in <filename> and you have the resource fork in the path above or some close equivalent, which is invisible in the Finder by default since it starts with a period, and is not an actual HFS+ fork so it's not recognized as belonging to <filename>.

As resource forks have been deprecated in OS X for several years now, the state of support for this is vanishingly likely to improve. I strongly recommend that you examine whatever the OS X task is you're trying to accomplish; there is almost certainly a more modern workflow you could be using that eliminates the use of files with resource forks.

Expert Comment

by:Alex Curylo
ID: 22650953
"vanishingly likely to improve"

I meant vanishingly UNlikely there, of course.

Author Comment

ID: 22653911
The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac.
I've had limited success with a live Linux CD using piping the harddrive thru Tar and udp-sender. Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called ''(instead of an application I can execute).
All the info I read seems to point to the fact that I'm not properly backing up and restoring the resource fork.
Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.


Accepted Solution

Alex Curylo earned 500 total points
ID: 22654090
"The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac."

By running Linux?? Yoiks. That's got epic fail written all over it :) If you want something lightweight, the Darwin source would be the place to start.

"Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called ''(instead of an application I can execute)."

Actually, those *are* the applications you can execute. Whilst displayed as a single icon in the Finder without the ".app" extension, these folders -- the technical name is "bundles" -- have been the recommended way to create an OS X application since, well, as long as there has been an OS X. I'd be more surprised to find that you had any applications on the machine that were not .app folders, these days. And the main point of bundles was -- surprise! -- to eliminate a major use of resource forks.

"Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)"

And I very sincerely doubt you will be able to in the Linux world. I'd look into using Darwin for whatever you're using Linux for, that's very likely your most promising way forward.

Author Comment

ID: 22654830
I started this project under Linux because I was more familiar with it. Considered using Darwin a while back but couldn't find any information on building a live Darwin CD. Don't suppose you know of a good tutorial for that?

Expert Comment

by:Alex Curylo
ID: 22656177
Unfortunately, nothing all that close exists so far. There's a project working on it here.

I imagine the people there would have some more knowledgeable perspectives for you on how to accomplish copying Mac volumes. I did some more googling around now that I'm kinda interested in the problem :) and I didn't see anything to change my impression that whilst you can read OS X volumes adequately using modern flavours of Linux, actually writing to them successfully is fraught with peril at the very very best.

However, if there is any solution to be found, it's almost certainly going to be with extracts from the Darwin source if not Darwin itself exactly, and the PureDarwin people would be the best on the planet to take that question up with, I imagine.

Author Closing Comment

ID: 31501991
Thanks Alex. You've been very helpful.

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built ontop of the OSX Server NetBoot system and uses images & workflows as its core assets. Although …
The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac ( - the Enterprise product vers…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now