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

Mar 8, 2013 10:11 AM in response to Christopher Murphy

Hi Chris,


Sorry for not responding earlier to thank you for your advice.


I decided to forego all the mucking around and simply(!) install a second drive in my Mac mini. This is now done, and I'd appreciate your advice on how to set it up to dual-boot Windows 7 and an encrypted Mountain Lion partition - if that's even possible. If it is, I'm suspecting it may be best to create the whole thing manually in gdisk.


If you feel you can spare the time, I've got a thread here.


Many, many thanks for your continued responses to this thread.


S.

Mar 11, 2013 11:07 AM in response to Christopher Murphy

Dear Christopher,


after some time when I did not find backup company in my region I found the courage to use dd and make image of my harddrive and then I used your suggestion TestDisk. This application found the lost "D:" partition on BootCamp and it was possible to copy all my data.


I would like to thank you. I was very worry about my data and your suggestion saved everything.


Thank you again for your help!


Best regards

Myshho

Mar 12, 2013 1:13 PM in response to Scotch_Brawth

Dear Christopher:


I have a similar problem to the original one for this thread: the Bootcamp seems to be there, but I am not able to boot into Win7. However, I have one additional complication: I have "lost"some hard disk space on my SSD that I also would like to recover after trying to install Ubuntu on my retina Macbook.


Here is the diskutil listing:


/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 137.9 GB disk0s2

3: Apple_HFS Recovery HD 650.0 MB disk0s3

4: Apple_HFS Mac B Stuff 14.9 GB disk0s4

5: Microsoft Basic Data BOOTCAMP 97.1 GB disk0s5


And the partition layout:


User uploaded file


"Mac B Stuff"is the "lost partition"that I would love to recover along with making Bootcamp bootable again. Is that possible?


More info:


sudo fdisk /dev/disk0


Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]

Signature: 0xAA55

Starting Ending

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

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

1: EE 1023 254 63 - 1023 254 63 [ 1 - 490234751] <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



sudo gpt -r -vv show disk0

gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: disk0: PMBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 490234751


start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 269273912 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

269683552 262144

269945696 1269536 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

271215232 29031808 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

300247040 262144

300509184 189724672 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

490233856 863

490234719 32 Sec GPT table

490234751 1 Sec GPT header


Help would be greatly appreciated!


Mar 12, 2013 4:16 PM in response to Scotch_Brawth

hello everyone,


i had the same problem, and went through the steps on the first page, except that i substituted drive 5 for 3.


before trying this process i was getting the "no bootable device-incert boot disk and bress any key" error. and when i hit alt during boot up, windows was not even an option


now i can see windows as an option, but im getting the error "No operating system" when i try to launch windows.


my goal is to combined the unused space with my bootcamp partition and get windows working again


im not sure exactly which commands will help give you guys the most info,so here are a couple


diskutil list


/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *250.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Mac HD 165.0 GB disk0s2

3: Microsoft Basic Data 54.3 GB disk0s3



sudo fdisk /dev/disk0


Disk: /dev/disk0 geometry: 30401/255/63 [488397168 sectors]

Signature: 0xAA55

Starting Ending

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

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

1: EE 0 0 2 - 1023 254 63 [ 1 - 382355455] <Unknown ID>

*2: 07 1023 254 63 - 1023 254 63 [ 382355456 - 106041344] HPFS/QNX/AUX

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused



sudo gpt -r -vv show disk0


gpt show: disk0: mediasize=250059350016; sectorsize=512; blocks=488397168

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 488397167

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

322675272 59680184

382355456 106041344 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

488396800 335

488397135 32 Sec GPT table

488397167 1 Sec GPT header


my next idea would be to get my hands on a Win 7 boot disk (mine is in the US with my dad) and try and repair/reinstall that way, but if there is a way to do it without the disk it would be great.


thanks in advance for any help.

Mar 13, 2013 2:45 PM in response to berkeley201

Make sure you have a backup of Macintosh HD first. Also I personally would reboot single user mode and:


fsck_hfs -fy /dev/rdisk0s2

fsck_hfs -r /dev/rdisk0s2


The first does a normal check and repair. The 2nd rebuilds the catalog btree.


Next issue this command, which reports resizing options, makes no changes.


diskutil resizevolume /dev/disk0s2 limits

Mar 13, 2013 3:58 PM in response to Christopher Murphy

Hi Christopher!


Thanks! I tried those, but nothing much happened:


sudo fsck_hfs -fy /dev/rdisk0s2

Password:

** /dev/rdisk0s2

Using cacheBlockSize=32K cacheTotalBlock=98304 cacheSize=3145728K.

** Root file system

Executing fsck_hfs (version diskdev_cmds-557.3~3).

** Verifying volume when it is mounted with write access.

Journal need to be replayed but volume is read-only

** Checking Journaled HFS Plus volume.

The volume name is Macintosh HD

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

Volume bitmap needs minor repair for under-allocation

** Checking volume information.

** The volume Macintosh HD cannot be repaired when it is in use.

** The volume Macintosh HD could not be repaired.



sudo fsck_hfs -r /dev/rdisk0s2

** /dev/rdisk0s2

** Root file system

BTree rebuild requested but writing disabled


sudo diskutil resizevolume /dev/disk0s2 limits

For device disk0s2 Macintosh HD:

Current size: 137.9 GB (137868242944 Bytes)

Minimum size: 68.0 GB (67961167872 Bytes)

Maximum size: 137.9 GB (137868242944 Bytes)


I don't quite know what it means to login in single user mode, so I may have started off on the wrong foot. Also, after noticing that "Volume Macintosh HD cannot be repaired when it is in use"I tried to dismount it, but was not able to do so via Diskutil.

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.