Wednesday, September 12, 2012

How to resize a HFS+ partition on a Hackintosh if it's created in the middle of the drive.

OK first off a little back info on this situation. My hackintosh system was originally setup with the hard drive partitioned fully for my original Lion OSX install. When Mountain Lion came out I purchased it, used the unibeast tool from TonyMacx86's site to create a new Mountain Lion USB installer and then I used the Disk Utility on that installer after I rebooted my hackintosh and then booted off the USB Mountain Lion installer disk to resize my original Lion HFS+ partition so I could create a second blank partition for Mountain Lion. I then installed Mountain Lion on this second partition and after downloading the new Mountain Lion Multibeast software from the TonymacX86 site and installing it I was able to successfully boot my hackintosh from the new Mountain Lion Partition without having to use the USB Mountain Lion install disk.

So after I copied over all of my files,etc. that I wanted to keep from the old Lion partition I decided to use disk utility to delete this partition with the goal of moving the mountain lion partition to the beginning of the drive and then resizing it to fill the full drive.

That's when I ran into problems, apparently Disk utility can shrink a drive, and it can be used to expand a partition to fill the entire drive, but it can't move an existing partition to the beginning of the drive.

I know I could have just backed up the partition to a dmg and wiped the drive, created a new single partition and then restored the DMG file to it, but I wanted to see if this was possible to move the partition. Since I was able to do it I wanted to document the steps and share so anyone else who runs into this situation can also benefit from this info to move their partition and then resize it to fill the full size of the drive. 

here are the steps I took.

1. downloaded current version of partedmagic bootable linux cd iso from here.
2. burned the partition magic iso to cd, inserted cd into optical drive on my system.
3. booted system to linux desktop using the partedmagic bootable cd I burned.
4. ran the partition editor shortcut on desktop.
5. chose the resize/move option in the gparted program that the partition editor shortcut opened.
6. moved the partition to the beginning of the drive, this takes quite a long time so be prepared to wait, or go do something else and check back in about an hour or so.
7. after the move is finished reboot the system and boot it from your Lion or Mountain Lion usb installer key, and use the disk utility from it to do a repair on your drive as the header will show as being slightly screwed up and will prevent you from being able to resize the drive until this is fixed. I tried to resize the partition using gparted and it didn't give me that option, which is why you need to use disk utility.

8. after running the repair you can now open the mountain Lion disk utility program and go to the edge of the partition and drag it down so it will fill the entire drive, and then click apply. this process takes a little while to finish but is much faster than the move to the beginning of the drive using gparted from the partedmagic boot cd.

Anyways I hope this information is useful for you.

I remain your obedient servant,

Doctor Evil

No comments: