Upgrading Ubuntu Step 1: 10.04 to Ubuntu 12.04

For this project, the goal is to update a remote Ubuntu 10.04 system running good ol' Gnome 2.x (of course) to Ubuntu 14.04 with Mate desktop (a fork of Gnome 2.x) instead of Unity.

The command "do-release-upgrade" will be the method, with some PPAs added at the end to bring in the Mate desktop on to the system.

A slight complication is that there are limitations on the free space on the root partition.

Further more, the host is about 5,000 km away and owned by someone without technical experience or much sysadmin ability to fix anything that goes wrong.

All access on the eventual target will be via ssh through a VPN which auto-connects back to this host, so we'll do this work via ssh to the VM.

We will test this in a VM under KVM.

Our kernel to start with is:

Linux mom-desktop 2.6.32-73-generic #141-Ubuntu SMP Tue Mar 10 17:15:40 UTC 2015 i686 GNU/Linux

And our free space situation on relevant drives is thus:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 13G 7.8G 4.5G 64% /
/home/mom/.Private 7.7G 4.6G 2.7G 63% /home/mom

So, let us first create a VM with a fresh Ubuntu 10.04, 32-bit version:

# virt-install --name="UbuntuMate" --description="do-release-upgrade'ing 10.04 to 14.04 with Mate" --cdrom=/mnt/data/comm/download/Linux/Ubuntu/ubuntu-10.04.3-desktop-i386.iso --disk="/mnt/data/temp/kvm-pools/ubuntu-mate.qcow2",format=qcow2,size=20,sparse=true --hvm --graphics=vnc --ram=4096 --vcpus=2,maxvcpus=4

 

Starting install...
Allocating 'ubuntu-mate.qcow2' | 20 GB 00:00
Creating domain... | 0 B 00:01
No protocol specified

** (virt-viewer:1052): WARNING **: Could not open X display
No protocol specified
Unable to init server: Could not connect: Connection refused
Cannot open display:
Run 'virt-viewer --help' to see a full list of available command line options
Domain installation still in progress. You can reconnect to the console to complete the installation process.

Oh dear, no graphical interface opened. Because running as root? Not seen this before.

However, our new Ubuntu VM is running:

# virsh list --all
Id Name State
----------------------------------------------------
2 UbuntuMate running

And using virt-manager, we see our Ubuntu VM has booted and is ready to begin installing:

Ubuntu-10.04-installing.png

The installation process completed; strictly a default setup with separate / and /home partitions and openssh-server for remote access from the host machine.

We're ready to begin the testing.

First thing, one will notice under the "Avail" column that the VM has more free disk space on / than the real target computer:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 2.3G 11G 18% /

... by quite a bit. So, I will consume some of it with a Very Large File:

# dd if=/dev/zero of=/delete.me bs=1M count=6500
6500+0 records in
6500+0 records out
6815744000 bytes (6.8 GB) copied, 242.576 s, 28.1 MB/s

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 8.7G 4.5G 67% /

That should work for our purposes -- testing complexity of process and if target computer has sufficient space.

In a terminal window connected via ssh (for easier copying & pasting, plus the terminal has 4 tabs already being used, so less window switching):

# do-release-upgrade
Reading cache
Checking package manager
Continue running under SSH?

This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover.

If you continue, an additional ssh daemon will be started at port '1022'.
Do you want to continue?

Continue [yN] y

Starting additional sshd

To make recovery in case of failure easier, an additional sshd will be started on port '1022'. If anything goes wrong with the running ssh, you can still connect to the additional one.

To continue please press [ENTER]

And... meet you back here in an hour or so - it's a slow process.

While you were gone, this informational prompt came up, I'll show you what it said so there will be no surprises (and to show off to Windows users the type of help one can expect from the system as opposed to "Error 43927489XKQ8B: Things is b0rked, good luck" that they're sadly used to):

Fetched 20.4 MB in 6s (576 kB/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Calculating the changes
Calculating the changes

Do you want to start the upgrade?

32 installed packages are no longer supported by Canonical. You can still get support from the community.

44 packages are going to be removed. 679 new packages are going to be installed. 1123 packages are going to be upgraded.

You have to download a total of 896 M. This download will take about 24 minutes with your connection.

Installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled.

Continue [yN] Details [d]y

 

Well, it's "tomorrow" now. I've been waiting for the computer, it's been waiting for me. I got to sleep, it's kept busy 24/7.

But we're getting close. I've taken a couple screen captures of libc6 and grub config screens and now it's asking this:

update-initramfs: Generating /boot/initrd.img-3.2.0-80-generic-pae

Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Remove obsolete packages?

120 packages are going to be removed.

Removing the packages can take several hours.

Continue [yN] Details [d] y

The process continues...

The process finishes:

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y
Broadcast message from root@mom-desktop
(/dev/pts/2) at 16:03 ...

The system is going down for reboot NOW!
=== Command detached from window (Wed Apr 29 16:03:04 2015) ===
=== Command terminated normally (Wed Apr 29 16:03:04 2015) ===Connection to 192.168.122.117 closed by remote host.
Connection to 192.168.122.117 closed.

 

Done:

$ uname -a
Linux mom-desktop 3.2.0-80-generic-pae #116-Ubuntu SMP Mon Mar 23 17:29:27 UTC 2015 i686 athlon i386 GNU/Linux
mom@mom-desktop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"


Oddly, in the desktop screenshot below, it appears at first glance that the system is running 14.04 already. This is not correct however - it's prompting us to upgrade to 14.04 Trusty Tahr.

Ubuntu-10.04-to-12.04-done.png

Finally, here's the free space post do-release-upgrade from 10.04 to 12.04 - it appears unchanged!

root@betty-desktop:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 8.7G 4.5G 67% /


This article has gotten longer than I anticipated, so the next do-release-upgrade will be a separate page.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.