Resizing Partitions on Mac OS 10.5 Leopard

Leopard moves the ability to resize partitions from BootCamp (which is no longer supported) to the disk utility. But there are some pitfalls.

  • You cannot have booted from the partition that you want to resize. This should be obvious, but there’s no documentation that appears to point that out, nor is the error message you get really useful (either “not enough space” or “the resource is temporarily unavailable”, both after the program works for quite a long time - come on, this is the first thing the application should check!)
  • You cannot have files larger than about 1GB on the partition if you want to shrink it. Again, no useful error message (only the “not enough space” one).
  • Related to the last point, on MacBooks and MacBook Pros there is a hibernation image /private/var/vm/sleepimage that is the same size as your system memory - 4GB in my case. Which you cannot delete unless you turn off hibernation and sleep support.

So here’s what you need to do.

  • Back up your data. I mean it. All of it.
  • Find all files larger than 1GB. I assume that you want to resize your / partition - if it’s another one, change the starting point of the following command accordingly. In a terminal window run
    sudo find -x / -regex /dev\* -prune -o -regex /net\* -prune -o -size +1G
    and look at the output. Since you made a full backup, delete the files that are 1GB or larger (which are the ones that should be listed by this command).
  • The one you can’t simply delete is the the sleepimage mentioned above. Follow these steps:
    • Save the current hibernation mode
      sudo pmset -g | grep hibernatemode > ~/current_mode.txt
    • Turn of hibernation
      sudo pmset -a hibernatemode 0
    • Delete the file
      sudo rm /private/var/vm/sleepimage
    • Don’t forget to restore the hibernation mode after you are done resizing your partition:
      sudo pmset -a hibernatemode `cat ~/current_mode.txt`
  • Now boot from your Leopard DVD
  • After selecting the language wait for the menu bar to show up and under Utilities pick the Disk Utility.
  • Click on your disk on the left, and click on Partition in the header of the main area of the window.
  • Now you can resize the partitions, add new partitions, etc.
  • Click Apply, wait for it to finish, and reboot the system.

Surprisingly hard - I think Apple could have solved this one better…

Thanks for visiting!
I hope this was helpful - if not, please leave a comment and let me know why! Were you searching for something else? Did I miss an important aspect?

1 Comment so far

  1. [...] like Disk Utility has even more issues than the partition resize bug that I already talked [...]

Leave a reply

FireStats icon Powered by FireStats