Monday, August 29, 2016

Ubuntu Upgrades for MythTV Server

I recently upgraded LittleDell, my Ubuntu Linux box running MythTV, to the 16.04.1 "Xenial Xerus" LTS release.
When I first set up this machine, I used Ubuntu 14.04.5 LTS (server version). The LTS stands for Long Term Support, and is supported for 5 years. Using an LTS version minimizes the need for major upgrades, though it's still important to keep up with minor security patches regularly.

The initial version of 16.04 was released back in April, but I didn't see any need to upgrade right away. Why run the risk of problems? In July, 16.04.1 was released with some minor updates, and shortly thereafter I got a notification that the upgrade was available. I could have skipped this one as well, since 14.04.5 is supported until 2019. But at the same time, one of the hardware drivers used by my machine under 14.04.5 was also going out of support. I figured this was a good time to upgrade and avoid any potential driver issues, as well as getting onto the latest Ubuntu version.

The actual upgrade process is very simple: you log into the machine, and run "sudo do-release-upgrade" at the command prompt. I did it over an SSH connection, though that runs a minor risk since you might lose the connection in case of any problems. The installer is kind enough to set up a backup SSH port just in case, but fortunately I didn't need it. The process took a couple of hours, though most of that was just waiting, so I just left it running while I did other things.

The upgrade made extensive changes: according to the installer, it installed 252 new packages, upgraded 907 more, and removed 32. 695 MB of downloads were required. Most of that consists of behind-the-scenes system changes, of course. Everything it did was logged in /var/log/dist-upgrade, just in case I need to look back at it later.

The installer also told me that 13 packages were no longer supported. I went ahead and did the upgrade, but was curious afterward about those packages. After a bit of searching, I found the list in the installer log (grep "demoted" /var/log/dist-upgrade/main.log), but didn't recognize any of them. Several were related to perl, which I'm not using extensively anyway.

After the upgrade and a reboot, everything started up normally. But of course it couldn't be perfectly smooth - I ran into trouble with MythTV when I tried to access my recorded programs. The upgrade had caused two problems:
  1. The PHP-MySQL interface used by the MythWeb browser interface wasn't installed by the upgrade. Easily solved by "sudo apt-get install php-mysql" and a restart of the Apache server.
  2. MySQL changes from the upgrade caused an error when getting the list of recorded programs from the MythTV backend. I had to do some Google searching to resolve this one, and eventually found a solution. In the /etc/mysql/conf.d/mythtv.cnf file, add the line "sql_mode=NO_ENGINE_SUBSTITUTION", then restart MySQL and MythTV. Apparently that line is needed to force the upgraded MySQL to work more like the older version that MythTV was expecting.
At this point, everything seems to be working normally. Assuming no additional issues crop up, this machine shouldn't need a major upgrade for another few years.

No comments:

Post a Comment