Resize OS X ‘volume’ (partition)

I like open source software but I do use other software too. I know, I know, I’m an heretic. *Feels the shame.*

I have a MacBook and I’ve had it dual booting OS X and Ubuntu (and other Linux flavours) which can usually be achieved quite easily with BootCamp, rEFIt and an Ubuntu Desktop LiveCD. But what happens if you decide you want to just run OS X again and want to expand the OS X partition to recover ‘free’ space?

Taking a hypothetical example where you have the EFI partition, an OS X partition, a swap partition and a Linux partition of whatever sizes, if you try to open up BootCamp to expand the OS X partition it will give you some error message about the drive not being one large HFS+ partition and so it can’t be repartitioned in BootCamp. I think this is pretty shabby, but it’s ‘new’ software so I looked around for solutions and tried a bit of hit and miss myself.

You’re supposed to be able to use diskutil’s resizeVolume operation to do what BootCamp does, but regardless of whether I had deleted the swap and Linux partitions, I could not get it to resize the OS X volume. It repeatedly gave me an error message stating: Resizing encountered error No space left on device (28) on disk disk0s2 (‘disk0s2′ being the OS X style partition identifier for my OS X partition that I was trying to resize.)

So, I searched for articles about this error and didn’t find much on the web. I played around a bit myself and I found something that allowed BootCamp to allow me to resize the OS X partition. I booted an Ubuntu 7.04 Desktop LiveCD and used the parted front end to create an unformatted partition in the ‘free space’. I rebooted into OS X after doing this and tried to run BootCamp and it worked just fine.

I hope this information is useful to some other people. If you have suggestions for key words to use in this article to make it easier to find, please e-mail me. I figured quoting the resizeVolume error I obtained would help a number of people get here.

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.