When the storage devices having HFS filesystem format are attached to the Raspberry Pi operating system, the OS is unable to read the data stored in the storage device, so to read data from HFS storage devices, we have to enable support of HFS on Raspberry Pi, whose method has been discussed in this guide.
How to enable support for HFS on the Raspberry Pi operating system
To enable the support of HFS on Raspberry Pi OS, we will install some packages of HFS and their dependencies from the default repository of Raspberry Pi OS using the apt package manager:
When the packages are installed on HFS using the above command, by default the support is enabled on HFS on Raspberry Pi and the storage devices of HFS format can be readable by Raspberry Pi OS.
How to mount the HFS storage device manually on Raspberry Pi
If the Raspberry Pi does not mount the HFS-based storage devices automatically, then there is no need to be worried, we will discuss another manual method to mount such devices on the Raspberry Pi. First, we will make a directory with the name of hfsplus so that all the data of the HFS storage device is stored in this newly created directory:
Now we will list down all the attached devices using the command mentioned-below:
The name of the device will be like sdb1 (you can find the name either by its name or size), here we are using the “<device-name>” instead of the exact name, so in the next command, replace the <device-name> with your device name:
How to format the HFS storage device on Raspberry Pi
To erase all the data from the HFS based storage device, run the command by replacing the “<device-name>” with your storage device name:
Conclusion
HFS is a file system that was used in the older versions of macOS before the OS X was released, but now the Apple devices also do not support this format. If you have storage devices of the HFS file system and you want to connect it with Raspberry Pi to read data, then you have to enable its support which has been discussed in this guide in detail.