How to upgrade from older Ubuntu versions to 14.04 smoothly and safely


Back to the home page


Every six months, a new version of Ubuntu becomes available. If you've already got Ubuntu 12.04 Precise Pangolin on your computer and you want to upgrade to Ubuntu 14.04 Trusty Tahr, this is probably the best way to do it.

This how-to is not designed for a re-installation of the same version. For that, look here.


Is it wise to upgrade at all?

1. Ubuntu 12.04 is an LTS version and therefore of the highest quality, like 14.04 LTS.

Ubuntu 12.04 LTS is still supported until April, 2017. So if you're running 12.04 LTS, it's wise to consider if you really want to upgrade at all, yet.... After all, you can afford to wait for some years.

Avoid the upgrade button!

2. When a new Ubuntu version is made available, an upgrade button appears in Update Manager (for LTS versions like 14.04 this happens only when a new LTS version has become available). Don't use this button: it's only seemingly easier.

With a clean installation, with previous formatting of the target partition, you have the least chance of troubles afterwards. This old wisdom is valid for every operating system under the sun.....

This is partly due to the configuration files that exist in the old version. They sometimes cause complications in the new version.

Besides, a clean installation is usually a lot quicker than an upgrade.

Warning: unreliable upgrade method on new Ubuntu DVD

3. The "clean" upgrade method that's being offered by the installer on the DVD of the new Ubuntu, is dangerous. Do not use it, because that particular method is unreliable: it may erase not only the old Ubuntu but all other operating systems (Windows, other Linux distributions, ...) and data partitions on your hard drive as well.

This unreliable method might do this in spite of the fact that it promises to erase only the old Ubuntu.... It happened to me once, and that was no joyful discovery.

Below you see a screenshot of the dialog window in the installer that offers that dangerous method. I've drawn a black cross through the dangerous method (the second option). Click on the picture to enlarge it:


The third option wipes everything else as well, of course, but at least it's honest about it. No nasty surprises there....

So now on to the method that is safe.

Optimal situation (most common): no separate home partition

4. By default, the Ubuntu installer doesn't create a separate home partition. Which is good, because I advise against creating a separate home partition.

Among other things, it makes upgrading more simple. Proceed as follows:

Save your important files

4.1. You will probably want to save a few things from the old installation. For this, keep a USB memory stick or an external USB hard drive at hand.

a. Save your documents, pictures and music (duh).

b. Save your bookmarks.

The easiest way to save your Firefox bookmarks is from within Firefox itself: 

Bookmark button - down below: Show All Bookmarks - change "Import and Backup" to "Export...."

Copy the exported .json file  to your USB memory stick. After you've installed the new Ubuntu, you can use the Import function in Firefox to, well, import your old bookmarks.

c. Save e-mails and some application settings.

First, make the hidden files visible.

Ubuntu 12.04:
Click in the Ubuntu sidebar on the icon of your home folder.

Use the shortcut (key combination) Ctrl h to make the hidden files visible, or do it like this:

In the task bar of the file manager: View - check: Show hidden files

Now close the file manager and open it again.

Now you can see the hidden files and folders (with a dot before the name, such as .mplayer). They contain application settings.

Some of those you'll want to keep. For example: if you use Thunderbird as an e-mail program, then the e-mails are in the hidden directory .thunderbird (as well as the account settings of Thunderbird and the address book).

If you want to save your e-mails and settings, copy this directory to the USB memory stick.

Same goes for other specific application settings that you want to keep.

The rest is easy

4.2. The next things to do are easy.

a. Boot your computer from the new Ubuntu DVD and start GParted:
Click on the grey Ubuntu logo (Dash home). Query: Gparted.
Click on Gparted Partition Editor.

Then use this fine disk partitioner, to completely destroy the Ubuntu partitions. Including the swap partition.

All actions you do in Gparted have to be confirmed by a click on the Apply button in the panel (the green tick V), before they are being executed. An extra security measure, no doubt....

Note: don't format the Ubuntu partitions, just destroy them. The result will be "unallocated free space". Have a separate home partition? Destroy it as well (good riddance...).

Note: the swap partition needs to be unmounted before you can destroy it. In Gparted, you can do that as follows: click with the mouse on the swap partition, then right-click with the mouse, and choose Swapoff.


(continued in the column on the right)

This website is being sponsored by Google Ads.

Are you using an ad blocker? Then you're also blocking my earnings from advertisements....

If you wish to support my website, you can configure your ad blocker to make an exception for this website.

Thanks in advance....


b. Reboot your computer. Don't remove the Ubuntu DVD.

c. Let the DVD check itself for errors: in the beginning, hit the space bar and choose "Check disc for defects" in the DVD boot menu.

d. When no errors are found, boot your computer from the DVD again and choose "Try Ubuntu".

e. Establish internet connection and start the installation by clicking the desktop icon of the installer.

During its course, the installer will use the unallocated space automatically, without notification, when you select the "alongside" option for the preservation of your existing Windows. Which is exactly what you want.

So: after you've agreed to its proposal, the installer takes automatically care of the rest!

However, should you feel so inclined, you can also do a manual partitioning.

Separate home partition (less common)

5. I advise against creating a separate home partition.

However, if you already have a separate home partition, and want to keep it, this is a safe and easy way to upgrade to a new Ubuntu. Proceed as follows:

Backup your important files

5.1. Create a backup.

a. Boot the old Ubuntu version for the last time and backup your documents (duh) and your Firefox bookmarks.

The easiest way to save your Firefox bookmarks is from within Firefox itself: Bookmark button - down below: Show All Bookmarks - change "Import and Backup" to "Export...."

Copy the .json file to your USB memory stick. After you've installed the new Ubuntu, you can use the Import function in Firefox to, well, import your old bookmarks.

b. Boot your computer from the new Ubuntu DVD and choose "Try Ubuntu without installing".

c. Mount the home partition: click on the icon of your Home folder in the side panel. Click on the home partition of the hard disk.

d. Then open file manager Nautilus with root authority:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type:

sudo nautilus

press Enter

e. File manager (Nautilus) toolbar: View - tick "Show Hidden Files". In all user accounts on the home partition, delete all hidden files and directories with configurations (all directories and files that start with a dot, such as .mozilla and .mplayer).

Exception: if you use Thunderbird as an e-mail program, then the e-mails and account settings are in the hidden directory .mozilla-thunderbird. If you want to save your e-mails, copy this directory to the USB memory stick.

f. Reboot anew from the DVD and let it check itself for errors.

g. When no errors are found, boot your computer from the new Ubuntu DVD and choose "Try Ubuntu without installing".

h. Establish internet connection and start the installation by clicking the desktop icon of the installer.

Install the new Ubuntu

5.2. During installation, the best choice is now manual partitioning. Ubuntu itself will be placed on the root partition: give it the mount point "/" (without the quotation marks). It should be reformatted, so make sure that the format box is ticked.

If you have an existing separate home partition, then give that the mount point "/home" (without the quotation marks). Normally you won't want to reformat it: so don't tick the format box.

The existing swap partition will automatically be mounted as Linux-swap. No action needed.

See this page with screenshots.

Complete your new Ubuntu

6. Done? Now finish your shiny new Ubuntu installation with some polishing (10 things to do).

To the content of this website applies a Creative Commons license.


Comments