https://help.ubuntu.com/community/LucidUpgrades
Network Upgrade for Ubuntu Servers (Recommended)
1.
Ensure you're up to date with latest release:
sudo apt-get update
sudo apt-get upgrade
2.
Install update-manager-core if it is not already installed:
sudo apt-get install update-manager-core
3.
edit /etc/update-manager/release-upgrades and set Prompt=lts
Note: The minumum contents of /etc/update-manager/release-upgrades should be
[DEFAULT]
Prompt=lts
1.
Launch the upgrade tool:
sudo do-release-upgrade
2. Follow the on-screen instructions.
3.
At the end of the upgrade process you will be required to restart the server in order to boot into the new kernel. If you do not have access to the console of the system you are upgrading, you may need to edit /boot/grub/menu.lst and change the default boot kernel to the newly installed 10.04 kernel. If this step is not performed your server may attempt to boot into the 8.04 LTS kernel and will hang.