Mac OS X 10.4: Non-destructively enlarge HFS+ partition

1

I have a MacBook running OS X 10.4.11. Some time ago I shrank my main hard disk partition in order to dual-boot with Linux, but now I am running out of space on the Macintosh partition, and I would like to remove the Linux partition and restore the Macintosh partition to its original size. I have been able to remove the Linux partition, but I cannot seem to merge the free space back into the Macintosh partition. Originally I used GParted to shrink the partition, but I cannot use GParted to restore the partition because GParted is unable to enlarge HFS+ partitions.

Does anyone know how I can restore my HFS+ partition to its original size without losing my data or spending money on a commercial product?

If I attempt to use diskutil to resize the partition (while booted from the OS X installation DVD), I get the following:

# diskutil resizeVolume disk0s2 119690149888B
Started resizing on disk disk0s2 Macintosh HD
Verifying
Resizing encountered error No space left on device (28) on disk

The 119690149888 bytes value was listed as the maximum size in the output of the command diskutil resizeVolume disk0s2 limits.

I found other instructions for what I want to do at http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp#Restoring_your_Mac_to_its_original_state, but this requires Boot Camp, which is no longer available for OS X 10.4.

(This is almost the same problem as question 50317 "Resize HFS Partition", but on Mac OS X 10.4 the Disk Utility application cannot resize partitions non-destructively. When I attempt to re-partition it warns that all data will be lost.)

elcelista

Posted 2009-10-31T05:38:25.920

Reputation: 113

Answers

0

Can GParted rewrite the partition map (delete the linux partition and then resize the remaining HFS+ partition) without trying to enlarge the HFS+ filesystem? If so you might then be able to use diskutil to enlarge the HFS+ filesystem to fit the bounds of the newly grown partition.

Before trying this (or even using any of the commercial software), you should make sure you have a full backup (that way you can just destructively redo the partition with Disk Utility and restore from your backup—plus get a ‘free’ defrag for your troubles).

Chris Johnsen

Posted 2009-10-31T05:38:25.920

Reputation: 31 786

Yes I thought you could use a combination of Disk Utility/gparted to increase/decrease partition sizes, respectively.

I cheated and used iPartition which will work on Tiger, but costs about $35.

If you're spending money you could always buy Snow Leopard since it's only $25 but you would have to do an update without the full backup safety net. – alimack – 2010-02-24T15:12:10.553

I booted from an Ubuntu 9.10 CD and used GParted to delete the Linux partitions, but it would not let me resize the HFS+ partition. When I clicked on 'Resize/Move' it would let me decrease the partition size but not increase it.

Also, I don't have a spare hard disk at the moment, so I can't easily create a full backup. I'm thinking I'll probably have to buy an external hard drive and follow your suggestion. – elcelista – 2009-10-31T23:47:50.180