Search site

Add to Google

Featured Articles
Upgrade details from Ubuntu 7.04 to 8.04 back
Previous article: From Feisty to Hardy in one pass view

Hardy-heron-logo-01

Detailed here are the steps I took in order to update my laptops running Ubuntu 7.04 Feisty Fawn directly into 8.04 Hardy Heron using the distribution CD, without having to go through the incremental steps of upgrading to intermediate versions. This process is not described in the Ubuntu documentations, nor is it even recommended by Canonical. I did this because:

  • I did not want to lose the customisation and personalisation already done on the machines
  • the install program that comes with the Ubuntu 8.04 CD has a faulty partition manager which refuses to recognise the existing partitions
  • I have more than one machine to update, so using the CD is much quicker than via the internet

Disclaimer

  1. I am not saying what I did will work for you. I am simply saying what I did worked for me. It is by no means the formula you should follow and if it does not work for you, send me an email to see if I can help, but I am in no way responsible for your plight
  2. Although I am no expert, I have been doing this for a long time. I built my own servers and I write software for a living. I am not saying it matters much when it comes to upgrading a machine, but still, it gives me a good frame of mind and some valuable, hard earned experience to cope with any disaster the process might throw at me. If you have not done this before ever, think twice, or thrice before jumping into it
  3. Back up everything you consider valuable or you can not ever afford to lose. Better still, go into this venture with the expectation that you will lose everything on the machine you are upgrading. That way, whatever the outcome, you will have gained. Even when it all goes pear shaped, you would still have acquired the knowledge of how not to do it next time
  4. I performed the upgrade on various Thinkpad X30 and X31 laptops, so if your hardware closely resembles those, you will have a much better chance of success. Do as much research as possible to ensure your hardware is supported by the version of Ubuntu you intend to upgrade to
  5. It is recommended in Ubuntu literature that you install from the CD or upgrade your machine using the official incremental upgrade path. This ensures any incompatible packages are brought to your attention. If you follow my all in one sledge hammer approach, be advised you might end up with an unusable machine

 

Preparation

OK, enough of this doom and gloom stuff, let's get on. The pre-requisites before you set out with this upgrade are:

  • download the alternate CD from the Ubuntu release server. This CD is different from the distribution CD in that it contains the upgrade script, and is intended for upgrade, not a fresh installation. You can find the CD images here, or change the release number in the URL to whichever release you want to use. The directory is full of iso images of various CDs, so pick the one which has the word alternate in the name, for the hardware architecture you have in your machine. For example, for a straight foward Intel X86 architecture, the file you will need is ubuntu-8.04.1-alternate-i386.iso
  • back up everything you do not want to lose on to a separate place, preferably not on the same machine you will be upgrading. The most important directory will be /home. Unlike Windows machines where all your worldly characteristics are stored in the registry, which almost certainly is the first entity to be nuked upon a rebuild. On Linux, your world is self contained in the /home directory, which is your user directory. Back this up and you can for 99% of the time teleport yourself anywhere by simply restoring your home directory on to the new machine. The other directory which defines the personality of your machine is /etc. Make sure this is backed up safely too as it will allow you to examine the changes which have been made by the upgrade script and maybe reverse them to get back any customisation you have made
  • plug in a wired ethernet cable, even if you usually use wireless internet. If you are half way through the upgrade cycle and your wireless connection dies for whatever reason (for example, driver incompatibility, or just after the kernel has been upgraded etc.), you will no longer be able to grab the packages from the internet

Upgrade steps

  1. Either fire up the System->Administration->Synaptic Package Manager and untick everything in the Settings->Repositories->Ubuntu Software (first tab) and Third Party Software (second tab), or simply edit /etc/apt/sources.list and comment out every line
    SoftSynaptic Software Source
    Synaptic will prompt you to reload the repository, which you should do
  2. Stick the alternate CD into the drive. It will pop up a prompt asking you whether you want to run the Package Manager or run the upgrade. You should tell it to run the upgrade. If this step works to the end, there is nothing left to do. Otherwise, read on
    When inserting an alternate CD
  3. Either click on the "Add CD-ROM" button in the Third Party Software (second tab) of Synaptic Manager's Settings->Repositories, or run the command sudo apt-cdrom add on the command line. Once you have done this, you will notice the CD entry has been added to your /etc/apt/sources.list file at the end. This means all updates will source your new packages from the CD instead of the internet from now on (although be advised the Update Manager still needs to go to the Internet to get the list of updates)
  4. Fire up the Update Manager under System->Administration. It will ask whether you want to perform a partial upgrade.
    Partial Upgrade prompt
    Select this option and it will tell you the summary of the packages it will remove, add, or update. Once you confirm by clicking on the OK button, it  will go on its merry way.
    It trundle along with your CD clattering for a long time. You will need to expand the Details section on the upgrade popup.
    This is because as part of the upgrade, you will be prompted to answer a few questions. Check out the changes it wants to make to your system and click on OK if you are happy.
    As I have backed up /etc directory, I simply let it replace whatever. Amazingly, it seems to leave most of my changes intact instead of zapping them outright (seems like the Update script performs a merge instead of overwrite). Also, there is a section where it updates the pam mechanism (to do with your password encryption, I believe), it will stop and waits for you to hit Enter before carrying on. You will have to do so at this point or you won't go any further.
    The amazing thing is most changes take effect there and then without the need for a restart (unlike another operating system I do not care to mention), so you will see the icons etc. in your system tray changing as you go along. Services which are updated will simply be restarted
  5. Unsurprisingly, the packages which are dependent on the new kernel will fail to update. You will get a few error prompts. Just click OK for it to carry on. You will be prompted to restart once this first cycle of update is finished. This is when things which are likely to go wrong will do so (like the wireless networking stops working, for instance. This is the reason why you should use wired ethernet, as it is much more likely to work). Once you are rebooted,  up and running, chances are if you log in, the screen will just hang. This is because your desktop would have failed to be updated due to the dependency on the new packages. Don't panic. You can install the desktop from the command line. When you get the graphical login prompt, do not log in. Instead, press Ctrl+Alt+F1. This should bring you to the command line login prompt. You should then log in and run sudo apt-get install ubuntu-desktop, which will then install the desktop. Once this is done, log out by typing exit. You should then press Ctrl+Alt+F7, which should bring you back to the nice graphical login prompt, where you can log in to the new Ubuntu desktop. The Update Manager will tell you now that there are updates pending. Do not start it up yet.
  6. Fire up Synaptic Manager and tick the first four selections in the Ubuntu Software (first tab) of Settings->Repositories, at the same time un-ticking the CD, or manually edit /etc/apt/sources.list to comment out the CD entry and add the following lines:

    deb http://archive.ubuntu.com/ubuntu/ hardy universe main restricted multiverse
    deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe main restricted multiverse
    deb http://archive.ubuntu.com/ubuntu/ hardy-security universe main restricted multiverse
  7. Simply go to the Update Manager steps again for the Partial Update. The packages will be grabbed from the internet this time round to superceed those installed from your CD. You might need to do this until the Update Manager reports that your system is fully up to date. You might even have to reboot again to pick up the new kernel
  8. fix any package which do not work by running sudo apt-get install package_name once you have rebooted again. I had to update smbfs and nautilus on one of the laptops, but not others.
That's it. After a few iterations, with each picking up less and less new packages, you will ultimately reboot into a new version of Ubuntu with no partial update left. And voilà, c'est fini! You have a machine with the chosen version of Ubuntu.

Update 24th December 2008: One other problem I found on one of my laptops (although not the others) is that once upgraded, my Desktop became blank i.e. no icons, no right click menu on the mouse, nothing. It seems this is a problem with the Nautilus desktop which somehow causes the contents of your Desktop to be invalid. There seems to be a bug with Hardy and Nautilus, which might be resolved in a future update. Currently, the work-around is to go into the GNOME configuration editor (type sudo gconf-editor in a terminal), then tick the flag /apps/nautilus/preferences/desktop_is_home_dir. This should cause all the icons on your Desktop to appear immediately. After that, you should run a command killall nautilus to reload nautilus, then untick this flag. The icons will remain on your Desktop and seems to remain there even after reboots.

Update 26th December 2008: I had a little problem with 8.04 Ubuntu running on the Thinkpad X30's, in that it ocassionally hangs. A bit of research gave me the needed fix. You need to modify the /boot/grub/menu.list file and add the options highres=off nohz=off irqpoll to your kernel boot option entry i.e.

sudo gedit /boot/grub/menu.lst (you will need to enter your password here and you need admin privileges)

Edit the line starting with # kopt=root=UUID... to add the above strings at the end so that they look like

# kopt=root=UUID=[your HD UUID here] ... highres=off nohz=off irqpoll

Then do sudo update-grub and reboot. This should hopefully fix the hang problem on the Thinkpad X30 running Ubuntu 8.04

back
Previous article: From Feisty to Hardy in one pass view

discuss
 by by David at 22 Dec 2008 22:38:20
Copyrights © Transcraft Trading Limited 2006.All rights reserved. Bots Rss-rss