Scotch_Brawth

Q: 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:

/___sbsstatic___/migration-images/190/19047693-1.png

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

Close

Q: Repairing Boot Camp after creating new partition

  • All replies
  • Helpful answers

first Previous Page 11 of 102 last Next
  • by AlexClark,

    AlexClark AlexClark Oct 7, 2012 12:21 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 7, 2012 12:21 AM in response to Christopher Murphy

    Repairing the bootloader is proving to be rather difficult. There are steps at the RE command prompt that require locating files on drive C:, such as "bcdedit /export C:\BCD_Backup". The command is unable to locate the file because as far as the RE command prompt seems to recognize, there is no C: drive.

     

    I feel like that might also be why /FixMbr, /FixBoot, and /RebuildBcd are not solving my problem. Perhaps those are commands that are to be run from the C: directory as opposed to the X: directory that the command prompt defaults to after finding no OS install during the startup repair.

     

    It may be worth noting that even when booting from the windows disc and running the repair command prompt, I am still able to view my windows partition with a diskutil list command.

     

    I'm going to post another result for a command I've seen you request previously, just for kicks, and because I've got no clue as to the implications of said results. Perhaps you will see something I do not. I have a feeling that if this doesn't yield any sort of progress that I might have to dig elsewhere for answers, or just deal with not getting it back.

     

     

    sudo dd if=/dev/disk0s4 of=~/twosectors.bin bs=512 count=2

    2+0 records in

    2+0 records out

    1024 bytes transferred in 0.027939 secs (36651 bytes/sec)

    alex-clarks-imac:~ alexclark$ hexdump -C ~/twosectors.bin

    00000000  ca 0e 1d 0f 1c 0f 12 31  35 b2 4c 03 07 1c 0f 1a  |.......15.L.....|

    00000010  01 00 04 00 00 f8 00 00  11 00 04 00 01 00 00 00  |................|

    00000020  00 00 20 00 e0 1f 00 00  00 00 00 00 00 00 00 00  |.. .............|

    00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

    00000040  80 00 29 00 00 00 00 4e  4f 20 4e 41 4d 45 20 20  |..)....NO NAME  |

    00000050  20 20 46 41 54 33 32 20  20 20 33 c9 8e d1 bc f4  |  FAT32   3.....|

    00000060  7b 8e c1 8e d9 bd 00 7c  88 4e 02 8a 56 40 b4 41  |{......|.N..V@.A|

    00000070  bb aa 55 cd 13 72 10 81  fb 55 aa 75 0a f6 c1 01  |..U..r...U.u....|

    00000080  74 05 fe 46 02 eb 2d 8a  56 40 b4 08 cd 13 73 05  |t..F..-.V@....s.|

    00000090  b9 ff ff 8a f1 66 0f b6  c6 40 66 0f b6 d1 80 e2  |.....f...@f.....|

    000000a0  3f f7 e2 86 cd c0 ed 06  41 66 0f b7 c9 66 f7 e1  |?.......Af...f..|

    000000b0  66 89 46 f8 83 7e 16 00  75 38 83 7e 2a 00 77 32  |f.F..~..u8.~*.w2|

    000000c0  66 8b 46 1c 66 83 c0 0c  bb 00 80 b9 01 00 e8 2b  |f.F.f..........+|

    000000d0  00 e9 2c 03 a0 fa 7d b4  7d 8b f0 ac 84 c0 74 17  |..,...}.}.....t.|

    000000e0  3c ff 74 09 b4 0e bb 07  00 cd 10 eb ee a0 fb 7d  |<.t............}|

    000000f0  eb e5 a0 f9 7d eb e0 98  cd 16 cd 19 66 60 80 7e  |....}.......f`.~|

    00000100  02 00 0f 84 20 00 66 6a  00 66 50 06 53 66 68 10  |.... .fj.fP.Sfh.|

    00000110  00 01 00 b4 42 8a 56 40  8b f4 cd 13 66 58 66 58  |....B.V@....fXfX|

    00000120  66 58 66 58 eb 33 66 3b  46 f8 72 03 f9 eb 2a 66  |fXfX.3f;F.r...*f|

    00000130  33 d2 66 0f b7 4e 18 66  f7 f1 fe c2 8a ca 66 8b  |3.f..N.f......f.|

    00000140  d0 66 c1 ea 10 f7 76 1a  86 d6 8a 56 40 8a e8 c0  |.f....v....V@...|

    00000150  e4 06 0a cc b8 01 02 cd  13 66 61 0f 82 75 ff 81  |.........fa..u..|

    00000160  c3 00 02 66 40 49 75 94  c3 42 4f 4f 54 4d 47 52  |...f@Iu..BOOTMGR|

    00000170  20 20 20 20 00 00 00 00  00 00 00 00 00 00 00 00  |    ............|

    00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

    *

    000001a0  00 00 00 00 00 00 00 00  00 00 00 00 0d 0a 42 4f  |..............BO|

    000001b0  4f 54 4d 47 52 20 69 73  20 6d 69 73 73 69 6e 67  |OTMGR is missing|

    000001c0  ff 0d 0a 44 69 73 6b 20  65 72 72 6f 72 ff 0d 0a  |...Disk error...|

    000001d0  50 72 65 73 73 20 61 6e  79 20 6b 65 79 20 74 6f  |Press any key to|

    000001e0  20 72 65 73 74 61 72 74  0d 0a 00 00 00 00 00 00  | restart........|

    000001f0  00 00 00 00 00 00 00 00  00 ac c1 ce 00 00 55 aa  |..............U.|

    00000200  a7 0f 75 0f 4f 0a c6 5e  c4 8c 0a 06 a7 0f 7e 0f  |..u.O..^......~.|

    00000210  c5 5e 4e 0a ca 55 16 76  4c 01 04 7c 0f ca 5e 2d  |.^N..U.vL..|..^-|

    00000220  0a c8 5c 14 08 7c 0f 7b  0f 76 0f 2b 0a c9 5e c7  |..\..|.{.v.+..^.|

    00000230  44 28 06 7b 0f 77 0f 76  0f 2a 0a 26 8d 03 7e 4c  |D(.{.w.v.*.&..~L|

    00000240  01 04 75 0f c7 5e 25 0a  c6 94 08 06 71 0f 70 0f  |..u..^%.....q.p.|

    00000250  24 0a 20 0a bf 44 28 08  70 0f 6f 0f 09 08 1f 0a  |$. ..D(.p.o.....|

    00000260  cd 5e 4f 22 34 bd 4c 01  04 6f 0f 4e 61 cc 5e ce  |.^O"4.L..o.Na.^.|

    00000270  5c 14 06 6f 0f 6b 0f 6a  0f 1e 0a 1a 54 03 0a ff  |\..o.k.j....T...|

    00000280  ff 10 08 6a 0f 5e 0f 4b  61 19 0a d0 5c 99 08 5e  |...j.^.Ka...\..^|

    00000290  0f ac 0f 10 08 36 0b d1  5e cf 54 08 0e 10 08 ac  |.....6..^.T.....|

    000002a0  0f 15 08 d0 5e d2 5e 4a  61 ff ff ad 0f 15 5c 01  |....^.^Ja.....\.|

    000002b0  02 91 5f d1 5e d3 44 13  08 ac 0f ae 0f ad 0f 8d  |.._.^.D.........|

    000002c0  5f 54 0a d2 44 21 00 23  d3 0f d4 0f d2 0f 5f 5f  |_T..D!.#......__|

    000002d0  73 0a 72 0a ff ff f0 0f  ee 0f 69 09 bb 0a 8b 0a  |s.r.......i.....|

    000002e0  d6 5e ff ff 69 09 f1 0f  f0 0f f6 5e d7 5e d5 5e  |.^..i......^.^.^|

    000002f0  ff ff f1 0f f2 0f f0 0f  f5 5e 8c 0a d6 5c 06 08  |.........^...\..|

    00000300  f3 0f f2 0f f4 0f 8c 0a  f4 5e d9 4c 73 08 f4 0f  |.........^.Ls...|

    00000310  f5 0f f3 0f 8d 0a ff ff  d8 44 0c 08 fc 0f fd 0f  |.........D......|

    00000320  fe 0f f2 5e 8f 0a db 44  13 08 fe 0f 64 08 fc 0f  |...^...D....d...|

    00000330  f3 5e dc 5e da 8c 03 06  64 08 ff 0f db 5e 2a 61  |.^.^....d....^*a|

    00000340  dd 44 1a 08 ff 0f 00 10  fc 0f ba 0a 91 0a dc 54  |.D.............T|

    00000350  55 08 22 08 14 10 13 10  f8 0c a3 0a 44 5c 30 08  |U.".........D\0.|

    00000360  5b 08 13 10 11 10 f1 5e  a2 0a e0 44 52 08 11 10  |[......^...DR...|

    00000370  16 10 5b 08 b6 0a e1 5e  df 4c 2d 07 16 10 17 10  |..[....^.L-.....|

    00000380  5b 08 ac 3a e2 5e 6c 03  08 5b 08 17 10 18 10 e1  |[..:.^l..[......|

    00000390  5e b4 0a e3 6e 50 10 19  44 05 02 a6 0a 2c 61 e2  |^...nP..D....,a.|

    000003a0  5c 06 08 61 08 1d 10 1e  10 c7 65 a7 0a e5 4c 11  |\..a......e...L.|

    000003b0  08 1e 10 1f 10 61 08 b2  0a e6 5e e4 54 0f 07 1f  |.....a....^.T...|

    000003c0  10 20 10 61 08 b1 0a e7  5e 6d 03 21 4c 01 04 20  |. .a....^m.!L.. |

    000003d0  10 ef 5e e6 5e e8 5d 06  21 4c 03 04 1b 10 e7 5e  |..^.^.].!L.....^|

    000003e0  b1 0a a8 54 1a 00 08 61  08 26 10 25 10 ea 5e ad  |...T...a.&.%..^.|

    000003f0  0a c6 65 ff ff 22 10 26  10 61 08 ae 0a e9 5e ef  |..e..".&.a....^.|

    00000400

     

    Thanks again for having a look.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 7, 2012 1:06 AM in response to AlexClark
    Level 3 (555 points)
    Oct 7, 2012 1:06 AM in response to AlexClark

    there is no C: drive

     

    It might be a different letter like D: or E: Try

    d:

    dir

    if that doesn't work try

    e:

    dir

     

    If that doesn't work, then check out diskpart and see if you can assign a letter to the proper partition.

     

     

    It may be worth noting that even when booting from the windows disc and running the repair command prompt, I am still able to view my windows partition with a diskutil list command.

     

    I don't know what this means. Windows has a diskpart command. Mac OS X has a 'diskutil list' command which lists all disk devices and their partitions.

     

    alex-clarks-imac:~ alexclark$ hexdump -C ~/twosectors.bin

     

    Line 50 seems to clearly indicate the format of this partition is not NTFS. It's FAT32. Windows 7 makes it difficult to inadvertently install Windows onto a FAT32 volume because it isn't recommended. They recommend, and Apple explicitly shows how to do this with screen shots in the Boot Camp user guide, how to reformat the partition as NTFS after booting from the Windows installer. Mac OS X's Boot Camp Assistant formats the volume as FAT32, not NTFS. So I'm not sure whether you managed to install Windows 7 on a FAT32 volume, or if something has happened causing it to be formatted as FAT32 recently.

     

    This partition 4, Boot Camp/Windows, does not mount in the Mac OS X Finder at all? What's the result from the command:

    mount

  • by AlexClark,

    AlexClark AlexClark Oct 7, 2012 1:21 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 7, 2012 1:21 AM in response to Christopher Murphy

    I don't know what this means. Windows has a diskpart command. Mac OS X has a 'diskutil list' command which lists all disk devices and their partitions.

     

    My mistake. When I wrote "diskutil list", I was thinking of something else (having used the diskpart command to ensure that the windows partition was marked active while in the repair command prompt).

     

    I'm not sure whether you managed to install Windows 7 on a FAT32 volume, or if something has happened causing it to be formatted as FAT32 recently.

     

    This is very likely to be something that has happened recently that caused it to be formatted as FAT32. I wouldn't put it past myself to make the stupid mistake of inadvertently formatting the partition as FAT32 while attempting to resolve the initial issue. Could there be a potential resolution in formatting the disk as NTFS at this point?

     

    It might be a different letter like D: or E:

     

    I will check this now, albeit with little confidence.

  • by AlexClark,

    AlexClark AlexClark Oct 7, 2012 1:31 AM in response to AlexClark
    Level 1 (0 points)
    Oct 7, 2012 1:31 AM in response to AlexClark

    More on the file system.

     

    When entering a drive letter into the command prompt such as e: or f:, I receive the message "The system cannot find the drive specified", as expected. However, when I attempt to change to C:, I get "The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and volume is not corrupted."

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 7, 2012 1:47 AM in response to AlexClark
    Level 3 (555 points)
    Oct 7, 2012 1:47 AM in response to AlexClark

    Could there be a potential resolution in formatting the disk as NTFS at this point?

     

    Absolutely not. Any changes to the disk at this point increase the chances of irreparable data loss. If you did inadvertently format the partition as FAT32, you're in disaster recovery mode, and that's not so much my area. But for sure you need to top altering the volume if you're going to have a chance at recovering data.

     

    Formatting is almost certainly irreversible data loss, but in particular if it's fomatted with the same file system (different file systems put their structures in different parts of the disk, so the old file system may not have been stepped on, I don't know what areas of the disk FAT32 and NTFS share in common). The file system is the card catalog in a library, and your data are the books. So the books are still on the disk, few might have been overwritten with the formatting, but the card catalog has been obliterated. So finding files on the disk isn't directly possible. You'd need a utility to scan the partition for file format patterns to try and recover what you can. If you have a recent backup it's way easier just to use that. This kind of disaster recovery takes many hours to days or even more.

  • by AlexClark,

    AlexClark AlexClark Oct 7, 2012 2:03 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 7, 2012 2:03 AM in response to Christopher Murphy

    While it's not the best news, that is definitely good to know. Losing the files on the windows partition is fortunately not too severe a consequence for me since I've got the most important bits backed up. I was mostly hoping to fully recover it so I wouldn't have to use up bandwidth redownloading games/programs to install, however at this point it seems that the easiest thing to do would be to get rid of the damaged partition altogether and start fresh. I'll be getting rid of this computer in about two weeks time anyway.

     

    That being said, would you be able to recommend an effective method of completely getting rid of my severely mangled windows partition in order to prepare my HD for one final go at bootcamp before I retire it?

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 7, 2012 11:16 AM in response to AlexClark
    Level 3 (555 points)
    Oct 7, 2012 11:16 AM in response to AlexClark

    Short version: I use gdisk. gdisk is known as 'GPT fdisk'.

     

    Long version: I use gdisk because it shows what's really going on, on-disk, rather than the trust being obscured by GUI apps. I trust its ability to create exactly correct GPT (and optionally MBR) partition schemes, thoroughly tested on Mac, Windows and Linux.

     

    While it is a command line program, it uses an interactive mode, meaning it prompts you and helps guide you through various command steps. You can type ? <return> to get a menu of commands. And the online documentation is very thorough about describing each command, the vast majority of which you will not use. Importantly, it doesn't live edit the GPT, only modifying a copy in memory. So you can do crazy things in gdisk, and simply use q <return> or control-C to quit and not change anything on-disk.

     

    You basic three tasks in gdisk are: delete a partition, add a new partition, and then make a hybrid partition. Deleting a partition is straight forward, just make sure you use p <return> to list the GPT and make sure you're choosing the correct partition number to delete before issuing the delete command. Adding a new partition will by default use the first free (and 4K aligned) sector, and all contiguously available free space. If you want to specify something different, you can do that.

     

    Before you try to reinstall Windows, you will need a new hybrid MBR. You can do this in gdisk or if you have 4 or fewer partitions, in rEFIt using gptsync.

     

    Long long version: Back to your original problem, there is no easy or obvious way to resize dual-boot Boot Camp disks (disks that have both Mac OS X and Windows), without a commercial 3rd party tool. The included tools can't be used the way you tried to use them, even though it seems emminently rational to do what you did.

     

    Both JHFS+/X and NTFS resize from the *end* of the volume, not the beginning. So when you shrank your Mac OS X volume, it changed where the Mac OS X volume ended, i.e the end of the volume was brought forward, leaving a free space gap between Mac HD and Windows. When trying to resize NTFS, it can't use free space in front of the volume, only free space after the volume. So to use that free space, you first have to move the entire NTFS volume forward so it starts at the beginning of the free space you created, putting all the free space after the NTFS volume; and then resize it.

     

    It is possible to do an NTFS move+resize with Gparted, which is a linux GUI app, but you're almost certainly better off with a commercial app that can simultaneously resize JHFS+/X, do the NTFS move/resize, set the GPT correctly, and set the MBR correctly, all at once.

     

    Sadly I don't have a product recommendations since I'm not really privy to the nuances among Winclone, iPartition, and CampTune.

     

    And last, and least, I actually don't do native booting of non-Mac OS's on my production computer. I only use VM's. On a separate "R&D" Mac, I native boot anywhere from 2 to 8 OS's with fairly crazy partition and bootloader schemes.

  • by AiOO,

    AiOO AiOO Oct 11, 2012 10:52 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 11, 2012 10:52 PM in response to Christopher Murphy

    Hi Christopher Murphy, Thank you for your kindness.

     

    I had same problem Scotch_Brawth has, and I solved with your solution.

    (One of difference is I'm using Windows 8, but I think that it isn't important to solve this problem.)

     

    Unfortunatly, I have a new problem.

    I can't access the middle(?) partition named "Internal Storage" when I'm using Windows.

    It's Disk Manager presents to me just two partitions unknown partition and Bootcamp partition.

     

    Can I solve this problem?

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 12, 2012 11:31 AM in response to AiOO
    Level 3 (555 points)
    Oct 12, 2012 11:31 AM in response to AiOO

    There isn't enough information to answer your question. I need to see the GPT and the MBR.

    sudo gpt -r -vv show disk0

    sudo fdisk /dev/disk0

  • by AiOO,

    AiOO AiOO Oct 12, 2012 6:41 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 12, 2012 6:41 PM in response to Christopher Murphy

    This is my results. Thx.

     

    1. result of sudo gpt -r -vv show disk0:

    gpt show: disk0: mediasize=320072933376; sectorsize=512; blocks=625142448

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 625142447

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

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

       99335424  329816832      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      429152256     262144        

      429414400  195727360      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      625141760        655        

      625142415         32         Sec GPT table

      625142447          1         Sec GPT header

     

    2. result of sudo fdisk /dev/disk0:

    Disk: /dev/disk0 geometry: 38913/255/63 [625142448 sectors]

    Signature: 0xAA55

             Starting       Ending

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

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

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

    *2: 07 1023 254  63 - 1023 254  63 [ 429414400 -  195727360] 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   

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 12, 2012 10:36 PM in response to AiOO
    Level 3 (555 points)
    Oct 12, 2012 10:36 PM in response to AiOO

    So the problem is that only GPT partition #5 has been place in the MBR, therefore Windows is only aware of that one partition. You need to use gdisk to add partitions 4 and 5 to the MBR, and flag (presumably) the 5th partition as bootable.

  • by AiOO,

    AiOO AiOO Oct 13, 2012 2:45 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 13, 2012 2:45 AM in response to Christopher Murphy

    Then should I do same solution again with new hybrid MBR has partition 4 and 5 both like below?

     

    ...

    ...

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    4 5 <enter>      add partion 5 to the MBR

    ...

    ...

     

    p.s. I'm so sorry for my poor English.

  • by victc5,

    victc5 victc5 Oct 13, 2012 11:41 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 13, 2012 11:41 AM in response to Christopher Murphy

    Hi Christopher,

     

    Just wanted to thank you for your solution to the same issue I encountered.

     

    Works beautifully!

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 13, 2012 1:37 PM in response to AiOO
    Level 3 (555 points)
    Oct 13, 2012 1:37 PM in response to AiOO

    Yes. Add 4 and 5, make sure 4 is not bootable and 5 is bootable.

  • by AiOO,

    AiOO AiOO Oct 15, 2012 12:59 AM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 15, 2012 12:59 AM in response to Christopher Murphy

    Thank you very much.

    I have solved all problems thanks to your answers.

     

    By the way, What is the hybrid MBR?

    It seems like a kind of virtual partition... but I want to know more detail what I did.

    Has privious hybrid MBR I made been overwriten since I did your solution again?

     

    Your knowledge is so amazing. Thank you. XD

first Previous Page 11 of 102 last Next