Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I believe the motherboard on my macbook died, so I'm trying to recover the information on the disk. I pulled the hard drive from the macbook and plugged it into one of my SATA ports on my Ubuntu machine. Unfortunately, I can't seem to mount it:

mgilson@iris:~$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       38914   312571223+  ee  GPT

Disk /dev/sdc: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005ee8d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       29274   235141120   83  Linux
/dev/sdc2           29274       30516     9973761    5  Extended
/dev/sdc5           29274       30516     9973760   82  Linux swap / Solaris

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008695d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      243201  1953512001   83  Linux

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000efe53

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243202  1953514583+  8e  Linux LVM

It's the 320Gb disk, so it should be on /dev/sda1 if I understand this stuff correctly. Unfortunately, when I try to mount it:

sudo mkdir /media/Mac
sudo mount -t hfsplus /dev/sda1 /media/Mac

I get the following error:

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Looking at the output of tail, I get:

[ 1325.009342] hfs: unable to find HFS+ superblock

So, perhaps this isn't an HFS+ partition. Is there any way to detect what kind of partition it is?

share|improve this question
    
Which Gnu+Linux are you using?, on Debian(and some others) you can go to /dev/disk/by-… these by directories categorise all disks that the OS finds by different keys. Such as id, guid, label, path. You should be able to find the partition using there no need for `fdisk or similar tools. –  richard Aug 7 at 11:10

2 Answers 2

fdisk is for hard drives that are still using the old legacy Master Boot Record (MBR) partition table format.
GParted is for hard drives that are using the modern GUID Partition Table (GPT).

Hard drives that use GPT often have a "Protective MBR" (PMBR); a fake MBR to try to keep old school MBR-centric formatting/partitioning software from thinking the hard drive is unformatted. The PMBR basically lies and claims that the whole hard drive is allocated as one huge partition.

Macs with Intel processors (read: since 2006) have required or at least strongly preferred GPT for internal/bootable hard drives.

The copy of fdisk you ran was at least smart enough to detect that it was looking at a PMBR on a GPT drive, and print a big warning on the first line of output that you needed to use GPT instead.

Using an MBR-only utility like fdisk to try to figure out the partition table of a GPT drive is an exercise in futility, since the PMBR doesn't even try to stay in sync with the authoritative info in the GPT.

share|improve this answer
    
Thanks. Is there a command I can issue from the commandline to get fdisk like output via gparted? –  mgilson May 8 '13 at 12:31

I pulled up GParted and took a look and it appears that the stuff on /dev/sda1 is actually a fat32 partition and the partition I was looking for was under /dev/sda2. The moral of the story is that it seems that, like @Spiff said above, GParted (and parted) are for reading GPT partition tables, and fdisk is typically for reading older tables, such as MBR ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.