Skip navigation

Repairing Boot Camp after creating new partition

177350 Views 1,254 Replies Latest reply: Apr 18, 2014 12:22 PM by Loner T RSS
  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 20, 2013 8:07 PM (in response to RemiRobi)

    FYI rEFIt is no longer maintained. The rEFINd fork is current.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 20, 2013 8:24 PM (in response to DSC426)

    In other words, have a partition both Windows and OSX could see/use, independent of the OS I booted into.

     

    Apple tools won't let you do this, as you've found, their tools break Boot Camp when you do this. Your options for a file system are FAT32 and NTFS, I simply don't recommend using exfat for this purpose.

     

    I don't know if I can do that now somehow and not lose data.

     

    To simultaneously resize NTFS and OS X on the same disk requires a 3rd party utility. I think the suggested tools are Winclone, iPartition, and CampTune. You'd have to search the forums, or get reviews elsewhere. I haven't used any of those tools.

  • frisco330 Calculating status...

    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 -  304276663] <Unknown ID>

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

    MacBook Pro, Mac OS X (10.6.8)
  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 20, 2013 8:32 PM (in response to frisco330)

    Without a complete history of the disk, I can't even begin to speculate. But the hybrid MBR #2 entry, and GPT #3 entry contain the same start sector value for Windows. So if the start sector is actually something else, neither partition table contains that information presently. So in effect it's total data loss of the Boot Camp partition unless and until you can find the actual start sector and make the proper change in both GPT and MBR.

     

    I can't say I have good advice how to produce other than by deleting the partition you have for Boot Camp, creating a new one, reinstalling Windows and restoring your data from backups.

     

    Otherwise, possibly Test Disk can help find the start sector of the NTFS volume.

  • frisco330 Level 1 Level 1 (0 points)

    Christopher,

    Thanks for all your assistance.

    Well seems this is what testdisk shows does this help at all?

     

    Disk /dev/disk0 - 320 GB / 298 GiB - 625142448 sectors (RO)                    

    Current partition structure:                                                   

         Partition                  Start        End    Size in sectors            

     

    1 P EFI System                    40     409639     409600 [EFI]              

    2 P Mac HFS                   409640  304014519  303604880 [Macintosh HD]     

    No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker                          

    3 P MS Data                304276664  550591775  246315112 [BOOTCAMP]         

    3 P MS Data                304276664  550591775  246315112 [BOOTCAMP]

     


    MacBook Pro, Mac OS X (10.6.8)
  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 20, 2013 8:47 PM (in response to frisco330)

    No idea, I've never used Test Disk.

  • .Impact Calculating status...

    Hey Chris! Was wondering if you could help me out here.

     

    So I read the first two pages and I followed them to the letter (At least I think I did.)

     

    Anyways when I entered the code:

    sudo gdisk /dev/disk0

     

    It said "command not found"

     

    What do you propose that we do?

     

    Here's what I had so far from your instructions

    Screen Shot 2013-01-23 at 12.03.50 AM.png

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 22, 2013 9:43 AM (in response to .Impact)

    You have to install it. It can be found by googling "gpt fdisk" it's usually the first result.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 22, 2013 9:47 AM (in response to .Impact)

    Since you have five GPT partitions, you can't put them all into the MBR which can only hold four partitions. So what you'll need to do is add partitions 4 5 to the MBR, and flag only the one that's bootable (I can't tell which one is bootable but I'll guess it's #4). Doing this will mean the OS X volume is not in the MBR, and thus will not be visible to Windows. FYI.

  • .Impact Level 1 Level 1 (0 points)

    How exactly do I do that?

     

    EDIT: Nvm, I got it. Gonna try to reboot and get into Windows now.

     

    Message was edited by: .Impact

  • maghikal Calculating status...

    Hello!

     

    I see how well you've helped these fine people and i hope you have experience and graciousness to help me

    This problem has been racking my brain for the past few days now.

    For context, on my old macbook i replaced the SuperDrive with another hard drive and decided to use that drive to install bootcamp.

    I use the bootcamp utility to partition the full disk for my windows installation. on restart i realize the windows disk isn't capable of installing from an external dvd drive (go figure) and i didn't have a USB stick to boot the installation off of at the time. I had the clever idea to use Parallels to install windows using the Bootcamp partition as the disk instead of a virtual disk. once i got that set up i try to restart with alt/option but i couldn't see the windows drive. Through my research i found out that parallels doesnt' write teh MBR to the disk and instead saves it in a virtual file. I figure out how to write the virtual file using the "dd" command to replace the physical drive's MBR and Success! i was able to boot into windows and have been using it since.

     

    a few days ago i got a new macbook and i figured i could move the drive to the new macbook with the same setup. unfortunately i get the "No Boot Device" error although i can still boot through parallels. the MBR hasn't changed and just to be sure i used "dd" to write the MBR again with parallels file without success.

     

    (Apologies i don't know how to post the properly formatted code)

    here is my diskutil list

    Screen Shot 2013-01-23 at 1.06.48 PM.PNG

    I am using FileVault on my Macintosh HD so maybe that's why it shows up in /disk2 when there are only 2 disks present.

     

    here are the result of sudo gpt -r -vv show disk1

     

    Screen Shot 2013-01-23 at 1.10.00 PM.PNG

    and sudo fdisk /dev/disk1

     

    Screen Shot 2013-01-23 at 1.10.54 PM.PNG

     

    i don't know if it's worth noting that i sometimes see my second drive as /dev/disk0 rather then /dev/disk1 you see now

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jan 23, 2013 10:46 AM (in response to maghikal)

    The /dev/diskX assignment varies between reboots, that's normal. In the above screen shots disk0s2 is the partition on which an encrypted Core Storage volume is located, and disk2 is the unlocked and mounted version of it (i.e. disk2 is a logical volume)

     

    Try posting the results from:

    sudo dd if=/dev/disk1 count=1 2>/dev/null | hexdump -C

  • Gatormac2112 Calculating status...

    Christopher,

     

    I hope this hasnt become too tiresome for you as I have the same problem but didnt have the confidence to proceed without you walking me through it. I have an iMac that has an SSD as the main OS X boot volume, and a 1TB internal HDD that was being used for simple storage for OS X as SSD's are quite small. I had a 256GB bootcamp partition on the HDD with windows 8....all was well, then I got the bright idea to create a bootable backup of the SSD, so I downloaded Carbon Copy Cloner and created the bootable clone after creating a 120GB partition on the HDD for the clone.

     

    I can boot into Mac OS X on the SSD and the bootable clone, but I can't boot into the bootcamp partition. I followed the first steps on the first page of this thread and here are the results:

     

    Screen Shot 2013-01-23 at 2.23.54 PM.png

    Screen Shot 2013-01-23 at 2.24.17 PM.png

    I probably would have gone further except I didn't have 5 GPTs, whatever that is, I only had 3....maybe because the HDD isn't the OS X boot volume? Anyway, I appreciate any assistance you could give me. I suppose I could just wipe the bootcamp partition and start from scratch, but I wouldn't be able to put a bootcamp partition on an HDD with 2 partitions already would I? Starting from scratch is such a headache though.

  • autnagrag Calculating status...

    My bootcamp installation of Windows is broken or at least mislocated. A program, probably Carbon Copy Cloner, objected to the fully functional drive, which had bootable partitions for MtnLion1, SnoLeopard, and WINDW732 (Win7 32bit), and offered to give it a Recovery HD slice. Foolishly, I agreed. Thus I ended up with the following:

     

    Code:

    $ diskutil list

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk1

       1:                        EFI                         209.7 MB   disk1s1

       2:                  Apple_HFS MtnLion1                412.3 GB   disk1s2

       3:                 Apple_Boot Recovery HD             784.2 MB   disk1s3

       4:                  Apple_HFS SnoLeopard              40.3 GB    disk1s4

       5:       Microsoft Basic Data WINDW732                45.6 GB    disk1s5

     

    The Windows volume will still boot as a virtual machine using Virtual Box.

     

    Startup Manager does not see the Windows volume. System Preferences>Startup Disk sees the Windows volume. Alas, when it is chosen as the startup disk the boot fails with a Win7 error message of “No bootable device --- insert boot disk and press any key.”

     

    I think the volume might work again if I can restore it so it looks like this, so that Bootcamp installation will again be in slice 4 where it was very happy:

     

    Code:

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk1

       1:                        EFI                         209.7 MB   disk1s1

       2:                  Apple_HFS MtnLion1                412.3 GB   disk1s2

       3:                  Apple_HFS SnoLeopard              40.3 GB    disk1s3

       4:                  Microsoft Basic Data WINDW732     45.6 GB    disk1s4

     

    I downloaded gdisk 0.8.6. I respect the command line. I’d like to use it to fix my drive, but I don’t want to damage it any further. If I understand this thread, I think for help I should list the output below.

     

    user$ sudo gpt -r -vv show disk1

    Password:

    gpt show: disk1: mediasize=500107862016; sectorsize=512; blocks=976773168

    gpt show: disk1: PMBR at sector 0

    gpt show: disk1: Pri GPT at sector 1

    gpt show: disk1: Sec GPT at sector 976773167

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

      805626288    1531680      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      807157968   78626792      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      885784760    1984328        

      887769088   89004032      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

     

    I don't actually care if the Recovery HD partition gets removed, as long as I recover the ability to boot to Windows 7 via Bootcamp or pseudo-gdisk-almost-Bootcamp. I do not need to use FileVault2 on this drive.

  • Gatormac2112 Level 1 Level 1 (0 points)

    Here is a little more info:

     

    Screen Shot 2013-01-23 at 4.00.44 PM.png

1 ... 24 25 26 27 28 ... 85 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.