I have attached an HFS+ hard drive with Mac OS X installed to an Ubuntu machine because while booting the Mac shows a blinking folder with a question mark. I searched Google and the results say that the 3 TB HDD is damaged. When I attach the HDD it reads well in Ubuntu.

So my question is how can I reformat the HDD with HFS+ in Ubuntu without using Mac OS X?

I am using Ubuntu 14.04 and the HDD is perfectly fine - I have tested it. Just wanted to reinstall every mac osx hdd so that it can boot up.. I paid a lot for that ...

  • What version of ubuntu? What hardware are you running it on?
    – bmike
    Nov 5, 2014 at 1:21

3 Answers 3


To answer your question:

You can format a drive in Ubuntu with the HFS+ format by using either gparted or by installing the hfsprogs package - use sudo apt-get install hfsprogs to install the program.

As for the additional details in your post, it is concerning that you have determined through Google that your drive has failed. To properly determine if your drive has failed, you need get the SMART diagnostic info from the drive itself. If it responds back with anything but "Verified" then your drive has a problem.

It is also important to note that "formatting" a drive will not repair it. You will just make those bad sectors availble for writing again which can and will lead to data loss.

Under OS X, you can get it by issuing the command:

diskutil info diskx | grep SMART

(Substitute x with your disk number; most likely 0)

However, that may not be enough. There is a free utility I have used to verify my drives, it's called DriveDX and it's reporting capability is completely free.

Before formatting your drive, I highly suggest you take a look into these areas first.

  • 3
    To use GParted to format HFS+, it requires the hfsprogs package be installed. Dec 30, 2016 at 13:19

The question mark does not necessarily mean that the drive itself is damaged. It could also just mean that the data stored on the drive is not structured correctly. If you have edited partition tables, moved partitions or changed system files that could happen.

There's really no need for you to use Ubuntu to format the drive. It seems to me that you think that OS X cannot read/write your drive because of the question mark, and that's why you want to use Ubuntu. This is not the case.

If you can read/write the drive using Ubuntu, you can do so with OS X as well.

I would recommend using ordinary OS X Recovery Mode to reformat and reinstall OS X. You can initiate Recovery Mode by booting the Mac holding down the Cmd and R buttons.


If the HDD is damaged, and you try to format, you will lose all of your data and operating system (unless this is a multi-drive computer and the damaged one is not the one with the operating system, in which case it should boot up fine)


It appears that the latest GParted can create HFS+ partitions. You can look up tutorials on how to install and use GParted here, but check out this. The guide says windows, but the UI is identical. Also, to install on Ubuntu, run sudo apt-get install gparted in the terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .