this post was submitted on 02 Mar 2026
15 points (85.7% liked)

Linux

64087 readers
821 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

I have some old HFS formatted burned CDs burning in toast on a classic mac. A friend needs his stuff moved off these backups onto his NAS but his modern mac cannot read these CDs. I can mount them in linux manually but the filenames have illegal characters so I cannot copy them over to anything without losing like half of them.

How to I copy these files off the CDs?

all 23 comments
sorted by: hot top controversial new old
[–] bizdelnick@lemmy.ml 10 points 3 weeks ago (1 children)

You probably need to pass the iocharset mount option.

[–] muusemuuse@sh.itjust.works 4 points 3 weeks ago (1 children)
[–] bizdelnick@lemmy.ml 1 points 3 weeks ago

I have no idea. It depends on your locale on mac.

[–] tla@lemmy.world 7 points 3 weeks ago
#!/bin/bash

#
***
Configuration
***
SOURCE_DEV="/dev/sr0"
MOUNT_POINT="/mnt/mac_legacy_cd"
DEST_DIR="$HOME/Desktop/mac_recovered_files"

# 1. Ensure the system is ready
echo "Checking for HFS support..."
sudo modprobe hfs 2>/dev/null
sudo modprobe hfsplus 2>/dev/null

# Create directories
sudo mkdir -p "$MOUNT_POINT"
mkdir -p "$DEST_DIR"

# 2. Attempt to mount
# We try HFS first with MacRoman to UTF-8 translation
echo "Attempting to mount $SOURCE_DEV..."
sudo mount -t hfs -o ro,iocharset=utf8 "$SOURCE_DEV" "$MOUNT_POINT" 2>/dev/null

if [ $? -ne 0 ]; then
    echo "HFS mount failed, trying HFS+ (Mac OS Extended)..."
    sudo mount -t hfsplus -o ro "$SOURCE_DEV" "$MOUNT_POINT"
fi

# 3. Verify mount and Copy
if mountpoint -q "$MOUNT_POINT"; then
    echo "Mount successful. Copying files to $DEST_DIR..."
    # -a: archive mode (preserves symlinks, permissions, times)
    # -v: verbose
    # -z: compress (not really needed for local, but good practice)
    # -P: show progress
    rsync -avzP "$MOUNT_POINT/" "$DEST_DIR/"
    
    echo "---"
    echo "Copy complete. Unmounting..."
    sudo umount "$MOUNT_POINT"
    echo "Done. You can find your files in $DEST_DIR"
else
    echo "Error: Could not mount the disc. Ensure the CD is inserted and $SOURCE_DEV is the correct path."
    exit 1
fi

[–] just_another_person@lemmy.world 5 points 3 weeks ago (1 children)

Not sure what the actual question is here, but if the files are there, the filesystem is mounted properly using hfsplus, and you can read the files, then any incompatible characters will be properly substituted, and the files can be copied.

Your friend will just have to put some work into properly renaming then afterward.

[–] muusemuuse@sh.itjust.works 4 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

HFS, not HFS+. The characters are not being substituted. KDE throws errors and dies. rsync and cp fail to move all files, giving a list of things they skipped.

[–] Matty_r@programming.dev 4 points 3 weeks ago (1 children)
[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago (1 children)

nope, that didnt help. theres HFS stuff this system doesnt like so it can see things but not interact with them

[–] just_another_person@lemmy.world 1 points 3 weeks ago (1 children)

I'm pretty sure you just have an old and degraded disc.

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago (1 children)

I spun up an old Mac running tiger and all but one cd was read fine.

[–] Soapbox@lemmy.zip 1 points 2 weeks ago (1 children)

Can you just plug a USB HDD into that old Mac and copy the files over using that?

[–] muusemuuse@sh.itjust.works 1 points 2 weeks ago

It has usb 1, but yes that’s what I ended up doing.

[–] brickfrog@lemmy.dbzer0.com 3 points 3 weeks ago (1 children)

I haven't needed to do this myself but have a few ideas if you haven't already tried these yet

  • Are you trying to mount as HFS, or as iso9660? Those CD media you are looking are are probably hybrid ISO/HFS discs so they technically can be read in either format.. I suspect mounting as iso9660 with/without its mount options could help you copy the data afterwards. Check the man page for mount to review the options, thinking iocharset and/or utf8 could be helpful if the defaults aren't working.

  • If the standard mount / cp isn't working you could also give other tools a look. Have not tested this myself but I saw the Debian repo has hfsplus - which includes hpmount and hpcopy which should in theory be able to copy off HFS+ media. No idea if the tool also works with HFS but could be worth a go.

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago

I have been plying with hcopy but its giving me backtalk over syntax. It's whining about what it find s being directories. Yea, that why I passed -r to copy recursively. it just responds by saying thats a directory and not copying anything.

I cant figure out what iocharset is wants for normal mount options so it can copy some things that way but not others.

Also, again, this is HFS, not HFS+.

[–] elmicha@feddit.org 2 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

If nobody has a better idea, you could create a loop device with a HFS filesystem, copy the CD to that filesystem, replace all bad filenames, then copy everything to a normal filesystem.

Edit: apparently there's a --iconv option in rsync: https://askubuntu.com/a/540960

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago (1 children)

that looks like something I tried earlier that partially worked. It seems like for that method I need the iocharset declared at mount time and then to use rsync with the correct iconv flags

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago

--iconv shows option not supported

[–] db2@lemmy.world 1 points 3 weeks ago

Spin up a hackintosh to read it.

[–] Truscape@lemmy.blahaj.zone 1 points 3 weeks ago (1 children)

Have you tried creating a period-accurate Mac VM, allowing passthrough of the drive peripheral to the VM, then copying the data from the VM to something like a Mac format flashdrive?

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago (1 children)

Then what would read that flash drive? That doesn’t solve the problem.

[–] Truscape@lemmy.blahaj.zone 2 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I was under the impression that the barrier for the friend's modern mac being unable to read the drive was due to the lack of hardware interface. Is there a greater barrier than that for the data?

If the data itself needs to be converted, consider looking for tools that can function from inside the VM (so none of the original data is lost before translation).

[–] muusemuuse@sh.itjust.works 1 points 3 weeks ago* (last edited 3 weeks ago)

oh no, sorry, we have external CDroms. its the file names themselves. not the data within.