My wife's OSX laptop won't boot. I've pulled the drive out and plugged it into a USB adapter and can see it from my Ubuntu laptop.
When I plug it and run gdisk I get the following output:
matthewh@drone:~$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): p
Disk /dev/sdc: 976773167 sectors, 465.8 GiB
Model: FA GOFlex Desk
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): F660E686-2651-434C-BC89-334BFB8D3282
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 13 sectors (6.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 975503591 465.0 GiB AF00 Untitled 1
3 975503592 976773127 619.9 MiB AB00 Recovery HD
Command (? for help): v
Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.
Problem: Disk is too small to hold all the data!
(Disk size is 976773167 sectors, needs to be 976773168 sectors.)
The 'e' option on the experts' menu may fix this problem.
Identified 2 problems!
Command (? for help): q
What's the recommended course of action at this point?
And I should point out that the drive is a Samsung 840 Evo. I think I need to upgrade the firmware as I hear there was a bug. Could the corruption be related?
The first step is attempt to make a backup of your partition. Plug an external drive and try to mount your system disk. You can do it from Ubuntu user interface, or command line:
Then you can try to use
testdisk
utility which is a useful partition schema recovery. Basically, how can you use it from an Ubuntu Live USB.Then, run on your hard drive
Here the steps :
Of course you can try upgrading your hard drive firmware, but not sure it's the issue. Looks like your partition sector is not rounded properly. I don't know where your OSX boot stops, but if any doubts, you should probably re-install your operating system by re-doing a proper partition first.