Skip navigation

Repairing Boot Camp after creating new partition

176102 Views 1,252 Replies Latest reply: Apr 5, 2014 6:57 AM by BobTheFisherman RSS
  • DSC426 Level 1 Level 1 (0 points)

    Chris/Others,

     

    I originally had problems after using disk utility to create an ExFat partition with Bootcamp for a Win7 and OSX 10.8 dual boot machine (Jan 17 posts)  I corrected that thanks to your help, but am now facing another issue.  I had ~700MB of unallocated /unused space and used Acronis (WIN) to resize my Windows partition to include that extra space.  Following, I can still get to my boot options when I hold option down on boot, and I see Windows, Mac, and Recovery.  When I select Windows though I just get a black screen with some colored icons and letters - no message, no timeout, no boot windows.  Mac boots fine.  I now am seeing an error: bogus map when I do a gpt show disk (see second example below - (AFTER)).  I included a BEFORE (just below) of what things looked like previously (though this included exFAT which I since cleaned up getting back to 1-4 not 1-5.  The other snippets are all current for supporting information.  Oh, and I can still see my Windows files/etc. when I'm in Mac - so I know it there, just feel like mapping or pointing is off.

     

    Any suggestions / thoughts?  Thank you!!

     

     

    (BEFORE) sudo gpt -r -vv show disk0

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

    gpt show: disk0: Suspicious MBR 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         MBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34          6       

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

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

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

      325897920        320       

      325898240   39063552      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      364961792  125272064      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      490233856        863       

      490234719         32         Sec GPT table

      490234751          1         Sec GPT header

      

    (AFTER) sudo gpt -r -vv show disk0

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

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: error: bogus map

    gpt show: unable to open device 'disk0': No such file or directory

     

     

    sudo gdisk -l /dev/disk0

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       362255479   172.5 GiB   AF00  Customer

       3       362255480       363525015   619.9 MiB   AB00  Recovery HD

       4       363526144       490233855   60.4 GiB    0700  BOOTCAMP

     

     

    diskutil list /dev/disk0

    /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            185.3 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data WINDOWS                 64.9 GB    disk0s4

     

     

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

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

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

    *4: 07 1023 254  63 - 1023 254  63 [ 364961792 -  125272064] HPFS/QNX/AUX

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 6, 2013 12:52 AM (in response to DSC426)

    You can never, ever use Windows programs to resize a Windows volume on a dual-boot Macintosh. It damages the GPT. Only applications explicitly made for use with Boot Camp can do this. I suggest you make an immediate backup of your most important OS X information if you haven't already, because that volume has three different sizes in each of the reported partition maps you've supplied.

     

    In the before, there were two Windows basic data partitions, 18GiB and 60.4GiB, I don't see 700MB of unallocated space in the before GPT. In the after GPT from gdisk and MBR from fdisk, the 18GiB volume is gone, only the 60.4GiB remains. Fixing that might be possible with Test Disk and its NTFS-3G utilities, it looks like the resize was interrupted or went wrong; the NTFS volume maybe was resized OK, but the partition map hasn't been changed to reflect that. So that's why Windows wouldn't be able to boot.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 6, 2013 12:56 AM (in response to DSC426)

    So yeah, what you need to do is backup OS X, backup Windows files from the OS X side; and then blow away the disk by repartitioning with a single partition; reinstall OS X (or restore from backup if Time Machine); update it; resize with Boot Camp; reinstall Windows; restore data. I have no easier way of telling you how to repair this kind of damage.

  • DSC426 Level 1 Level 1 (0 points)

    Argh.  OK.  Given I am going to be reinstalling Windows 7 and OSX 10.8 do you have a recommendation as to how best accomplish this - as I'd like to have dual boot - both a windows and OSX.  I've read a lot of posts steering away from BootCamp.  And, ideally I would like to be able to do so in that Windows can see files on OSX and OSX can see NTFS on Windows.  When I tried NTFS-3G it didn't function, but this was after the NTFS resize.  Does it matter if I install OSX or Windows first? Second?

     

    Also, in the before not seeing the 700mb unallocated is because that occurred after I removed the exFAT partition of 18GB.  After that was removed, I used OSX Disk Utility to reclaim that space, but oddly, it would not let me use all that it was showing available.  So I reduced the number incrementally until it would work therefor leaving me ~700MB unallocated...  That is why it is not showing in the before.  And in the after, or current, it was consumed by the windows resize that failed....

     

    Thank you very much!

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 6, 2013 11:28 AM (in response to DSC426)

    I only use a VM, Boot Camp is a PITA. I can share files using the VM's folder sharing feature.

     

    If you follow Apple's Boot Camp guide exactly, and you don't make changes except to nuke the Windows/Boot Camp volume when you're ready to get rid of it, you get read only JHFS+ from Windows, and read only NTFS from OS X. So you can see files on either OS so long as neither one is encrypted. No partitions can be added, or it breaks the arranagement.

     

    I don't know what version of NTFS-3G you're using, so saying it didn't function is vague. There are only two current versions, the free version is from MacPorts which you have to compile yourself using XCode. Or you buy a license from Tuxera and they give you a compiled binary that's ready to install. Everything else I've ever found googling is way too old and should not be used. There's also Paragon which offers alternative read/write support for OS X.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 6, 2013 11:33 AM (in response to DSC426)

    And as for the order, OS X is always installed first. There is no other way it can work. Make certain you re-repartition the disk, not just erase. And change the Partition Layout setting from Current, to 1 Partition. This is the only supported configuration. Once OS X is installed and updated, you can use Boot Camp Assistant to resize the OS X volume, to allocate space for what will become the Windows volume. Obviously once you get to the Windows installer you must find this volume and reformat it, because Boot Camp Assistant makes it FAT32, not the NTFS format that Windows requires. Etc. All of this is in the Boot Camp guide.

  • DSC426 Level 1 Level 1 (0 points)

    Thank you Chris.  Appreciate all your help and knowledge.  Got a fun couple days ahead!  Learning is sometimes painful.

     

    Oh, at this point, can I simply boot to my recovery partition and then restore from TimeMachine?  Is it that simple - any warnings?  Never have done that before...

  • ganze Calculating status...

    Dear Crhistopher, I had the same problem trying to add a brand new partition in my HD, originally I had an HFS+ partition with osx 10.8 of about 650 GB on it and a partition with widows 7 of about 100 GB. As I told I wanted to expand windows partition in order to install windows 8, first I created a new partition with disk utility, after doing that I lost the windows boot Icon. What I am supposed to do? I tred the steps at the beginning of this topic but aren't working for me, when typing in terminal the command "sudo gdisk /dev/disk0" it says there i no such command available. Hope there are enough information about that.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 7, 2013 9:18 AM (in response to ganze)

    You should run Windows 8 in a VM. There is still no Boot Camp support for Windows 8. I suggest that you use diskutil to re-merge your OS X and free space partitions back into one. Apple's implementation is really only designed to work safely with OS X and one other operating system, on one disk. Otherwise, gdisk is GPT fdisk, and is always found at Sourceforge.

  • ganze Level 1 Level 1 (0 points)

    ok, I resolved the booting problem. But now I have the OSX partitio, the bootcamp partition and the free space partition that disk utility don't let me re-merge with HFS+ volume, nor with bootcamp volume in windows. How I manage that?

  • ganze Level 1 Level 1 (0 points)
    Currently Being Moderated
    Feb 7, 2013 10:02 AM (in response to ganze)

    Sorry, I forgot to attach the screenshot.

    Screen Shot 2013-02-07 at 7.01.50 PM.png

  • Christopher Murphy Level 2 Level 2 (470 points)

    When I encrypted my MBP's SSD all I did was clone the OS X partition, boot into Recovery HD, re-format the OS X partition as HFS Encrypted, then clone my data back to the newly-encrypted partition—and it works just fine.

     

    The last time I tried it was 10.7 and this method wasn't bootable. I like the idea, however, because the conversion method reads-encrypts-writes every sector, which thwarts dynamic wear leveling, and is not good for SSD performance. The SSD thinks every sector is in use. An SSD that supports TRIM, and the OS using TRIM after encrypting the volume, works around this, but many SSDs actually either don't support TRIM, or don't perform well when it's used. Officially TRIM is only supported with Apple SSDs, on OS X. Whereas the method you're referring to is better for any SSD.

     

    whether that process would upset the delicate nature of the hybrid MBR.

     

    Disk Utility does modify the hybrid MBR, but since the code isn't available to look at, it would require testing to know how it behaves. I would probably use gdisk to replace the existing hybrid MBR with a protective MBR. Then do what you need to in Disk Utility. Then go back to gdisk and create a new hybrid MBR. I trust Disk Utility next to zero at this point when it comes to this stuff.

     

    cloning a single disk, partitions and all, such that the clone could be used in lieu of the original and work just as well, and in the same way, as the original?  Or, would I have to individually clone the OS X, OS X data and Boot Camp partitions, set up the new disk with the appropriate partitions first, then clone the data to the appropriate partitions?

     

    dd can be used to sector copy disk to disk, partition to partition, disk to file, partition to file, and the inverse of those. The filename extension is typically .bin but you can also use .iso even though it's technically not correct. If you do this with a partition to a file and make it .iso, it's mountable just like a DMG, but obviously it's read only. This is as exact a clone as you can get. File system doesn't matter (you can dd an NTFS source partition to a .bin file stored on JHFS+ for example).

     

    Just realize that there is a volume, and there is a partition. They're not the same. The partition size is set in the partition table (the GPT), and the volume size is the size of the file system. Apple's utilities, even on the command line, tend to manage these two separate things at the same time. So if you dd a partition, you need to make a note of the exact size of that partition so that when you dd it back onto a disk partition, you've first set that partition to the *exact* same number of sectors. You can make a partition bigger than its original volume, but then you must resize the volume to fit. Making a partition smaller than a volume is a recipe for lots of problems.

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Feb 7, 2013 10:06 AM (in response to ganze)

    diskutil resizevolume disk0s2 limits

     

    This changes nothing, but will let you know if it can do a resize. Actually, best to also look at the actual layout, as Disk Utility doesn't tell the whole truth.

     

    diskutil list

  • ganze Level 1 Level 1 (0 points)

    Here is what comes out from Terminal:

     

    Last login: Thu Feb  7 19:53:09 on console

    dario-pc:~ darioganzetti$ diskutil resizevolume disk0s2 limits

    For device disk0s2 Macintosh HD:

            Current size:  550.0 GB (549999996928 Bytes)

            Minimum size:  228.6 GB (228627828736 Bytes)

            Maximum size:  550.0 GB (549999996928 Bytes)

    dario-pc:~ darioganzetti$ diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *750.2 GB   disk0

       1:                        EFI                         209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            550.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data BOOTCAMP                92.3 GB    disk0s4

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:     FDisk_partition_scheme                        *500.1 GB   disk1

       1:             Windows_FAT_32 VERBATIM HD             500.1 GB   disk1s1

     

    Thanks a lot for your help.

1 ... 31 32 33 34 35 ... 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.