Creating and writing to HFS+ partitions without a Mac

Warren Rodrigues

Recently, a Mac formatted hard disk came in for data recovery. Previously, I have read data from Apple's HFS+ file system (also known as Mac OS Extended) using TestDisk and other similar tools, on my Windows 10 machine. I usually dump the recovered data onto a FAT or NTFS drive. However, this particular client wanted the data to be delivered on a new 3TB external disk formatted in HFS+ format.

Some forums suggested using Transmac or Paragon HFS+. Both are commercial software, with free trials. Transmac threw a "cannot format" error; and I couldn't find the format option in Paragon HFS+.

Another option I use often is a live boot of Ubuntu Linux. The version I use (16.04.3) has HFS+ read support, but no write support. So, I installed a package to enable write support, by starting Terminal and typing:

sudo apt-get install hfsprogs

Next, I started GParted (a free partition editor for Linux) and selected the new disk from the top right corner. Tried formatting it and got an error similar to "the maximum partition size cannot be larger than 2 TB."

Further research showed that this error is actually a limitation of the MBR partition table. And that the GUID Partition Table (or GPT) allows partitions larger than 2 TB.

So, I needed to re-initialize the disk. To do this, I booted Windows and opened a Command Prompt window:

  • Click the start icon
  • Type cmd
  • Right-click the "Command Prompt" result and click "Run as administrator"

Then, I started the diskpart tool:

  • To start the tool, type
    diskpart
  • Next, list the disks connected to the system, by typing
    list disk
  • Note the number of the disk you need to re-initialize and type (without the curly brackets)
    select disk {number}
  • Now type
    clean

    (Warning: This command will delete the entire disk; make sure you have selected the correct disk to 'clean')

 

After this, I opened the Disk Management tool, by clicking the start icon and typing diskmgmt.msc
In the lower panel, I right-clicked the recently cleaned disk and initialized it as GPT.

Re-booted into Ubuntu Linux, installed hfsprogs (for HFS+ support) and started GParted. And this time it successfully formatted the whole 3TB disk in HFS+ format.

Then, it was just a matter of copying over the recovered files to this new disk, which took about 12 hours :|







Please enable Javascript to view this site properly.