Last night I was perusing my server and was again reminded that I was running an older build of Ubuntu on it. So I decided to look into upgrading it from an ISO. I hadn’t really tried it before but since the server is a headless box, and is fairly out-of-the-way for me to do manual work on, I figured I’d give it a try.
I was surprised at how simple the procedure was. I remoted to the machine via SSH and located the path to the ISO of the next version in line, and mounted it to the CDROM mountpoint.
sudo mount /path/to/iso/file /media/cdrom -o loop
Then I took a look at apt-cdrom and found that the following command was for me:
sudo apt-cdrom -d /media/cdrom -m add
Then I used
sudo apt-get dist-upgrade
to perform the upgrade.
After the upgrade was complete, I edited the /etc/apt/sources.list file, changing the build name as needed, then performed an apt-get update
A reboot was in order here.
Final to the upgrade was to reinstall the kernel headers (sudo apt-get install linux-headers-
uname -r), remove the CDROM from the repos in /etc/apt/sources.list, and load updates (sudo apt-get dist-upgrade)
My server had a few extra bells and whistles — namely, vmware server and webmin, so I rebuilt those on my system and was up and running in a total of about 20 minutes’ work on my part, and about an hour’s work on the part of my server.