Comparing more live version upgrade methods



At the end of May I set out to discover how well a handful of popular Linux distributions (and FreeBSD) would handle a live upgrade between major versions. The results were mostly positive with four of the five open source operating systems successfully upgrading to their latest version.



Following that article, some people asked if I would perform similar upgrade tests on other projects. This past week I set out to perform live upgrades on four more open source operating systems and report on the results. * * * * * OpenMandriva 2013.0 to 2014



One of the distributions I was asked to upgrade was Mageia, a relative of the Mandriva family of Linux distributions. Unfortunately, I was unable to find a copy of Mageia's old version 4 release on the project's download mirrors. Apparently it was removed to save space following the release of Mageia 5 and I had to skip experimenting with Mageia.



In Mageia's place I decided to try upgrading OpenMandriva which is probably Mageia's closest relative in the Linux ecosystem. The release notes for OpenMandriva 2014.0 include a section on upgrading the distribution from earlier versions. I downloaded OpenMandriva 2013.0, which was a 1.5GB download. I went through the installation, taking all the default settings, which gave me a copy of OpenMandriva with the KDE desktop environment.



At first I planned to install a few packages and update the software which came with OpenMandriva 2013.0, but I found there were no software repositories set up by default. The release notes warn users about this possibility and I was able to go into the software manager, select media settings and add the missing repositories. At this point I checked for software updates again and was suspicious when the update manager reported there were only 12MB of available updates for the aging version of OpenMandriva.



I tried to install the waiting updates, several times. Each time the update process failed, reporting there was a missing locale package. Skipping this package, I found several other dependencies were missing and so no package updates could be applied to the out of date 2013.0 release.



At this point I decided to skip updating the individual packages and make the leap to OpenMandriva 2014.0. Following the provided instructions in the release notes, I removed the old repository information, enabled the new 2014.0 repositories and performed a command line upgrade. The upgrade process failed quickly, reporting many errors. Essentially, what I found looking through the error log was that most packages failed to upgrade due to missing dependencies.



In the end, the bad news was it was not possible to upgrade OpenMandriva 2013.0 to a newer version. However, the existing system remained usable. Attempting the upgrade did not damage or otherwise prevent me from being able to use the existing 2013.0 installation. * * * * * Linux Mint 16 to 17.3



The next distribution on my list was Linux Mint. I was hesitant to cover performing a live upgrade of Linux Mint for two reasons. The first is that Mint's community documentation on version upgrades recommends against performing live upgrades. Instead, the documentation suggests backing up our files and list of installed packages, installing a fresh version of the operating system and then re-adding the packages we had previously installed. Their reasoning makes sense, but they do include a section on live upgrades too for people who really want to go that route. The second reason I almost skipped talking about Linux Mint is, at the time of writing, I only have the option to upgrade version 16 to version 17. However, as I write this, Linux Mint 18 is being beta tested and may be released around the same time as this article, making these comments seem out of date. I do note that the live upgrade process has not changed between the launch of Mint 16 and Mint 18, so what I cover here should be applicable to the latest version of Mint.



I downloaded the Cinnamon edition of Linux Mint 16. The ISO was a 1.2GB download and I installed Mint with all the default settings. After installing Linux Mint 16 I found the version was well out of date and there were no updates available. I could not install additional software as the Mint 16 repositories no longer exist.



Upgrading Linux Mint is a lot like upgrading Debian. We manually edit the APT configuration, changing the source repositories. This is the only tricky part as we need to know both the name of the new version of Mint and the code name of the Ubuntu release Mint's new release uses as a base. For example, Mint might use "Rosa" as a code name while Ubuntu will use "Trusty" for the corresponding version. Once the APT configuration has been updated to point to the proper Ubuntu and Mint repositories, we can refresh our repository information and perform the upgrade using the command line apt-get utility.



I performed the live upgrade in two stages, using "apt-get upgrade" and "apt-get dist-upgrade". In total, these two operations pulled in 890MB of new packages (409MB for the first upgrade and 481MB for the dist-upgrade). During the upgrade process, there were a few speed-bumps. For example, after running "apt-get upgrade" the Cinnamon desktop crashed. I was able to login again and resume the process, but Cinnamon was unstable until after the "apt-get dist-upgrade" command had concluded its work. Also, during the upgrade, the process paused several times to ask if APT should overwrite existing configuration files or leave the old files in place. This means we need to babysit the upgrade process, checking on it occasionally over the span of about four hours.



In the end, I found myself running Linux Mint 17.3,. The system was stable and the new version respected the configuration changes I had made prior to starting the upgrade. While Mint's live upgrade process may not be recommended, it did work. * * * * * PC-BSD 9.2 to 10.x



The next project on my list was PC-BSD. The FreeBSD-based operating system does provide some documentation on upgrading across major versions. One important thing to note is that PC-BSD 10.0 and newer require ZFS to be available, otherwise some of the system utilities will not work. This means we cannot live upgrade PC-BSD 9 to 10 if PC-BSD 9 was installed on an older file system such as UFS. The download for PC-BSD 9.2 was 3.4GB in size. I installed the operating system with all of its default settings, which gave me a copy of the operating system running on ZFS with the KDE desktop.



At first it looked as though PC-BSD would be quite easy to upgrade. Shortly after logging into my account, a notification in the system tray let me know software updates were available. The graphical update manager offered to upgrade the base operating system to PC-BSD 10.0 and update the pkg package manager. The update manager refused to update both components at the same time.



I soon found trying to upgrade either the base system or pkg would fail. The update manager did not provide details as to what had gone wrong and so I decided to attempt a manual upgrade by following the FreeBSD Handbook as I had when performing a live upgrade of FreeBSD back in May. At first the manual process seemed to work, downloading the necessary patches for FreeBSD 10 and getting me to resolve conflicts between my existing configuration files and the new versions. Part way through, we are asked to reboot and then continue the upgrade process using the freebsd-update command utility. PC-BSD failed to reboot and, in fact, the boot loader no longer found any operating systems to run.



The inability of GRUB to find the operating system was unfortunate, both because it meant the upgrade had failed, but it also meant I was unable to rollback the upgrade and use an earlier snapshot of the operating system. I had taken the time to save a snapshot of PC-BSD prior to starting the upgrade process and had hoped it would allow me to recover if anything went wrong. However, with the boot loader failing to find PC-BSD, my snapshot was lost. * * * * * OpenBSD 5.8 to 5.9



The OpenBSD operating system was the last project on my list to explore. Though it does seem to be technically possible to perform a live upgrade of the highly secure operating system, the documentation recommends performing a hybrid upgrade where we update the base operating system from an installation disc and live update third-party software packages. The OpenBSD installation media is 220MB in size. I installed the operating system with X and a window manager, then added a few packages to customize the installation.



The documentation provided explains how to upgrade OpenBSD 5.8 to version 5.9 step-by-step and the instructions worked exactly as laid out. Upgrading requires two reboots, one to initiate the upgrade process and one to boot into the new version of OpenBSD. Upgrading the base operating system took approximately ten minutes, including the two reboots. Upgrading the third-party packages took another minute or two. The only quirk I ran into was that I had to manually update my repository mirror information to gain access to the new packages available for OpenBSD 5.9. If this step is not done, then the pkg_add package manager will continue to pull in packages from the old repository we set up for OpenBSD 5.8. * * * * * Conclusions



In my previous trial I experimented with five operating systems and, despite a few issues, four of them successfully updated across major versions. I considered four out of five to be a success. This week I experimented with four operating systems and the results were split with two successfully completing live upgrades and two failing. OpenMandriva failed with a certain amount of grace, allowing me to continue to use the operating system. However, PC-BSD failed to upgrade in a way which left the operating system unable to boot even with file system snapshots in place. To a degree, PC-BSD failing to boot was my fault. When the update manager refused to perform the upgrade automatically, I could have left it at that. Attempting to push ahead with a manual install was what drove to the operating system over the edge and past the point of no return.



I had much better luck this week with Linux Mint. Though Linux Mint 16 was no longer supported and its repositories shut down, I was able to upgrade the distribution. I was quite happy to see Mint survived the live upgrade despite live updates not being the recommended path for upgrades. OpenBSD was probably the smoothest upgrade of the four. OpenBSD provides clear documentation, step-by-step instructions and the upgrade happens very quickly. The command line nature of the OpenBSD upgrade might be intimidating to newcomers, but it works as documented.



