We shall upgrade Ubuntu 10.04 with Gnome 2 desktop to 14.04 (also an LTS or Long Term Support release), but the 14.04 will use the Mate desktop, which looks like the traditional Gnome 2 (since Mate is a fork of Gnome 2) instead of the Unity desktop.
The command "do-release-upgrade
" will be the method, with some PPAs (Personal Package Archives) 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 is via ssh through a VPN which auto-connects back to this host.
We will test this in a VM under KVM.
Read Part 1 to get started.
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.
Our kernel to start with is:
And our free space situation on relevant drives is thus:
So, let us first create a VM with a fresh Ubuntu 10.04, 32-bit version:
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:
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:
... by quite a bit. So, I will consume some of it with a Very Large File:
# 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):
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):
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:
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:
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:
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.
Finally, here's the free space post do-release-upgrade
from 10.04 to 12.04 - it appears unchanged!
This article has gotten longer than I anticipated, so the next do-release-upgrade
will be a separate page.
In the first part of this guide, we upgraded from Ubuntu 10.04 to Ubuntu 12.04 in a KVM virtual machine (VM).
There were 4.6 GB free space on / (root) partition when we started, and after do-release-upgrade
had finished, we had:
So, 2.9 GB free. Since running out of space would be less than desirable, we'll free some from apt's cache:
Now we have 3.4 GB free space - that should be acceptable. LibreOffice could be uninstalled prior to running another do-release-upgrade
if there's a concern about requiring more space still, but I don't think it's necessary - so let's risk proceding as is.
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.
If you run a firewall, you may need to temporarily open this port. As this is potentially dangerous it's not done automatically. You can open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'
To continue please press [ENTER]
Once again, we're doing this through SSH because the eventual "production" target is best accessed that way, because it's more convenient, because that's how remote machines are administered.
If you're doing this at home, you won't need SSH.
Regardless, the process asks another question:
Do you want to start the upgrade?
58 packages are going to be removed. 699 new packages are going to be installed. 1567 packages are going to be upgraded.
You have to download a total of 940 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
Supper and beverage time while things proceed...
Approximately 3 hours later we're prompted with this:
Remove obsolete packages?
191 packages are going to be removed.
Removing the packages can take several hours.
Continue [yN] Details [d]y
And... a few minutes later, it seems we're up to Ubuntu 14.04:
Continue [yN] y
Broadcast message from root@mom-desktop
(/dev/pts/1) at 2:16 ...
The system is going down for reboot NOW!
=== Command detached from window (Tue May 5 02:16:45 2015) ===
=== Command terminated normally (Tue May 5 02:16:45 2015) ===
Connection to 192.168.122.117 closed by remote host.
Connection to 192.168.122.117 closed.
After the system reboots:
* Documentation: https://help.ubuntu.com/
Yay, the upgrade was successful. Except now we have Unity as a desktop. And our free disk space is not good, with 1.3 GB free:
Better: 2.2 GB free space is acceptable considering we started with 4.5 GB and haven't cleaned out anything unneeded.
In the next step, we'll finally install Mate desktop.
Our upgrade process is almost complete - the time-consuming steps of running do-release-upgrade
twice was performed in previous steps (Step 1 and Step 2.
For this final step, we install the Mate desktop to replace Unity.
First things first: this test is running in a virtual machine (VM) instead of on real hardware. And advantage is that we can take a snapshot of the state of the VM so that if things go wrong, we can revert.
Okay, snapshot / backup made, here's what we're starting with:
* Documentation: https://help.ubuntu.com/
$ uname -a
Linux mom-desktop 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:11:46 UTC 2015 i686 athlon i686 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 11G 2.2G 84% /
Ready to start. The Mate Desktop Wiki is our guide - they probably explain things better than I do. And a giant thank-you to Martin Wimpress for his development work and his guest spots on the following podcasts: Linux Luddites, MintCast, LAS Unplugged.
Let's add the repositories (repos) with the following two commands:
Packages living here are either required to build the Ubuntu MATE .iso mages or provide the meta packages.
More info: https://launchpad.net/~ubuntu-mate-dev/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpqt8oerjp/secring.gpg' created
gpg: keyring `/tmp/tmpqt8oerjp/pubring.gpg' created
gpg: requesting key 162506E7 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpqt8oerjp/trustdb.gpg: trustdb created
gpg: key 162506E7: public key "Launchpad PPA for Ubuntu MATE Remix Developers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
One done, one to go:
In order to correctly install and configure MATE 1.8.1 on Ubuntu Trusty you will also need to add the following PPA:
* ppa:ubuntu-mate-dev/ppa
We've already done that command recommended in the last line above!
Again, we've already run the first command, and we're running that second command right now. (Odd that the output of a command is to... run that command. Huh.)
To continue with the output of the last command:
gpg: keyring `/tmp/tmpdh4otxcu/secring.gpg' created
gpg: keyring `/tmp/tmpdh4otxcu/pubring.gpg' created
gpg: requesting key 162506E7 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpdh4otxcu/trustdb.gpg: trustdb created
gpg: key 162506E7: public key "Launchpad PPA for Ubuntu MATE Remix Developers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
As per the advice above, an update of the repo cache and an upgrade of the software is recommended next; we'll do that momentarily with sudo apt-get update ; sudo apt-get upgrade
.
Finally, do we want a vanilla Mate desktop, or an Ubuntu-branded one?
From the Mate Wiki again:
Ubuntu MATE is a more comprehensive option that offers a slightly tweaked layout, configuration, and themes to integrate into Ubuntu in a more seamless fashion. This will install the complete MATE Desktop Environment as well as LightDM and numerous other applications to provide a full and well rounded desktop.
The output from the last command above gives instruction to install the Ubuntu version via sudo apt-get install --no-install-recommends ubuntu-mate-core ubuntu-mate-desktop
.
I think it best to choose the Ubuntu Mate version as recommended.
Once it's been screen-shot-captured, perhaps I'll roll-back the VM snapshot and install the Vanilla Version to screen shot it too, for comparison.
So, per last output pasted above, as always, running as root (saves us tying "sudo" a bunch of times, and providing passwords frequently) :
(gconftool-2:4963): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Uh-oh, looks like running via SSH caused a minor problem, but I doubt it's a game-stopper.
That took a rather long time, but at the end:
We can clean some stuff up:
Really, we want to clean out Unity to save a bunch of space.
After a restart:
But there's more Unity cruft sitting around, so try to get rid of all of it:
I cut the packaage list out from above (all 96 of them).
Rebooting brought up a warning about corrupted graphics:
I chose to run in reduced graphics mode and got the nice Mate login screen: