Skip navigation

Repairing Boot Camp after creating new partition

176160 Views 1,252 Replies Latest reply: Apr 5, 2014 6:57 AM by BobTheFisherman RSS
  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 11, 2013 4:29 PM (in response to nikdaquik)

    I can't answer your question.

     

    When you use Windows utilities to resize NTFS, it only updates the MBR. Often this will also corrupt the GPT primary table, and the backup GPT is nerfed. And then when the GPT is replaced, it nerfs the tail end of the NTFS volume often corrupting it. So I have no idea what the state of the Windows volume is in, or whether the entries in either GPT or MBR are even remotely correct.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 11, 2013 4:38 PM (in response to nikdaquik)

    There's an easy, risky way of finding out if the NTFS volume is OK, which is to try and start Windows from it. If it's not right, it's possible Windows will corrupt the file system in the process of starting up from it.

     

    Also possible is to run chkdsk (not chkdsk /f) while booted from a Windows DVD, and see what it finds. If there are no problems then try chkdsk /f.

     

    Not easy, but much safer is booting from a Linux livecd that has current ntfs-3g utilities on it, like Fedora 18. Run

    ntfsresize -i

    ntfsresize -c

    ntfsresize -n

     

    Those are: get info, check if ready for resize, and attempt to resize without actually make changes (dry run).

     

    If the volume is OK, check won't report anything, and resize will basically say the current size is the max size for the partition. Then you can run a chkdsk /f from the Windows DVD.

  • AlexDT Calculating status...

    You the man Murphy, you the man!! (...you too OP) This thread solved my problem!

  • fab.b Calculating status...

    Dear All,

     

    I have a very similar problem and after having made a lot of attempts to solve it and research on how to do this I think it suits well to this this thread (… hope I'm not wrong).

     

    The situation on my MacBookPro (6,2) is as follows:

    BEFORE: I had 320 GB disk with two partitions:

        •    one OSX Snow Leopard (10.6.8)

        •    one Windows 7 BOOTCAMP partition of about 34 GB (I could run windows either via Virtual Box directly out of OSX or when rebooting and holding down the alt-key).

    AFTER(Now actually): I have a 1000 GB disk with two partitions:

        •    one OSX Mountain Lion (10.8.2)

        •    one Windows 7 BOOTCAMP partition of about 65 GB

     

    For OSX I reinstalled everything from scratch with the new OSX version whereas for the BOOTCAMP partition I copied (I really DON'T want to reinstall all the Window stuff, I have so many things already nicely configured on there so…NO :)) the existing BOOTCAMP partition from my old drive as follows:

    1. I used the bootcamp assistant in my new OSX (10.8.2) to create the 65 GB partition but instead of installing win7 at reboot I used clonezilla to transfer the old partition's content onto the newly created 65GB partition.
    2. This didn't startup yet, so I booted the mac with my Win7 DVD and fixed to MBR and everything else possible … (cmd line: bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd)
    3. The partition is now recognized at startup when I hold the alt key (I can choose to start from the BOOTCAMP partition) but when booting from it it gives me the error: "BOOTMGR is missing"
    4. Furthermore when I attempt to choose a startup volume in system settings the BOOTCAMP partition is also listed.
    5. The windows 7 installation/repair CD also  nicely detects the partition and also doesn't complain about any errors.

     

    I think the data is perfectly copied, the partition is present but there must still be a small mistake in the partition table which I can't figure out.

    Any ideas?

     

    Thank you very much in advance!

     

    Best regards,

    Fab

    MacBook Pro, OS X Mountain Lion (10.8.2), Windows 7, 1TB HDD, 8GB RAM
  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 23, 2013 2:57 PM (in response to fab.b)

    BOOTMGR is missing means it got stuck at the boot sector of the VBR. It's unlikely this problem is partitioning related but you can post:

    sudo fdisk /dev/disk0

    sudo gpt -r -v show disk0

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 23, 2013 3:04 PM (in response to fab.b)

    The BCD probably needs to be completely rebuilt. From the Windows install DVD, command prompt:

     

    • bcdedit /export C:\BCD_Backup
    • c:
    • cd boot
    • attrib bcd -s -h -r
    • ren c:\boot\bcd bcd.old
    • bootrec /RebuildBcd
  • fab.b Level 1 Level 1 (0 points)

    hi christopher,

     

    thanks for your quick reply!

    here we go, the two outputs in the command line you requested:

    sudo fdisk /dev/disk0

    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 - 1826171904] HFS+       

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

    *4: 0B 1023 254  63 - 1023 254  63 [1827852288 -  125671424] Win95 FAT-32

     

    sudo gpt -r -v show disk0

    gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

    gpt show: disk0: Suspicious MBR at sector 0

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

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

      1827851080        1208        

      1827852288   125671424      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      1953523712        1423        

      1953525135          32         Sec GPT table

      1953525167           1         Sec GPT header

     

    As you suggested I also executed the commands in the Win7 install DVD command prompt but unfortunately without success. I mean yes I was sucessful in executing the commands but after a reboot the error message still remains the same: "BOOTMGR is missing".

     

    Message was edited by: fab.b

     

    Message was edited by: fab.b

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 25, 2013 5:18 PM (in response to fab.b)

    Also, the ID for the partition type is incorrectly set to 0B. It should be 07. I don't know if this is related to the boot problem.

     

    *4: 0B 1023 254  63 - 1023 254  63 [1827852288 -  125671424] Win95 FAT-32

     

    OS X's 'fdisk' can be used to change it. Type this:

     

    sudo fdisk -e /dev/disk0

     

    You'll see this:

    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

    Enter 'help' for information

    fdisk: 1>

     

    At that interactive prompt type

    fdisk: 1> setpid 4

     

    You'll see:

    Partition id ('0' to disable)  [0 - FF]: [EE] (? for help)

     

    Type:

    07

    write

  • fab.b Level 1 Level 1 (0 points)

    okay this is changed, now the partitions look as follows:

    sudo fdisk /dev/disk0

    [...]

    *4: 07 1023 254  63 - 1023 254  63 [1827852288 -  125671424] HPFS/QNX/AUX

    but unfortunately without any change in the failure to boot

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 25, 2013 11:00 PM (in response to fab.b)

    See post from 3 days ago with the bullet list including "bcdedit".

  • fab.b Level 1 Level 1 (0 points)

    Christopher Murphy wrote:

     

    See post from 3 days ago with the bullet list including "bcdedit".

    It was obvious to me so I already did it but completely forgot to mention...As I said I again restored the bcd with the full procedure (bcdedit etc.) you mentioned above but still without sucess

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Mar 1, 2013 8:51 AM (in response to fab.b)

    Well I'm out of ideas. I don't know that Clonezilla understands hybrid MBRs, which is a uniquely Apple thing that's totally non-standard. The only tools I know that are designed to resize file systems on disks containing hybrid MBRs are Wincone, iPartition, and Camptune. There's a bit more favorable reviews of Camptune, although I just read on Macrumors a user having a Camptune problem. Since I haven't used any of them, I can't provide guidance. Doing the resize from command line with open source tools is possible, but requires some rather esoteric knowledge of MBRs, GPTs, and NTFS. I think this particular case, copying an instance of Windows to another disk (partition) while resizing in the process, is maybe more the realm of Winclone. I get the impression that Camptune is more for resizing partitions on one drive; not migration.

  • Elling Magnussen Calculating status...

    Hi Christopher / Scotch,

     

    I am experiencing the same problem as many other seems to be having. I have one SSD (disk 1) with OSX on which is the default boot partition. I also have another HDD (disk 0) with OSX and WINDOWS 7. However, after creating a new partition (disk0s4), the boot meny is no longer showing the Windows partition. Naturally, it still shows in OSX.

     

    Below is the respective overview:

     

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:        GUID_partition_scheme                 *1.0 TB        disk0

       1:        EFI                                                209.7 MB   disk0s1

       2:       Apple_HFS Macintosh HD                469.0 GB   disk0s2

       3:       Apple_Boot Recovery HD                 650.0 MB   disk0s3

       4:       Apple_HFS Data                              449.9 GB   disk0s4

       5:       Microsoft Basic Data BOOTCAMP    80.3 GB     disk0s5

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                 GUID_partition_scheme      *128.0 GB  disk1

       1:                 EFI                                    209.7 MB   disk1s1

       2:                 Apple_HFS SSD                127.2 GB    disk1s2

       3:                 Apple_Boot Recovery HD    650.0 MB   disk1s3

     

    ====================

     

    After installing gdisk and running the sudo gdisk /dev/disk0 I get the following:

     

    GPT fdisk (gdisk) version 0.8.6

     

     

    Partition table scan:

      MBR: protective

      BSD: not present

      APM: not present

      GPT: present

     

     

    Found valid GPT with protective MBR; using GPT.

     

     

    Command (? for help):

     

    =================

     

    Would highly appreciate your inputs on how to proceed further as I have tried most of the solutions in this thread without any luck.

     

    Many thanks in advance!

  • Christopher Murphy Level 2 Level 2 (470 points)

    Like I ask everyone, seemingly over and over again, the basic information you need to provide is:

     

    sudo gpt -r -v show disk0

    sudo fdisk /dev/disk0

     

    If you already have gdisk installed, and you're still at its command prompt/

    Command (? for help):

     

    You can type the following letters, each followed by return/enter, and post those results intead: r, p, o, q.

  • Elling Magnussen Level 1 Level 1 (0 points)

    As follows:

    sudo gpt -r -v show disk0

     

    gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

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

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

       917694776   878644936      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      1796339712      262144        

      1796601856   156921856      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      1953523712        1423        

      1953525135          32         Sec GPT table

      1953525167           1         Sec GPT header

    sudo fdisk /dev/disk0

     

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

     

    Disk /dev/disk0: p

     

    1953525168 sectors, 931.5 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 96171B85-E1D6-4CAD-805D-5EA01AA69A1D

    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 263573 sectors (128.7 MiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       916425239   436.8 GiB   AF00  Untitled

       3       916425240       917694775   619.9 MiB   AB00  Recovery HD

       4       917694776      1796339711   419.0 GiB   AF00  Data

       5      1796601856      1953523711   74.8 GiB    0700  BOOTCAMP

    Disk /dev/disk0: o


    Disk size is 1953525168 sectors (931.5 GiB)

    MBR disk identifier: 0xF80847A9

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1   1953525167   primary     0xEE

     

    Letters Q and R does not give any information.

     

    Thanks!

1 ... 33 34 35 36 37 ... 84 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (21)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.