Upgrading to Ubuntu 12.04 – The way I did it.
“Never mess with your stable” is a lesson that I have learnt and is a mantra that I hold close to my heart. Especially when you have a good choice not to mess with your stable, you simply shouldn’t mess with it. Hence, I left my 10.04 unscathed and installed my 12.04 in another partition. Here is a screen shot of my hard disk :
After installing, the first thing I did was to get rid of unity. Boy, do I hate that. I did the following to accomplish that:
sudo apt-get remove unity unity-2d
I installed Gnome by
sudo apt-get install gdm gnome-shell
I tried it and have reported a few bugs so far. You must have noticed that I have only one /home partition and I have let both my 10.04 and 12.04 mount that as their /home partitions. I wonder why nothing is getting screwed up considering a common .bashrc file being there.
Anyway, the point reached where I decided to switch entirely to 12.04 and leave 10.04 behind. But for this, I needed to have all the softwares that were there on 10.04 to be installed on my new 12.04. Even though I vaguely knew the steps of how to do this, I asked for help and got a tremendous help from http://askubuntu.com/
You can read the conversation from the site here, but I’ll be explaining the steps right now.
1. First you have to know which all packages are installed in your 10.04. For that you can do
sudo dpkg --get-selections "*" > pack_file
After running that, you will have the names of all the packages in 10.04 in the file called ‘pack_file’.
2. Transfer that file to 12.04 and run the following commands
sudo apt-get update
sudo dpkg --set-selections < pack_file
sudo apt-get -u dselect-upgrade
This will fetch all the packages as well as their dependencies and install it on your system. I had to download about 2GB of data but was at peace that my distro won’t get ruined. Maximum my “apt” and “dpkg” might suffer but then again, these two have been going through tests like these and more continuously for the last decade!
I wish this would be the end of this post. But no. I had maintained a separate partition for /var (/dev/sda11) which was only 3GB in size at first. Therefore, after downloading my 2GB files, when trying to unpack and install them, it ran out of space and my package installation quit halfway. Even though update manager popped heroically and offered me a so-called “partial upgrade”, it kept on crashing complaining that I had no space left which was, unfortunately, true.
In order to work around this problem, I did the following.
Well, I followed the obvious way of jumping back to my 10.04, launched gparted, and shrank the 12.04 root partition and allocated that space to /var. Then I came back in to 12.04 and tried this :
sudo apt-get -u dselect-upgrade
However, that told me I had messed up dpkg and I had to manually run
sudo dpkg --configure -a
in order to clean the mess up. I did so and again ran the first command which resulted in everything being installed correctly and peacefully. :)
So the world is a brighter place once again in which I’m going blaze my trail with the PrecisePangolin!
PS : For a few problems that I personally had with 12.04, visit this page.