Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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).

share|improve this answer
    
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 Oct 31 '09 at 23:47
    
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 Feb 24 '10 at 15:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.