Thursday, October 1, 2009

OS X Partition Capacity Issue

I ran into a bit of a problem with my dual boot MacBook Pro the other day. I was booted into OS X, and I was prompted by the operating system to install a bunch of system updates that had been released since I last used the OS. When I attempted to download and install them, I was informed that I did not have enough free disk space. This surprised me, as I had installed OS X onto a 20GB partition, and I had not installed any office suite or other large applications; I perform all my work when booted into Fedora, only using OS X for web browsing - checking email, online shopping, BBC iPlayer, You Tube, etc.

I checked my hard disk usage, and it only amounted to just shy of 15GB ; I would have thought this should have been plenty of space to download and extract the updates I had pending. However, as OS X didn't seem to think so, I was stuck. I'm quite concerned with IT security, so you can imagine my dismay at realising I would be unable to keep my operating system up to date!

Monolingual - A Quick Fix

A colleague of mine suggested I try Monolingual - it's an application that allows you to remove unneeded localisation data from your OS X installation, as well as any unnecessary binaries that are compiled for different architectures (Intel, PowerPC, etc.). Unfortunately, I was only able to clear a couple of hundred megabytes of data, so I was still unable to run the system update, which left me with the unenviable task of trying to increase the size of the OS X partition.

Before I continued, I ensured that I had backed up all of my important data off the laptop - messing around with partition tables can leave your machine unusable, not to mention the possibility of accidentally deleting a partition!

Partition Resizing

My next step was to boot from the OS X installation DVD, and attempt to use the Disk Utility to modify the partition table. I had a second HFS+ partition positioned directly after the OS X partition - the idea being that I could use this partition to share files between both operating systems on the disk. The Apple Disk Utility allows you to resize HFS+ partitions, however, I could not shrink the second HFS+ partition without leaving the recovered space after the partition, which then meant I would be unable to reassign it to the first HFS+ partition. This meant that I had to delete the second HFS+ partition, resize the first, and then recreate the second partition in the space remaining.
When I tried this, however, the Disk Utility simply hung while displaying the message "Preparing to delete volume"; I did actually leave it "preparing" for a good hour while I had dinner, but no progress seemed to have been made when I returned, so I cancelled the operation. As the Disk Utility seemed unable to remove the partition, I booted off the Fedora 9 installation DVD into rescue mode and used the GNU parted tool to remove the second HFS+ partition - which worked without complaints. I restarted the machine and booted off the OS X install DVD to try and resize the OS X partition with the Disk Utility, however, this hung as before; displaying the message "Preparing to resize volume".

I could have tried using GNU parted to resize the partition, but this probably wouldn't have worked, so that left me with one more option before I would have to bite the bullet and perform a complete reinstall of both operating systems: I deleted the OS partition using GNU parted, and then attempted to run through the OS X install, creating a new partition in the space available at the beginning of the disk. The Disk Utility, however, refused to create any new partitions on the disk... I was going to have to wipe the disk completely and start from scratch!

Complete Reinstall

After having made the decision to completely reinstall, it was a fairly painless process. However, I look the opportunity to install Fedora 9 instead of Fedora 8.

Once I had my laptop "fully armed and operational" again (well, at least with two operating systems installed), I checked the OS X partition to see just how much space a fresh install of OS X would consume. I was extremely surprised to find that 11GB of valuable hard disk space had been used - this is as much as a fresh install of Vista! Now admittedly, there are probably quite a lot of compatibility libraries to allow Rosetta to work, as well as binaries for the various architectures that OS X supports, but this still seems like a large amount of program data!

Anyway, the moral of this story is to ensure you leave plenty of space for OS X, should you be partitioning your hard drive before installing the operating system. This won't affect most Mac users, just those of you that either partition your disk for whatever purpose.


This article originally appeared here.