Mounting a multi-partition (GPT/HFS+) USB 2.0 harddrive on Debian

6,179

Gnu/Linux is supposed to mount HFS+ automatically, and 'just work'--it even has all the packages pre-installed typically. You may need to install hfsprogs and any other "hfsp..." packages you are missing. I've seen disks like yours plug-n-play into Debian.

The support for hfs+ has reportedly (I will post a link, can't find it at the moment) been troublesome, in the most recent kernels, since around Linux 2.7 times, so the workaround is to use the -t hfsplus and -o [all options needed] for mount. Your kernel is probably already telling you to possibly use the force option, and is explaining that this is risky.

There is a really great explanation of how to do this, in this post, and of course more information is on on the man pages for mount and hfsplus.

This greatly assumes that your disk is not messed up, for example containing data from old installations or being otherwise corrupted.

Since you created the disk on a Mac, be sure also the table is actually GPT, and not an apple partition map or even some type of other table or hybrid-table; user sourcejedi recently pointed this out to me.

If you'd like to post an update, I will gladly follow-up on this answer and/or provide more research if you can post the output of viewing the disk in gparted (or gdisk as mgorven suggested above), as well also post information from dmesg from just after all of the above commands and trying to mount the specific partition /dev/sda1 using the correct offset and sizelimit, as I mentioned.

Share:
6,179

Related videos on Youtube

Paulo Tomé
Author by

Paulo Tomé

Updated on September 18, 2022

Comments

  • Paulo Tomé
    Paulo Tomé over 1 year

    I have a 3TB USB 2.0 hard-drive which has two HFS+ (Mac) partitions using GUID partition table for the partition records. It was partitioned with macOS Disk Utility. How can I mount these partitions on a Debian system, specifically a Netgear ReadyNAS?

    Running

    mount -t hfsplus /dev/sda1 /mnt/usbtemp/
    

    reports the following:

    *mount: /dev/sda1 is not a valid block device*
    

    Running

    fdisk -l
    

    raises the following issue:

    WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

    Running

    parted /dev/sda print
    

    reports the following:

    Error: Unable to open /dev/sda - unrecognised disk label.
    Information: Don't forget to update /etc/fstab, if necessary.

    Is it possible to mount these partitions on my Debian system?

    • Admin
      Admin almost 12 years
      Does /dev/sda1 exist? Use gdisk to inspect GPT partitions, i.e. gdisk -l /dev/sda.
    • Admin
      Admin almost 12 years
      @mgorven good point about using gdisk instead of fdisk. As for /dev/sda1, it most probably exist or the error messages would be completely wrong.
    • Admin
      Admin almost 12 years
      If you don't get an answer here, your question can also be posted on Super User. They are more people there so more chance that someone knowledgable answer you. If you do so and get an answer there, please answer your own quesion by linking to the answer on Super User.
    • Admin
      Admin over 11 years
      You might also want to check whether CONFIG_EFI_PARTITION is enabled in kernel configuration (it should be).