0
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?
If you are worried about data lose, create an image of the hdd, before you try and convert it. Unless you tell us what you did exactly while it was plugged into Linux we can't tell you how to fix your problem. – Ramhound – 2014-08-08T11:24:15.113
@Ramhound I think the only action that could to this was
mklabel msdos
, which I issues fromparted
on this disk. – whatyouhide – 2014-08-08T11:29:00.910