Resizing windows partition on my iMac
July 18, 2009
| mac, software
| not published
- Use WinClone to create a copy of the content on the old Windows partition (WinClone works with NTFS only, I think)
- Delete the old Windows partition with Boot Camp Assistant (and reboot your Mac)
- Create a new Windows partition with Boot Camp Assistant (I created a 99 GB partition for Windows)
- Use your Windows install media to create a NTFS file system on this new partition (you start the Windows install process from Boot Camp Assistant and cancel it after the Windows partition is formated)
- Reboot into Mac OS X (you might have to use your Mac OS X install media to do this since the Windos install process above might have overwritten the boot partition of the disk)
- Use WinClone to restore the Windows partition with the backup you created in step 1
- If Windows did overwrite the boot partition, fix the boot partition problem (I do this by installing the rEFIt boot menu)
- Reboot into Mac and Windows to see if everything works
This was the smooth and everything works perfect version, but of course it never does. First of all you should have a backup of everything important before you do anything like this. If you loose data and you don't have a backup of it, it was you who messed up. And the backup should not be on the disk you are repartitioning.
In step 3 when I tried to create a new partition using the Boot Camp Assistant I got an error. The problem was some inconsistent on the file system on the disk. To fix this I had to boot the iMac using the Mac OS X install DVD. In the tools menu I selected the disk tool, and then I performed the repair disk operation on the disk. It found a few errors and fixed them. After I had done this I rebooted into Mac OS X and retried step 3. This time it did work.
I also got some problems in step 6. I think the source of this was that also the Windows partition of the disk had some problems and that these problems were transfered to the backup created in step 1. After performing step 1 you should verify that the created disk image does not contain any errors. You can do this with hdiutil (where Path is the path to where you created the backup and Windows is the name of the backup):
/usr/bin/hdiutil verify /Path/win-vista.winclone/Windows.dmg
But I didn't do this, and restoring the Windows partition failed. The Log window of Winclone showed my when things went wrong (and the operation it performed). I tried to fix it by ignoring the fact that it was impossible to verify the Windows disk image. I attached it without verifying it first (adding the ignorebadchecksums and noverify flags):
/usr/bin/hdiutil attach -nomount -ignorebadchecksums -noverify /Path/win-vista.winclone/Windows.dmg
Then I performed the actual cloning (adding the rescue flag):
sudo /Applications/Winclone.app/Contents/Resources/ntfsclone -f -f -f --rescue -O /dev/disk0s3 /dev/disk4
NB: /dev/disk0s3 is the new empty Windows partition (it might have a different name on your system, check the Winclone log) and /dev/disk4 was the name given when the Windows image was attached (see the response from the hdiutil attach comand above). But now I had an incomplete Windows partition, and who knows if it will be able to boot. Well, I had to try it.