Currently Being ModeratedNov 15, 2013 6:09 AM (in response to taibanl)
Testdisk seems to be guessing. Can you peek into one of the partitions and look at a listing of the files? I am not sure how you have managed to have two partitions end at 468860920 and 468860927? And the third one is at 468862087?
If you are willing to take a risk, what happens if you make partition #4 (in fdisk output) as bootable? (See page 54+ in this thread).
Currently Being ModeratedNov 19, 2013 11:35 AM (in response to yisaam)
Hi Christopher and everyone!
I find myself in the same situation as many people here and I'm looking for some friendly advice or guidance.
I have a 10.8 iMac with a single internal hard drive with default partition and a Boot Camp partition. I did essentially the same thing as the user in Post 1 did and attempted to add a 2nd Mac partition for Mavericks. So now I have 3 partitions on my desktop (MacHD (580GB), MavericksHD (119GB), and BootCamp (298GB)) but I also have two recovery partitions and the Boot Camp partition is no longer bootable.
localhost:~j$ sudo gpt -r -vv show disk0
gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: disk0: PMBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 1953525167
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 1132635232 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1133044872 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1134314408 231825920 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1366140328 1269536 5 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1371494400 582029312 6 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
localhost:~ j$ sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 121601/255/63 [1953525168 sectors]
#: id cyl hd sec - cyl hd sec [ start - size]
1: EE 1023 254 63 - 1023 254 63 [ 1 - 1953525167] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
localhost:~ j$ sudo gdisk /dev/disk0
GPT fdisk (gdisk) version 0.8.8
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
BSD: not present
APM: not present
Found valid GPT with protective MBR; using GPT.
Can anyone help on getting the Boot Camp partition to boot and still have the two Mac partitions be bootable as well?
Thanks in advance!
Currently Being ModeratedNov 19, 2013 12:19 PM (in response to joseWWCC)
As you can see, you don't have three partitions, you have six plus a bunch of free space between partitions 5 and 6. This is an unsupported configuration so technically you're supposed to backup, blow away the drive, and start everything from scratch.
Alternatively, download gdisk (gpt fdisk on sourceforge) and install. You'll need to figure out from this thread exactly how to create a new hybrid MBR, but the gist is that at the same asking you what GPT partitions to add to the MBR, you will only add partition 6 and you'll make that bootable. You'll do everything else the same otherwise, and at the end when it says there's still entries in the MBR available and if you want to protect more partitions, say no. Don't forget to write out the change and reboot.
So this will put GPT partitions 1-5 in the MBR 1st partition, as a protective 0xEE entry. And it will put GPT partition 6, in the MBR 2nd partition entry flagged bootable.
Currently Being ModeratedNov 19, 2013 12:26 PM (in response to Christopher Murphy)
Thank you so much for the quick reply!
OK, thanks for the clarification. As I understand it, I need to do the following in gdisk. Is this correct?
r <enter> go to the recovery & transformation menu
h <enter> create a new hybrid MBR
6 <enter> add partion 6 to the MBR
<enter> accept the default MBR hex code of 07
y <enter> set the bootable flag
n <enter> do not protect more partitions
o < enter> print (display) the MBR
w <enter> write partition table to disk
Currently Being ModeratedNov 19, 2013 12:29 PM (in response to joseWWCC)
Yet another alternative, before creating the hybrid MBR in gdisk, is to use gdisk to create a new GPT entry for that free space. So from the main menu, type n to create a new partition, and just accept all the defaults for start and end sector values and type code. Then type s to resort the list. Type p to see the new listing and you'll see that your free space is now partition 6, and Windows is now partition 7. Now go to the recovery menu, r, and create the new hybrid MBR, h, but now you'll add partition 7 to the MBR and make it bootable. Write out the changes.
So now Windows will be rebootable. But you can also format, FROM CLI ONLY, partition 6 for what you intended it for. If you use Disk Utility, it will break the hybrid MBR, and you'll have to go back to gdisk to recreate it again. So take you pick, use Disk Utility to format the free space, then create the hybrid MBR. Or you can use newfs_hfs from command line to create a new HFS+ volume.
man new_hfs for details but the gist is
sudo newfs_hfs -J -n MacHD2 /dev/disk0sX
-J makes it journaled
-n makes anything after it the volume name, which you can omit and change in the Finder if you want.
X= the value for the partition number, depending on which instructions you follow or miss, this is either a 6 or 7. If you get it wrong, you'll either get an error or it'll format your Windows partition. To confirm first, use diskutil list and make certain you've chosen the right one. The command will not ask you if you're sure.
Currently Being ModeratedNov 19, 2013 12:31 PM (in response to joseWWCC)
You're missing some steps that the program will prompt you for, but it's basically correct.
Currently Being ModeratedNov 19, 2013 12:34 PM (in response to Christopher Murphy)
Free space? Do you mean partitions 3 and 5? If so, I beleive these are recovery partitions (1 for 10.8 and the other for 10.9).
That said, I think I just want my Windows partition to boot again and I could care less about the free space since I'll be reformatting once I get everything working again (but it's a great suggestion).
Currently Being ModeratedNov 19, 2013 12:43 PM (in response to Christopher Murphy)
Yep, I'm missing some steps...
There were 2 questions I didn't know the answers to:
Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence:
Should I enter 2 4 6 or just 6?
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N):
No idea what to select here...
Currently Being ModeratedNov 19, 2013 12:55 PM (in response to joseWWCC)
Free space? Do you mean partitions 3 and 5?
No I'm referring to space between partitions 5 and 6. This line right after partition 5:
That's ~2GB of free space. Not much I guess. In any case you don't care about it so it doesn't matter.
Should I enter 2 4 6 or just 6?
I already answered that from the beginning: "what GPT partitions to add to the MBR, you will only add partition 6 and you'll make that bootable"
No idea what to select here...
Answer is yes. I know it's a 60 page disorganized thread, but this has been answered probably 10x so it's the sort of question that makes me want to abandon the thread.
Currently Being ModeratedNov 19, 2013 6:39 PM (in response to Christopher Murphy)
That solved the issue...Thanks so much!
Apologies for the question about the EFI GPT. I regretted that question the second I submitted since I found the answer on page 50.
Thanks again for your help!
Currently Being ModeratedNov 22, 2013 11:02 PM (in response to Christopher Murphy)
Thanks for this post!
Mine was a basic setup - just split my main mac-mini drive in half - OSX and Bootcam. I upgraded for 10.6.8 to 10.9 (who doesn't like a free upgrade?) and was discouraged to see my bootcamp come backup with the error "missing operating system". However, goggling this thread (starting at page 48) has a ton of information and my guess is that you described exactly what happened in my situation (page 55).
Luckily, the partition was still valid - I could see it in OSX finder - I just couldn't boot it. While it looks like I could have used fdisk to just make the partition bootable, I ended up using gdisk and recreating the hybrid MBR per page 52.
Much appreciated to those souls to have gone before so that others may have answers. Christopher Murphy, tom007, and others!
Cheers to all - I raise my glass to you.
Currently Being ModeratedNov 26, 2013 6:31 PM (in response to Christopher Murphy)
I have a similar problem.
I had a OSX 10.8 and Ubuntu 12.04 64 bit LTS on bootcamp partition of ~ 100GB (out of 256 GB SSD) on MacBook Air 2012.
I upgraded to OSX 10.9 and suddenly I don't see anymore option to boot with Ubuntu partition (i.e. holding Option key on restart).
Here the gist with output of commands which people run in previous posts here:
How can I restore the Ubuntu partition?
Thanks in advance!
Currently Being ModeratedNov 26, 2013 7:31 PM (in response to zvav)
Please repost the gpt results with the partition type GUIDs, and also I need to see the results from fdisk.
Currently Being ModeratedNov 26, 2013 7:50 PM (in response to Christopher Murphy)
I updated (diskutil info output slightly changed, since I installed fuse-ext2):
More Like This
- Retrieving data ...
- This solved my question - 10 points
- This helped me - 5 points