Two Mountain Lion installations + Bootcamp

Discussion in 'Windows, Linux & Others on the Mac' started by baryon, Feb 12, 2013.

  1. baryon, Feb 12, 2013
    Last edited: Feb 12, 2013

    baryon macrumors 68040

    baryon

    Joined:
    Oct 3, 2009
    #1
    I currently have Mountain Lion as my main OS, and Bootcamp with Windows 7 that I use occasionally for gaming.

    I have had my MacBook Pro for almost 5 years, and I've always upgraded OS X to the newest version, and never did a clean install. Now my system is a bit slower than I'd want, and I think this may be solved by a fresh install.

    However, I hate doing fresh installs because I have my system perfectly set up with everything installed as I want it, and it would take ages to get it back to this level.

    So I thought I'd create a new small (30GB) partition, install a fresh copy of Mountain Lion on it, and first see if it's really faster or not. Then if it is, I'll slowly set it up the way I like, without the problem of not having a ready-to-go system, as I can always boot into my current system and use that until I'm ready with the new one. I then plan to erase the old system and expand the partition of the new one, once I have it the way I want.

    First question: would this work, and do you see any problems with it?

    There is however a problem: Apparently Windows can only boot if there are not more than 4 partitions on the hard drive (is this true, or is it simply that Windows needs to be installed on partition 1, 2, 3 or 4, but not 5, etc…?). This is some old limitation of the Master Boot Record.

    Here's what Disk Utility says before adding a new partition to a disk that already has a Bootcamp partition:
    Screen Shot 2013-02-12 at 10.59 PM.png

    Currently, Partition 1 is the Mac's EFI, 2 is OS X, 3 is the recovery partition and 4 is Bootcamp. So if I would add another partition, surely Windows would no longer boot.

    Second question: Is this actually true? If I then delete the old OS X partition, will Windows slide back to its original position as number 4, and will it work again? The 5 partition set-up is temporary, so I'm fine with Windows not booting during the transition, but I'd like it to work eventually.

    Thanks, and hope this all makes sense...
     
  2. Quad5Ny, Feb 12, 2013
    Last edited: Feb 12, 2013

    Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #2
    Sadly yes, everything you said is correct. It would be nice if Apple would update everything to be fully compatiable with Windows in EFI boot...but we both know that's not going to happen.

    You can backup your Recovery Partition to a ThumbDrive and then erase it, that will give you the extra partition you want. Or fiddle with the MBR.

    I'll post back with more info in a bit.
     
  3. Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #3
    If you have the average Apple partition setup, than this is all you have to do:
    (Average = EFI | Macintosh HD | Recovery HD | BootCamp)
    1. Backup your MBR - Open Terminal, Type "sudo dd if=/dev/disk0 of=~/Desktop/SECTOR_0.BIN bs=512 count=1"
    2. Backup the Recovery HD partition to a ThumbDrive
    3. Remove the Recovery HD partition (Scroll Down to "How do I Delete the Recovery Partition?")
    4. Grow the Macintosh HD partition to take up the space the Recovery HD partition was in.
    5. Resize Macintosh HD and create Macintosh HD 2

    That should take care of everything and hopefully you won't need to edit the MBR manually. But if you do, just post back and I'll help you through it.
     
  4. Quad5Ny, Feb 12, 2013
    Last edited: Feb 13, 2013

    Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #4
    • The first alternative to what I listed above I can think of would be to delete the EFI partition. If you do that than you can forget about ever using any of Apple's disk utility's because they all try to re-create it.
      .
    • The second option would be to manually edit the MBR to exclude the EFI partition, this should work fine but could risk corrupting the EFI partition if some program saw it as free space and wrote to it (on Windows).
      .
    • Third option would be to manually edit the MBR to exclude one of the Macintosh HD partitions. Again, this should work fine but you could risk loosing data if some program tried to write to it (on Windows). Also you wouldn't be able to access whichever one you excluded on Windows.

    ---

    This is what a MBR looks like, it is the first sector on any drive:
    [​IMG]

    As you can see, it is extremely small (only 512Bytes). The space constraints are what causes the 4 partitions limit and also why MBR partitions can't be larger than 2TB.

    GUID Partition Table's (GPT) fix MBR's shortcomings but Windows will only boot off of GPT if its installed to a compatible EFI system. (I believe newer Mac's are compatible but they lack the proper Windows Drivers.)

    All Intel Apple Computers use GPT but when you create a Boot Camp partition OS X changes the MBR from being a Protective MBR to a Hybrid MBR so Windows can boot.
     
  5. baryon, Feb 13, 2013
    Last edited: Feb 13, 2013

    baryon thread starter macrumors 68040

    baryon

    Joined:
    Oct 3, 2009
    #5
    That makes sense, but it sounds a bit risky to modify my "important" partitions (the recovery HD for example). The Windows partition is the one I'm most willing to damage if anything.

    Keep in mind that I don't intend to have two OS X installations/partitions for long, just maybe a few days. After that, I want to delete one of them and get back to 4 partitions again.

    What if I just create a new partition now (Macintosh HD 2), and when I'm happy with the installation, I'll delete Macintosh HD 1, and Windows would return to 4th place? Would that not work? Or will Windows stay stuck in position 5 or something...?
     
  6. Quad5Ny, Feb 13, 2013
    Last edited: Feb 14, 2013

    Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #6
    Before I reply, what if you just backup your Windows partition and then delete it. That way you can play around with whatever you want and re-create your Boot Camp partition when your done (and I don't have to worry about helping you mess about with the MBR :p).

    I'm sure someone in the Mac OS X sub-fourms could suggest a tool to backup your Windows partition.

    That would work, but OS X won't fix it for you automatically. As soon as you create the 5th partition Disk Utility will switch the Hybrid MBR back to a Protective MBR.

    When your finished with everything you'll have to re-write the Hybrid MBR partitions table and possibly the Windows MBR code. rEFIt has a tool that will re-write the MBR partition table, theres also separate utility called gptsync or of course theres whatever OS X uses to do it when activating Boot Camp. As for the Windows MBR code you can use dd to copy that back in.

    Also there are 2 things I forgot to mention before. One, if you remove the Recovery HD partition you can't use FileVault2's full disk encryption on your bootup hard drive. And Two, you can't shrink or grow partitions from the beginning of a partition (See Below).

    ---

    Works:
    Deleting Macintosh HD 2 and adding the free Space to Macintosh HD.
    [​IMG]

    Doesn't Work:
    Deleting Macintosh HD and trying to add the free space to Macintosh HD 2. It won't let you grow Macintosh HD 2 to take up the free space, there's just no way to do it in Disk Utility.
    [​IMG]
     
  7. baryon thread starter macrumors 68040

    baryon

    Joined:
    Oct 3, 2009
    #7
    Wow, thanks for all the info, it's extremely useful! If I would have started this with my current knowledge, I would be in big trouble now :D

    So let's say I back up Bootcamp and then get rid of it for now to make things less complicated. If I were to then create a new Macintosh HD 2 partition with a new Mountain Lion install on it, and I would later decide to keep that and get rid of my old Mountain Lion install and its partition, I wouldn't be able to grow the new partition to take up the old partition's free space (as the new one will sit below the old one)?

    What if I boot into recovery mode and use Disk Utility there? Or is it more of a problem with how partition data is stuck to the beginning of the partition…? That would mean my plan wouldn't work at all, as I'd be stuck with a bunch of useless free space… well unless I clone/Time Machine restore the new system onto that free space, I guess?
     
  8. Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #8
    Yes, you would be stuck with the old Partitions free space.

    Disk Utility in recovery mode has the same shortcoming. You could try some third party resize utility's but that's going into a area I have no experience in.

    Time Machine or one of the many clone utility's would work. -- Get everything setup, make a clone of Macintosh HD 2, restore it to the original Macintosh HD location, delete Macintosh HD 2 and finally grow Macintosh HD back to its original size (just be sure that you don't end up with double recovery partitions).

    It sounds like a lot of steps but it should only take about 30min (most of which would be you waiting for the files to copy). And if anything goes wrong, at least you have a backup. :rolleyes:
     
  9. Quad5Ny macrumors 6502a

    Quad5Ny

    Joined:
    Sep 13, 2009
    Location:
    New York, USA
    #9
    You know if your looking for a loading speed increase from a copy of OS X that's been installed forever, you could always try clearing the cache folders and then defragmenting the drive by cloning it on top of itself. (Of course if you have a SSD, this wont help at all.)

    1. Get rid of any utility's you don't need running on startup
    2. Trash Everything in /Library/Caches/ and ~/Library/Caches/
    3. Restart
    4. Empty your trash
    5. Clone your Macintosh HD and restore the clone on top of itself
     

Share This Page