You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Repairing Boot Camp after creating new partition

I'm running OS X 10.8 and Windows 7 x64 Pro.


After properly setting up Boot Camp to dual-boot Windows on my Mac mini, I decided to test whether or not it was true that creating another partition (a data partition for OS X) would interfere with Boot Camp. Wikipedia claims it does interfere but without citing a source, whilst the Boot Camp documentation itself only specifies that the disk must be a single partition _prior_ to setup - there's no mention of whether the disk must be _kept_ that way afterwards.


I opened Disk Utility, reduced the size of my OS X parition from 420GB to 80GB, and created a new partition in the unallocated space. Here's how it looks now:

User uploaded file

When I attempted to proceed with the process, I did receive a warning that doing this (and I quote), "may" cause problems with Boot Camp. Seeing as it was inconclusive, I thought I'd give it a shot - nothing ventured…


Of course, it borked Boot Camp, otherwise I wouldn't be posting here. Whilst OS X boots just fine, the Boot Camp partition now no longer shows up in the Startup Manager, though it does in the Startup Disk prefPane. If I do attempt to boot into Boot Camp, I receive the following message on a black screen:

No bootable device --- insert boot disk and press any key

The advice given to someone who had this same problem was, "fix your damaged Boot Camp volume." But I'm at a loss as to how to do that.


So, anyone know how to proceed now so that I can keep my partitions as is, whilst fully restoring normal Boot Camp functionality?

Mac mini (Mid 2011), Mac OS X (10.7.4)

Posted on Jul 26, 2012 11:28 PM

Reply
1,534 replies

Jan 26, 2013 4:22 PM in response to Christopher Murphy

$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS MAC_OSX_ML 499.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data WIN8_PROx64 500.3 GB disk0s4


$ sudo fdisk /dev/disk0

Password:

Disk: /dev/disk0 geometry: 121601/255/63 [1953525168 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 974609344] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 975018984 - 1269536] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 976289792 - 977233920] HPFS/QNX/AUX


$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 0.8.6


Partition table scan:

MBR: hybrid

BSD: not present

APM: not present

GPT: present


Found valid GPT with hybrid MBR; using GPT.


Command (? for help): ?

b back up GPT data to a file

c change a partition's name

d delete a partition

i show detailed information on a partition

l list known partition types

n add a new partition

o create a new empty GUID partition table (GPT)

p print the partition table

q quit without saving changes

r recovery and transformation options (experts only)

s sort partitions

t change a partition's type code

v verify disk

w write table to disk and exit

x extra functionality (experts only)

? print this menu


Command (? for help): p

Disk /dev/disk0: 1953525168 sectors, 931.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): DF74661F-A6DE-466B-B637-8D81F396CD3E

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 1953525134

Partitions will be aligned on 8-sector boundaries

Total free space is 2701 sectors (1.3 MiB)


Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 975018983 464.7 GiB AF00 Apple_HFS_Untitled_5

3 975018984 976288519 619.9 MiB AB00 Apple_HFS_Untitled_2

4 976289792 1953523711 466.0 GiB 0700 BOOTCAMP


Command (? for help): r


Recovery/transformation command (? for help): ?

b use backup GPT header (rebuilding main)

c load backup partition table from disk (rebuilding main)

d use main GPT header (rebuilding backup)

e load main partition table from disk (rebuilding backup)

f load MBR and build fresh GPT from it

g convert GPT into MBR and exit

h make hybrid MBR

i show detailed information on a partition

l load partition data from a backup file

m return to main menu

o print protective MBR data

p print the partition table

q quit without saving changes

t transform BSD disklabel partition

v verify disk

w write table to disk and exit

x extra functionality (experts only)

? print this menu


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: 2 3 4

Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y


Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF): AF

Set the bootable flag? (Y/N): n


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): AB

Set the bootable flag? (Y/N): n


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): 07

Set the bootable flag? (Y/N): y


Recovery/transformation command (? for help): p

Disk /dev/disk0: 1953525168 sectors, 931.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): DF74661F-A6DE-466B-B637-8D81F396CD3E

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 1953525134

Partitions will be aligned on 8-sector boundaries

Total free space is 2701 sectors (1.3 MiB)


Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 975018983 464.7 GiB AF00 Apple_HFS_Untitled_5

3 975018984 976288519 619.9 MiB AB00 Apple_HFS_Untitled_2

4 976289792 1953523711 466.0 GiB 0700 BOOTCAMP


Recovery/transformation command (? for help):


Hope my final listing after my previous mistyping!


Changed the #3 and set it to its default AB as you mentioned in an earlier post (sorry!)

Terminal is left open....

Jan 26, 2013 9:45 PM in response to Berend de Meyer

Hey, Berend,


Is not Christopher generous? I try to think of episodes like this as community invitations. He knows so much more than you or me. He helps a lot of people. He knows more than me, but I know more than some do.


When I have an experience like this, I make a fixed determination to go out into "bulletin board space" and find ten or so people who know less than I and are struggling. If help them, it figures out to me to be about equal for the help I got from Christopher.


I know some people will be tempted to mock what I say. I only hope they do it in a way that is interesting.


Thanks again, Christopher, and good luck, and good "gdisk"ing, Berend.

Jan 27, 2013 6:44 AM in response to Christopher Murphy

$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS MAC_OSX_ML 499.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data WIN8_PROx64 500.3 GB disk0s4


$ sudo fdisk /dev/disk0

Password:

Disk: /dev/disk0 geometry: 121601/255/63 [1953525168 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 - 974609344] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 975018984 - 1269536] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 976289792 - 977233920] HPFS/QNX/AUX


$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 0.8.6


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/disk0: 1953525168 sectors, 931.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): DF74661F-A6DE-466B-B637-8D81F396CD3E

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 1953525134

Partitions will be aligned on 8-sector boundaries

Total free space is 2701 sectors (1.3 MiB)



Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 975018983 464.7 GiB AF00 Apple_HFS_Untitled_5

3 975018984 976288519 619.9 MiB AB00 Apple_HFS_Untitled_2

4 976289792 1953523711 466.0 GiB 0700 BOOTCAMP



Command (? for help): r


Recovery/transformation command (? for help): o


Disk size is 1953525168 sectors (931.5 GiB)

MBR disk identifier: 0xEC1946A7

MBR partitions:



Number Boot Start Sector End Sector Status Code

1 1 409639 primary 0xEE

2 409640 975018983 primary 0xAF

3 975018984 976288519 primary 0xAB

4 * 976289792 1953523711 primary 0x07



Hi Christopher,


Wrote the new hybrid to disk with <w>! Above are the 'new' readings form the commands.

Both OS X and Window 8 are booting, but the boot of OS X remains unreliable!

My workflow:

1. after writing out the new hybrid MBR I rebooted;

2. giving me the beach-ball and would not load in a normal way;

3. done a hard reset [power-switch] on the machine and it booted ok this time in OS X;

4. checked the startup-disk in system prefs but no Windows (8) bootdisk showing;

5. Shut down the mac;

6. Fired it up again holding the [option key], showing MAC_OSX_ML / Windows / Recovery HD;

7. Succesfully booting in Windows 8 like it used to do.


I think it's better to decide to wait for the support for Windows 8 on the BootCamp side of my system. I'm running scheduled back-ups for both OS's so I'll hang in untill I can make a clean install with updated BootCamp (6.0?) WITH FULL SUPPORT for Windows 7/8 and I hope (as many others) including a compatible driver pack needed for a 100% integration of the Apple hardware (e.g. those damm AHCI drivers) in BootCamp (as you mentioned earlier in regard to the support of Windows 7) and then restore both backed-up OS's to it.


I would like to thank you (and all others) so very much for the input and help in my struggle to get my BootCamp to work as it should be!!!!!!!


Good luck to you and I'll will keep following this thread of which I hope caught the attention of the APPLE BOOTCAMP team (wake-up guys!!!!)


CHEERS!!!


Berend

Jan 27, 2013 9:05 AM in response to Berend de Meyer

Ok anytime you have to use the power switch to force off power, you've going to have some level of JHFS+ corruption. The journaling doesn't make it any safer, it just makes repairs go faster. So I suggest you reboot in single user mode (with command s) and

fsck -fy

<wait>

then do

fsck_hfs -r /dev/rdisk0s2

<wait>

fsck_hfs -Ra /dev/rdisk0s2

fsck_hfs -Re /dev/rdisk0s2


-r will definitely find things to repair that regular fsck will not. The other two rarely fix things in my experience, but best to rebuild those btrees too. Then reboot. And it's not a guarantee that it's healthy and problem free, but most likely healthier.

Jan 27, 2013 12:20 PM in response to Christopher Murphy

/var/log fsck_hfs.log


/dev/rdisk0s2: fsck_hfs run at Sun Jan 27 18:29:14 2013

** /dev/rdisk0s2

** Root file system

Executing fsck_hfs (version diskdev_cmds-557~393).

** Checking Journaled HFS Plus volume.

The volume name is MAC_OSX_ML

** Checking extents overflow file.

** Checking catalog file.

** Rebuilding extents overflow B-tree.

** Rechecking volume.

** Checking Journaled HFS Plus volume.

The volume name is MAC_OSX_ML

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

** Checking volume information.

** The volume MAC_OSX_ML was repaired successfully.

*****The volume was modified *****


Hi Christopher,


THANKS a bunch, above is the only log I could find. During the operation of the commands I wrote down some listings:


fsck -fy


** MAC_OSX_ML Appears to be ok


fsck_hfs -r /dev/rdisk0s2


** Rebuilding B-tree

** Recheck

** Repairing

Invalid file count

Invalid directory count

Invalid free block

** Recheck


fsck_hfs -Ra /dev/rdisk0s2

** Rebuilding extended attributes

** The volume MAC_OSX_ML was repaired successfully.

*****The volume was modified *****


fsck_hfs -Ra /dev/rdisk0s2

** The volume MAC_OSX_ML was repaired successfully.

***** The volume was modified *****


The last modification I did was using Paragon NTFS for MAC to set my Windows 8 as Start-up Drive so my new boot-sequence WITHOUT having te use the [power-button] Tried it 5 times now!!!! ;-)


Power-on will primairy boot Windows

Power-up/Reboot holding [option-key] switch to MAC OSX X disk and boot without the known issues uptill now!


Perhaps in the near future I'll be able to use MAC's Start-Up Disk and BootCamp Application in Windows to switch but for now I'm very happy with the results. Indeed it is much HEALTHIER not to have to use the hard reset everytime now!


Thanks again for your time and help and teaching me even more about the OS X terminal commands which I still will call: "Rocket-Sience!!! ;-)


CHEERS



Feb 4, 2013 12:20 PM in response to MacDouglas

I'll use the "s word" followed by the "b word"... No it shouldn't, but it depends on the setup. If it's a conventional Apple four partition GPT and MBR that are in sync, I've yet to see a problem.


But if the GPT and MBR aren't in sync, because you have a fifth partition, for example; it seems something tries to make them sync up again, which would cause a problem. I see this in the case where an OS X partition is reformatted (erased), which tends to cause an update to the GPT and MBR in such a way that it renders Windows unbootable until the hybrid MBR is repaired. In a handful of cases the Windows volume is corrupted beyond repair but I haven't been able to establish a reproducing cause for this, so I don't know what sequence is required to make it happen and therefore I don't know how to avoid it.

Feb 4, 2013 12:32 PM in response to Christopher Murphy

Thanks. This is my current setup FYI.


gpt show: disk0: mediasize=512110190592; sectorsize=512; blocks=1000215216


gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 1000215215

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 589992336 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

590401976 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

591671512 249589544 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

841261056 262144

841523200 158691328 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

1000214528 655

1000215183 32 Sec GPT table

1000215215 1 Sec GPT header


The original motivation for creating a bootcamp partition was (perceived) better performance from parallels. I only ever run the partition in parallels, because of Windows activation issues. Given that I'm running an SSD, I think this original idea is red herring. I'll definitely keep it simpler next time. Parallels has an import from bootcamp to create a vdisk. I should have headed in that route.

Repairing Boot Camp after creating new partition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.