One of the most frustrating experiences I’ve had with OS X is trying to remove a Boot Camp partition in Lion when I wanted to re-partition the drive. In my case, I needed to build a larger Boot Camp partition, and had too much free space on the system partition.
With Lion, when you attempt to change the drive partitions on the system volume from inside either Lion or the Recovery Disk (which you either buy or make), you get an error about the Disk Utility complaining that it “couldn’t unmount the volume.”
That’s what you’d expect if you booted from the system drive, but getting it when booting off of a Recovery Disk or some other partition is maddening!
The issue isn’t the system partition itself, but the Recovery Partition used by Lion. This partition masquerades as part of the OS X system partition, and therefore the system partition cannot be removed.
There is a way around it though:
First, be sure you have no data that you wish to keep on any other partition. Be EXTREMELY sure of this before going forward, and take a backup just to be safe.
Now, go back and take a backup, because I know you didn’t do it before.
After all data you want is safely off the unwanted partitions, go into Disk Utility (you can do this from a regular boot, you do not need to boot into the recovery partition).
Go to the disk that contains the unwanted partitions – it will be listed by it’s hardware name (such as 250GB Toshiba XXX HDD). Click on the unwanted partitions, and then click the minus button below the partition graphic. This will remove the unwanted partition.
After you remove all unwanted partitions, click in the lower-right corner of the system partition and drag it to fill up the empty space. The Disk Utility will extend the partition without error and give you an expanded system partition.
Note that you have to remove all partitions between the one you want removed and the system partition, you cannot resize “around” other partitions on the volume. You also cannot remove the system partition itself. You can re-install OS X to remove the existing system partition and create a new one, but you cannot simply delete it.
That’s it, now you can run the Boot Camp Assistant and re-partition the drive as you see fit.