MacOS – How to salvage macos resource forks when copying from a non hybrid ISO 9660 Rockridge CD

macosrecoveryresources

I have a set of ten years old archive CD-ROMs burnt on a OS9 Mac system by (potentially) choosing wrong options by a colleague. If mounted on the desktop of a recent MacOSX System (eg. 10.5.8 to 10.7) typically files with data in the resource fork (font files, aliases, text clippings, icon files) are displayed as empty files in the finder. Fortunately the data seems not to be lost finally (see the results below). I could retrieve the resource forks separated as files with the prefix "._".

Is there any known method to recombine/restore those separated hidden resource forks automatically with the main data to regular old style" macintosh files for a whole disk?

My results:

Copying the files back to disk with the finder via drag & drop does not solve the problem.

Copying the files via terminal with the "cp -r [source] [destination]" option has neither a success.

Using the alternative "cpmac" command instead of "cp2 has also no positive result.

Now if I use the "cp -r -p [source] [destination]" option, I get errors with some permission issues, but I find files with the same basenames but a prefix of "._" on the destination disk. These files seem to contain regular font file resource fork data.

The logged errors were for each file:
cp [sourcefilepathwithprefix] : could not copy extended attributes to [destinationfilepathwithprefix]
where prefix is "._"&[filename]

Annother minor issue is that the filenames contain "German umlauts" that were replaced with underscores. I cannot figure out if there is any retrievable information there to restore the original encoding.

I seems that the originally intended session containing the relevant hybrid mapping (HFS filesystem) for Apple Extensions was either lost or is now unreadable.

Best Answer

If the resource forks are available under the names you're describing, here's a way to recombine them:

cp -a /source/filename /destination/filename
dd if=/source/._filename of=/destination/filename/..namedfork/rsrc

This will still not copy over the type/creator and other Finder metadata, but it will copy over the resource fork.