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.

About these ads

14 thoughts on “Upgrading to Ubuntu 12.04 – The way I did it.

  1. Pingback: Recovering Grub after installing Windows, using Ubuntu. « A 'psycho' path.

  2. I did exactly as you said (see below) and all my packages were removed, my system stripped, and system locked up. Hit my reset button and the system would not boot up again. This ruined me. Good thing I had a True Image back up that I restored. I don’t want 12.04. When they stop supporting 11.04 I will just go back to Windows. I love my classic Gnome and with out it I don’t want Linux. Ubuntu execs are stupid.

    sudo dpkg –get-selections “*” > pack_file
    sudo apt-get update
    sudo dpkg –set-selections < pack_file
    sudo apt-get -u dselect-upgrade

    • The whole point of doing it this way was to not mess with your stable. If 11.04 was your stable, and if doing this screwed your new 12.04 installation, then you still have your stable 11.04. 12.04 does have a lot of problems while being installed as you can see from the askubuntu site.

      But I’m curious so as to how what you did “removed all your packages”. There is nothing in those commands to “remove” packages. Also, what packages are you referring in a new 12.04 installation?

  3. LinuxMint is a Ubuntu-fork with a fresh look. The MATE version is like Gnome (uses a lot of Gnome) and you can put a windows-like startmenu in the menu bar (Principal Menu Applet).
    I like it a lot!!!

  4. Thanks for the dpkg tip! I also dreaded Unity after switching from Windows to Ubuntu and Fedora Linux (both Gnome and KDE) in 2007. However, you can still install Synaptic on 12.04, and it definitely does take a minute to get used to the new desktop–but you adapt. If you like Windows better than Unity, you can install the Kubuntu desktop on top of Ubuntu and then have the option of Unity or KDE at login. I triple boot my main laptop so I have all three choices at the GRUB menu!

    • I actually have not used Windows much. From the day I got a PC at home, I had Ubuntu on it. I believe it was 7.10. However, since I had used Gnome classic from then on, I really did not feel comfortable with the Unity interface. That is why I ditched it.

      I’ve given KDE a shot too. I was not impressed that much with. True, I’ve only tried it for 1 or 2 hours!

      Glad that you found the tip useful.

  5. Haris, this is a billiant post. I fresh installed from 10.04 to 12.04 and used your method to get my favorite apps back. Keep up the great posts.

    Peter

  6. I am a Linux newbie who has tried to update from Ubuntu 10.04 LTS (used for 3 years) to 12.04 LTS on my Dell desktop using update manager, thought all was working well, even though my HD partition desktop is small (just 20gb) and commentary stated short disk space. I am now faced with the sole grub prompt and have used your advice to proceed but am stuck, from set root using any of the disk partitions (hd0), (hd0,3), (hd0,2) and (hd0,1) I can´t seem to proceed whatever I try, not sure where kernel is or get an error. Could you please advise? It´s my main computer I am worried I won´t be able to access my data. Can I try to go back to 10.04 or boot from USB?

    • Sorry for being a bit late with the reply.

      Your data will be safe if you have used only the update manager to upgrade. To access your data, you’ll have to boot into your machine using a Live USB and back your data up. ALWAYS back up your data before doing an OS upgrade or re-installation. The approach that I have mentioned in my post is an 80% fail proof plan, but without actually backing up data explicitly.

Hey! What do you think? Share your thoughts. :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s