I have a HFS+ 2TB drive that I used to use with my Mac. I wanted to read its contents from Linux (Ubuntu server 14.04) too, so I plugged the drive and played around with gdisk
, fdisk
, parted
and so on.
I think I screwed something up that has to do with partition tables; when I plug the hard drive to a Mac, it doesn't recognize it:
The disk you inserted was not readable by this computer.
When I plug it into Linux, no partitions are found on /dev/sdc
(which is this drive) and the output of sudo gdisk /dev/sdc
is:
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
I dealt before with an ext4 disk that had the same problem: I did what gdisk
told me and wrote (w
) the changes to the disk. It told me it would build partitions from scratch, which at first freaked me out, but then it worked and no data were lost. But this was an ext4 disk after all.
I'm very afraid to repeat these steps here, since I'm afraid I'll lose the data on the disk. Is it safe (or with at least a high chance of success!) to rebuild the GPT partition table and write that changes to the disk?
mklabel msdos
, which I issues fromparted
on this disk.