2 Replies Latest reply: Jun 7, 2009 11:46 AM by siddharth.shetye
siddharth.shetye Level 1 Level 1 (0 points)
Hi,

Well, if you find your Bootcamp/NTFS/Windows partition running out of space, you may want to increase it or decrease it. The OSX Bootcamp utility doesn't allow resizing the NTFS partitio nor does Disk Utility. Here is a free solution ...

NOTE: I've tried this on Windows 7 64bit, but it should work with other windows setups in a similar manner.

Requirements:
1. SysRescueCD (for an NTFS capable 'gparted')
- http://www.sysresccd.org/Download
2. rEFIt bootable CD (or install to hard disk, doesn't matter)
- http://refit.sourceforge.net/doc/c1s5_burning.html
3. Windows XP/Vista/7 CD (depends what you've installed)
- just for a quick 'repair' at the end, no reinstall here!

In short:
1 Shrink Mac partition in OSX's Disk Utility
2 Grow the NTFS partition in gparted booting off sysrescue CD (reboot->option key). This may take 30mins to a few hours to complete!
3 Boot the rEFIt CD -> choose "start partitioning tool" -> hit yes when it says it needs to sync the MBR with the GPT.
4 Boot your Windows CD.
Vista/Windows7 CD -> hit the repair option to fix the boot record.
XP CD -> you may need to go to the administrative shell and type fixboot and then fixmbr.
5. Reboot and you should be able to boot into Windows via the option key as before. I liked rEFIt a lot so I installed it to my disk itself. (FYI, I did notice I needed to install rEFIt a few times to get it to show up during boot time)

Message was edited by: SidOnline

Macbook, Mac OS X (10.5.6)
  • siddharth.shetye Level 1 Level 1 (0 points)
    I posted a howto to help other users of this forum. If this worked for your configuration write back for others to learn from it.
  • siddharth.shetye Level 1 Level 1 (0 points)
    One bug I learnt:

    if
    1. you set the 'boot' flag on the Windows partition in gparted AND
    2. you use gptsync to sync the GPT with the MBR (i.e. MBR->GPT translation)
    then
    you will find that your Windows partition becomes inaccessible in OS X. Your partition is OK - you can boot in windows etc - OS X just doesn't see it as a NTFS partition.

    Solution:
    1. Don't enable the boot flag in gparted. Simple, no need to read further.

    If you're done it and have been hit by the bug and would like to see Windows/Bootcamp again in Finder, read on...

    1. Goto http://www.insanelymac.com/forum/index.php?showtopic=31562, post #9 has a tool to fix it. Download the diskpart.zip file (it's got diskpart.efi)
    2. Extract the diskpart.zip file, copy the diskpart.efi to /efi/tools on your OSX volume (default location for hard disk install of rEFIt).
    3. Reboot, in the rEFIt menu, select the EFI terminal
    4. type fs1: and hit enter. This should take you to your Leopard volume (for me fs0: was the 1st partition (EFI boot partition), fs1: was the 2nd partition (Leopard)
    5. type _cd /efi/tools_ and hit enter
    6. type diskpart and hit enter
    7. As the post linked above says, type
    +select <zero-based disk number>+
    inspect
    +chtype <zero-based partition number> MSDATA+
    For me this was
    +select 0+
    inspect
    +chtype 2 MSDATA+

    Look at the output of select to make sure you're using the right number - if you have your eyes open it's hard to make a mistake!

    Behind the scene details:
    Your partition type is set to NTFS in the MBR table (which is why windows can load it up etc) but if you do the above then the partition type in the GPT is written as EFI instead of NTFS (or more accurately 'MSDATA'). This is a bug in gptsync and I believe Chris (writer of rEFIt) is aware of this - at least another post elsewhere made it look like that. I guess you can't blame it since EFI, GPT tools are still in their infancy.

    BTW, to sync the GPT with the MBR, there is a tool gptsync. I believe it's a tool from Intel's EFI toobox. It exists as either an efi program (i.e. gptsync.efi, runs when you select it from rEFIt's menu) or as a OSX program (just gptsync, runs when you download it and type 'sudo gptsync').