Hi all; I'm having a similar problem, and I seem to be making mistake after mistake trying to fix it. Just found this thread. So, here's where I'm at now:
I currently have a (now screwed up) drive from a Mac Mini with bootcamp + Windows 7. The Mac side boots fine, the Windows side says "no bootable device found". The Windows partition does not show in the startup manager. It does show in Disk Utility. It also shows as a selection in startup disks (and the Mac still tries to boot to it by default). Here is the output of various commands:
gpt (from OSX):
$ sudo gpt -r -vv show /dev/disk0
gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168
gpt show: /dev/disk0: Suspicious MBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 976773167
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 80078128 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
80487768 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
81757304 904
81758208 59845802 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
141604010 835169125
976773135 32 Sec GPT table
976773167 1 Sec GPT header
fdisk (from OSX):
$ sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 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 25 127 15 - 1023 254 63 [ 409640 - 80078128] HFS+
*3: AB 1023 254 63 - 1023 254 63 [ 80487768 - 1269536] Darwin Boot
*4: 07 1023 254 63 - 1023 254 63 [ 81758208 - 59845802] HPFS/QNX/AUX
fdisk (from a Linux machine):
$ sudo fdisk /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Command (m for help): p
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 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/sdb1 1 409639 204819+ ee GPT
/dev/sdb2 * 409640 80487767 40039064 af HFS / HFS+
/dev/sdb3 * 80487768 81757303 634768 ab Darwin boot
/dev/sdb4 * 81758208 141604009 29922901 7 HPFS/NTFS/exFAT
gdisk (from a Linux machine):
jason@ubuntu:~$ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.6.14
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): p
Disk /dev/sdb: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 584883BF-EEBA-402D-AC7B-658C2B1EE5F2
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 835579635 sectors (398.4 GiB)
Number Start (sector) End (sector) Size Code Name
2 409640 80487767 38.2 GiB AF00 Apple HFS/HFS+
3 80487768 81757303 619.9 MiB AB00 Apple boot
4 81758208 141604009 28.5 GiB 0700 BOOTCAMP
Command (? for help): i
Partition number (2-4): 4
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Linux/Windows data)
Partition unique GUID: 8AE632B6-2832-4368-B127-3D2C15F8BC16
First sector: 81758208 (at 39.0 GiB)
Last sector: 141604009 (at 67.5 GiB)
Partition size: 59845802 sectors (28.5 GiB)
Attribute flags: 0000000000000000
Partition name: BOOTCAMP
Partition 4 is the Windows partition. I renamed it to BOOTCAMP at some point while trying to fix it today. I've also been futzing with the type ID of that partition. I do not know what the correct settings should be.
How I got here was sort of complicated but here's generally what happened:
1. I had a working OSX + Bootcamp + Windows 7 setup.
2. Using Easeus partition manager from a different Windows machine, I shrunk the size of the Windows partition down to 28.5GB. However, when applying the changes, a vague error occurred along the lines of "An error occurred while writing partition chains."
3. When attempting to boot the Mac again, the Windows side worked fine, but the OSX partition didn't show up in the Mac's startup manager.
At this point I didn't really know 100% what I was doing and probably should not have proceeded.
4. Gdisk (GPT) showed the previous Mac partitions as unallocated space (as did Easeus). Fdisk showed the correct partition info. I used gdisk to rebuild the GPT from the MBR. At this point I was able to boot OSX again but now the Windows partition didn't show up in the startup manager. The machine was about in the same state it is currently in.
5. At this point, fdisk (MBR) no longer showed any partitions except the first EE one. I tried rebuilding a hybrid MBR with gdisk; which caused fdisk to display all the partitions from the MBR, but did not change the system's behavior.
6. I also tried messing around with the type IDs, changing the MBR id for the 4th partition to 07 (it was EF), and changing the GPT id for the 4th partition to 0700, various combinations of this, but with no effect.
I feel like I'm very close to getting this right, but I just don't quite know how to fix it and I'm afraid that if I keep bumbling around I'll make the problem even worse.
This all started when I attempted to shrink the bootcamp partition so I could clone the drive to a smaller disk, which should have been simple. But whatever I did has now cost me the entire day 9:30AM - 2PM and I haven't even started the drive clone copying yet. :-(
Does anybody have any advice how to proceed? I do not have an OSX CD. I do have a Windows CD and a bunch of spare USB sticks, although I don't have a CD-ROM drive handy for the Mac Mini.
Thanks a lot,
J