...
Warning |
---|
Skipping versions is not advised as it may cause damage to your system. |
In an Enterprise environment, you may even want to build a new replacement server with a fresh install of the most up to date Ubuntu LTS release and do a cut over.
Determine Version
Before you start you should determine the kernel and release you are currently running. It is helpful to write this information down before starting your release upgrade. Here are the commands with sample data,
Code Block | ||
---|---|---|
| ||
uname -a # determine kernal version Linux myrakrypton 2.6.32.9-rscloud #6 SMP Thu Mar 11 14:32:05 UTC 2010 x86_64 GNU/Linux lsb_release -a # determine release number No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 9.10 Release: 9.10 Codename: karmic |
...
Info |
---|
A comprehensive and updated table of Ubuntu releases is on the Wikipedia. |
Prepare for the Upgrade
First backup your system and data. If you are happen to be using visualization take a snapshot. Whatever your backup method is, make sure the restore works.
...
Code Block | ||
---|---|---|
| ||
sudo apt-get update
sudo apt-get dist-upgrade |
Finally stop as many services as possible especially those not managed by Ubuntu.
As a precaution we also stop even services managed by Ubuntu. Examples include web server deaemons (Apache, nginx, etc), database servers (PostgreSQL, MySQL, etc), and any other non-critical important services.
Perform the Upgrade
It is preferable to upgrade from the console. Even in the case of cloud or virtual computing try to get to a console. Most cloud and virtual systems provide a back door console access via the web browser.
Warning |
---|
Again, if your system is running real applications and stable make sure you can backup and restore your system before going further. |
...
Code Block | ||
---|---|---|
| ||
sudo apt-get install update-manager-core |
Edit View /etc/update-manager/release-upgrades and set ensure Prompt=normal;,
Code Block | ||
---|---|---|
| ||
sudo ne /etc/update-manager/release-upgrades |
...
After the upgrade it will request to restart the system.
Verify the Upgrade
Verify that the version you are running has changed,
Code Block |
---|
uname -a Linux myra 2.6.32.9-rscloud #6 SMP Thu Mar 11 14:32:05 UTC 2010 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.2 LTS Release: 10.04 Codename: lucid |
Change Release Upgrade Back to LTS
Provided you are happy with the version you are on, you may want to edit the etc/update-manager/release-upgrades and set Prompt=lts or whatever you were using before,
Code Block | ||
---|---|---|
| ||
sudo ne /etc/update-manager/release-upgrades |
Out of Disk Space for /boot
Especailly with a GUI version of Ubuntu you may run out of disk space on in your /boot partition. This is likely due to old images. To clear up.
First check your kernel version, so you won't delete the in-use kernel image,
Code Block | ||
---|---|---|
| ||
uname -r |
Now run this command for a list of installed kernels,
Code Block | ||
---|---|---|
| ||
dpkg --list 'linux-image*' |
Delete the kernels you don't want/need anymore by running this,
I'm not sure we need this given the subsequent command... look into this more.
Code Block | ||
---|---|---|
| ||
dpkg --list 'linux-image*'sudo apt-get remove linux-image-VERSION |
Replace VERSION with the version of the kernel you want to remove. When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore,
Code Block | ||
---|---|---|
| ||
sudo apt-get autoremove
sudo apt autoremove |
And finally you can run this to update grub kernel list,
Code Block | ||
---|---|---|
| ||
sudo update-grub |