Hi everyone,
First off, thanks to everyone for their contributions to this post. I foolishly repartitioned my OS X drive and obliterated my MBR. This post helped me recover it. What I was trying to do was set up three partitions on my Mac - one for OS X Mavericks, one for Bootcamp (Windows 7 Professional) and one as a shared drive so I can access my documents, music, videos, and pictures from either OS. After reading several posts on here, I tried creating a hybrid MBR (using gdisk) with partitions 4 and 5 included, but the system won't let me. When I get to the step where it creates an entry for partition #4 (MBR hex code 07, no bootable flag), it skips creating the entry for partition #5 and goes straight to "unused partition space(s) found..." What am I doing wrong? I've pasted the info from my terminal below:
Last login: Wed Feb 26 13:53:08 on ttys000
DGH-LAPTOP:~ admin$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 0.8.9
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): r
Recovery/transformation command (? for help): h
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.
Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 4 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
Creating entry for GPT partition #4 (MBR partition #2)
Enter an MBR hex code (default 07):
Set the bootable flag? (Y/N): y
NOTE: Here's where it deviates. Instead of saying "Creating entry for GPT partition #5..." (as I assume it should) it skips past that step every time. I tried listing the partitions as "5 4" instead of "4 5" and it did the opposite (created 5 and skipped 4). Am I doing something wrong?
Unused partition space(s) found. Use one to protect more partitions? (Y/N): n
Recovery/transformation command (? for help): o
Disk size is 977105060 sectors (465.9 GiB)
MBR disk identifier: 0xE8D38E1B
MBR partitions:
Number Boot Start Sector End Sector Status Code
1 1 388397927 primary 0xEE
2 * 388397928 587413503 primary 0x07
Recovery/transformation command (? for help): q
Here's some additional information from Terminal that may be useful:
Last login: Wed Feb 26 17:06:07 on ttys000
DGH-LAPTOP:~ admin$ sudo gpt -r -vv show disk0
Password:
gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 977105059
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 386718744 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
387128384 1269544 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
388397928 199015576 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
587413504 389691523 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
977105027 32 Sec GPT table
977105059 1 Sec GPT header
DGH-LAPTOP:~ admin$ sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 60821/255/63 [977105060 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 386718744] HFS+
3: AB 1023 254 63 - 1023 254 63 [ 387128384 - 1269544] Darwin Boot
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
DGH-LAPTOP:~ admin$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 198.0 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data 101.9 GB disk0s4
5: Microsoft Basic Data 199.5 GB disk0s5
DGH-LAPTOP:~ admin$