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…

9 Comments so far

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

  2. Kasey on August 30th, 2008

    Thank you for posting this!!! I couldn’t figure out why I kept getting out of space errors when trying to resize my Leopard partition. Now I know why.

  3. ms995 on February 3rd, 2009

    This article was quite useful to me. However, the last pmset command should be

    sudo pmset -a `cat ~/current_mode.txt`

    The file current_mode.txt already has “hibernatemode “

  4. Moh on July 18th, 2009

    thank’s so much for this posting.
    really useful.

  5. Alex Carter on July 24th, 2009

    Unfortunately doesn’t work for me – even if I boot from the DVD it doesn’t allow me to resize. May be there is something else to do before resizing?

  6. Frustrated OSX User on December 26th, 2009

    The attempt is appreciated but this does not work. This is a known bug in Leopard and is not solvable. Quite simply put, Apple had misrepresented this feature.

    Nice try though.

  7. Robert W on February 8th, 2010

    This worked perfectly! I had to reboot using the Leopard dvd and use the disk utility to resize there. It would not resize until I removed all files over 1GB in size. Bootcamp still wouldn’t resize either before or after. The volume had to be unmounted which is why I had to boot using the install dvd and use the disk utility. I ignored /dev and /net as well when removing and backing up the files over 1GB. I also had to change the last command to:
    sudo pmset -a `cat ~/current_mode.txt`

  8. Alan on March 13th, 2010

    New partition can be created this way however bootcamp (WIN XP) ran into a blue screen and can not boot any more. I had to put everything back(delete the newly created partition) and then Win XP is back.

  9. Alan again on March 14th, 2010

    It worked!

    After adding the new partition, the partition number for Windows is changed from 3(default) to 4.

    So the new boot.ini would be like this:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(4)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(4)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect

Leave a reply