81
Views

This will be a quick guide to understanding how to mount an HFS+ external dive on Linux.

Install support for HFS.

You will need to install hfsprogs which will add support for HFS first. This is easily done with apt.

sudo apt-get install hfsprogs

Finding the drive information.

You will want to start by finding your device as it’s attached to Linux. You can use Fdisk to list all of the drives. You will want to look for your external device. For me it was listed as /dev/sdc1. You will see some additional details but your are looking for the device information like the examples below.

sudo fdisk -l

This is the main HD.

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sda1  *          2048 3898658815 3898656768  1.8T 83 Linux
/dev/sda2       3898660862 3907028991    8368130    4G  5 Extended
/dev/sda5       3898660864 3907028991    8368128    4G 82 Linux swap / Solaris

This is the external I’m looking for.

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1           2 1953458175 1953458174 931.5G af HFS / HFS+

Creating the mount point.

To actually mount the device, you will need to create a folder to mount the drive to. In my case I’m just going to call it external but you could call it anything you would like. You can also put it in your home directory or anywhere else for that matter but the standard mount point that you should get used to is /media.
Here is how to create a folder called external that we will use.

sudo mkdir /media/external

Now create the mount.

You will be mounting with this command which will make the drive both read and writable. You will notice that you are mounting sdc1 to external.

sudo mount -t hfsplus -o force,rw /dev/sdc1 /media/external

Conclusion

This is a quick way to get your drive mounted. You could add this information to your /etc/fstab file which would load the mount automatically but if you are removing and re-adding a couple of drives the the machine, you may actually find that the device name changes from sdc1 to perhaps sdb1. I like to mount the drive when I need it and it will stay mounted until I unplug the drive or reboot the server.

Article Categories:
Tech
SDATIC

Web developer and former photographer by trade...gamer and all around tech enthusiast in his free time. Christoph started sdatic.com as a way to organize his ideas, research, notes and interests. He also found it enjoyable to connect and share with others who parallel his interests. Everything you see here is a resource that he found useful or interesting and he hopes that you will too.

Leave a Reply

Your email address will not be published. Required fields are marked *