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.
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.


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)

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mac OS X 10.7.5 Login Loop 17 106
Linux "time" command output redirection 16 144
I need to text message (iPhone) from my MacBook 3 45
MS Remote Desktop 8 for MAC 6 15
Connectivity using SMB Symptoms When connecting to Windows Server shares from a Mac you receive an error similar to "Connection failed because the original item could not be found"Authentication persistently fails to a Windows Server from a Mac wi…
Syslogd is a utility that traps and logs messages sent by running processes. It is configured with the syslog.conf file, which consists of lines containing a pair of fields: "the selector field which specifies the types of messages and priorities to…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

776 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