Resize Windows Partition

Discussion in 'Windows, Linux & Others on the Mac' started by Cennipe, Mar 19, 2012.

  1. Cennipe macrumors newbie

    Joined:
    Mar 19, 2012
    #1
    I have a Windows 7 partition with 60 Gb and need more room, I have plenty of room on my Mac side (Lion) that I wouldn't mind giving to the Windows 7 side. I'm looking for a way to do this. I have done some reading, but there doesn't seem to be a universally accepted way to do this. The current methode that I am leaning toward is using the GParted part of Ubuntu as it seems to do what I need to do. I know there is always risks involved in this type of procedure and thus will make a back up; is GParted a reliable way to do this or is there another methode that is better?

    Thanks,
    Alex
     
  2. RossMacca macrumors regular

    Joined:
    Mar 31, 2009
    #2
    I'm sure there is a way, but tread very carefully, I tried this a couple of months ago and almost lost ALL data on my MacBook Air (had to type some very long commands into Terminal from an external HD to save it...)

    Goes without saying, backup before you modify partitions.
     
  3. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #3
    No, you won't be able to use gparted to resize JHFS+/X. You'll need to use diskutil resizevolume from command line to do that. I'm not aware of a GUI tool (other than Boot Camp and it is very constrained on what it will let you do).

    Since you have Lion, your partitions are:

    EFI System
    Mac OS
    Recovery HD
    Windows

    So when you resize Mac OS, you will create a gap of free space between Mac OS and Recovery HD. You'll need to slide it over. dd can do this as a sector copy and then relocate, using gdisk to change the GPT partition table to account for the change. But maybe gparted can do only a move without resize, in-place without needing extra space to copy it elsewhere first.

    Once you slide Recovery HD back so that it butts up with Mac OS, you'll have free space in front of the Windows partition. You can use gparted to resize/move such that you change the start block of the Windows NTFS partition to the new start of free space created, and resize to fit in that whole space.

    Last, the disk will have reverted to GPT only with a protective MBR, which is an MBR with a single 0xEE entry. This will prevent Apple EFI from initiating the CSM-BIOS and booting Windows. So you'll need to create a new hybrid MBR, which is pretty non-obvious. Again gdisk can help with this. The way I do it is I only add the Windows partition to the hybrid MBR and stuff all the other GPT partitions (EFI, Mac OS, Recovery HD) into the MBR 1st partition 0xEE protective entry. Remember to mark that Windows partition bootable in the MBR as well - gdisk asks if it should set this flag.

    It should work. I've done it many times, just not with gparted. But fraught with peril because it's possible to make one mistake and hose the whole process. And all data. So just be REALLY careful.

    Equally important to the backup, is a screen shot (or something) of the existing GPT entries. I use:
    gdisk -l /dev/disk0
    and then print out that table, if you mess up the GPT, the data on the disk is NOT HURT. But to get access to it, you must have valid numbers to generate a whole new GPT if necessary.

    Also, if FileVault 2 is enabled, you have to disable it, decrypting your disk, before it's possible to resize JHFS+/X. This I have not done, so I don't know if upon decryption if it remains a Core Storage logical volume, or if it's restored to being a normal volume. If it's normal, you can resize. If it's still Core Storage I don't think it's resizable.
     
  4. Cennipe thread starter macrumors newbie

    Joined:
    Mar 19, 2012
    #4
    Is there a reason that I can't shrink my Mac partition in the disk utility than reboot in Windows and use windows disk utility to absorb that space? Note I'm much more concerned about the data on the Mac Partition than I am about the Windows Partition. I suppose could I delete the windows partition, absorb that space into the Mac partition then reinstall Windows (there is very little on the windows partition I care about.)?

    Thanks.
     
  5. RossMacca macrumors regular

    Joined:
    Mar 31, 2009
    #5
    I also thought this would work but if I remember right, it didn't. And you run the risk of corrupting your Mac partition too if you're not sure what you're doing like I was. It was over a month ago, and it's taken untill today to get my drive back to normal.

    If you must have it bigger (though you said nothing important is on it, so I'm unsure why), I'd remove Windows using Boot Camp (important) and reinstall using a larger partition.
     
  6. Cennipe, Mar 19, 2012
    Last edited: Mar 19, 2012

    Cennipe thread starter macrumors newbie

    Joined:
    Mar 19, 2012
    #6
    None of the space on it is files like music or movies, it is all being used for CAD programs, which are relatively easy to replace (student versions). I think I'm going to go for the full delete and reinstall as this methode seems to be the least likely to corrupt the Mac partition. If I made a copy of the Windows partition, is there a way to mirror that back once i reinstall Windows? Before I delete it, can I just make a backup, then once I reinstall, just do a recover? Sorry for all the questions, I don't mess around with disks much.

    Thanks!
     
  7. RossMacca macrumors regular

    Joined:
    Mar 31, 2009
    #7
    Ah ok, I see. For Mac there's a program called Carbon Copy Cloner which, well does what the name suggests, copies disks EXACTLY as they are; it MIGHT let you clone your windows partition but don't quote me on it.

    I'm sure there will be a Wind'ohs alternative to CCC which will let you transfer files back over once you reinstall, but as you said, most software is pretty easily redownloaded so it might be just as easy to do that.

    Don't worry about the questions, better to be cautious when it comes to messing with partitioning.
     
  8. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #8
    Yes. The free space is not continguous. You have a Recovery HD partition in between the free space created by shrinking the Mac OS volume, and the Windows volume. Since it's not contiguous, Windows Disk Utility can't grow your Windows volume.

    Maybe iPartition can help? I haven't used it, but it's not free. But compared to the amount of time you'd spend learning, and still possibly screwing up, it's probably cheap.

    ----------

    The first question doesn't really make sense. If you copy the Windows partition (to a .img file, i.e. sector copy for example), yes you can restore it to a new partition of the exact same size (exact same number of sectors). To grow that partition is a separate step because the filesystem needs to have new structures created to account for the extra space, so you can't just copy it into a larger partition. It requires filesystem resizing.

    Any resizing is a two part process: filesystem and partition.

    ----------

    Partitioning is about as basic as it gets. It's mostly a challenge wrapping your head around the details and nuances of partitioning, and familiarity with the tools. The GUI tools lack a lot of granularity in presenting those details and nuances, or allowing you to change them, so you're less likely to get into trouble, but that's only because so many options have been taken away.
     
  9. Cennipe, Mar 20, 2012
    Last edited: Mar 20, 2012

    Cennipe thread starter macrumors newbie

    Joined:
    Mar 19, 2012
    #9
    By mirroring, I meant have a backup, then restore. Ok, so I can't simply restore to a larger partition. Could I create a backup image of the Windows partition, delete it so that my computer is full Mac again, reinstall Windows with a new copy (student discount, don't mind buying new copy), and when I reinstall it, allocate a larger size. Or after deleting the Windows partition, should I just create a new partition the size i want, format that partition to a FAT-32, then restore to that partition instead of reinstalling Windows? Then when I restore off the old image, then I won't use the whole space, but, then can I follow the instruction under Task #1 from the link below to be able to use the full amount I allocate when I reinstall? Does this all make sense/would it work?

    http://www.pagestart.com/win7bckuprstrnhd072610.html
     
  10. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
  11. Cennipe thread starter macrumors newbie

    Joined:
    Mar 19, 2012
    #11
    Thanks, that is exactly what I was looking to do! And the instructions seem simple enough!
     
  12. Cdert macrumors newbie

    Joined:
    Mar 19, 2012
    #12
    I am attempting to resize (shrink) the one partition (4x320GB in RAID5) so that I can create new partitions with the unalloacted space. EASEUS Partition Manager 3.0 is asking for a reboot to complete the process. My problem is this server is hosted remotely without a monitor connected so I am not sure if further commands or input will be required after it reboots of if it's automated. Can someone please confirm?

    http://www.61designstreet.com/
     

Share This Page