Repartitioning UbuntuPosted by Hodge on Feb 22, 2008 in Technology, Ubuntu • No comments •
A couple of weeks ago, I decided to shrink my windozzze partition, and give the extra space to Ubuntu. I’ve been using Linux on and off for some years now, so I have a bunch of commands and methods stored away in my memory, and as such, I remembered that I probably wouldn’t be able to repartition my drive while in Linux, and while one of the partitions (i.e. my root partition) was mounted – and, of course, if I unmounted my root partition, I wouldn’t be able to use any applications located there to execute the repartition… Minor dilemma.Thankfully, Ubuntu has a LiveCD, which, as well as being the installation CD, also has the OS loaded so it can be booted and tested without even installing it on the computer! Handy, eh?
So, I booted into the LiveCD and once it had loaded, was able to run the Partition Editor (System -> Administration -> Partition Editor) application. From here, I switched the Swap off (I was also about to install 2Gb RAM, and thus wanted to shrink my Swap file from 2Gb to 1Gb), resized my Windozzze, Swap and Ubuntu root / partition, and made a cup of tea (milk, no sugar – I’m English, you see).
I finished my brew around the same time Ubuntu finished its little task of repartitioning (I like to drink my tea slowly), and rebooted the system (without the LiveCD), and everything seemed to work well – I had a larger Linux partition, a smaller Windozzze partition, and a smaller Swap file… fantastic – no errors, and no data loss! Then I started running applications – the RAM filled up, and the computer ground to a halt… So, the Swap wasn’t working after all. Bugger.
revealed that the Swap is supposed to automount at boot time, so something was obviously amiss, since the Swap clearly wasn’t mounted! I ran
(my Swap partition), and found the problem – the UUID for the partition was different, doh! Changed the UUID for /dev/hda6 in fstab
gksu gedit /etc/fstab
saved, rebooted, and all the lights came on.