Friday, January 15, 2016

HTPC OS Upgrade

My HTPC was running off a non-LTS distro for a while, finally got around to reinstalling. The process wasn't without hiccups, but overall wasn't too bad.

The two primary applications I run are Kodi (aka XBMC) and MythTV. The Kodi reinstall was easy, MythTV a little trickier to get right. These are the steps I followed:

Initial Install/Setup

  • Reinstall the new OS. I used LinuxMint 17.3 with Cinnamon as I'd been using Mint 15 previously. I also partitioned the existing SSD so that the old install is still available.
  • Set up standard stuff like web browser, terminal config, graphics drivers, etc.
  • Set system audio to appropriate device — as I was using audio over HDMI, the default sound device wasn't the right one.
  • Probably want to turn off the screen saver.

Kodi Install

  • Install Kodi
    sudo apt-get install kodi
  • Copy old ~/.xbmc/userdata directory to new install. Kodi data is stored in ~/.kodi.
  • Start Kodi. User settings like which videos you've watched should be retained. May need to configure the audio settings, I did as I was using HDMI.

MythTV Install

  • Boot back into the old OS install and follow the MythTV database backup procedure. I used:
    /usr/share/mythtv/mythconverg_backup.pl --directory <path_to_shared_drive>
  • Boot back into new OS install.
  • Install MythTV (this will install dependencies like MySQL).
    sudo apt-get install mythtv
  • Recreate the database. Note that this will create the database with a default username and password of "mythtv", which caused problems for me when restoring the database backup in the next step.
    mysql < /usr/share/mythtv/sql/mc.sql
  • Restore the database. Could not get the preferred method to work — it kept failing with a "could not connect to database" error. Could not get mythconverg_restore.pl to connect. At first I thought it was a password issue, but setting the correct password in /home/mythtv/.mythtv/config.xml didn't help. In the end I found this post, which gave the command to manually paste the database backup back. As the mythconverg_backup.pl script gzips by default, I did the gunzip on the backup file before running the following:
    mysql -umythtv -pmythtv mythconverg < backup_filename.sql
  • Run mythtv-setup. I needed to add the TV tuner adapters and sources — so I guess this wasn't part of the backup — and scan for channels. Also add the existing hard drive paths as storage directories.

I had to unplug the tuner (DigitalNow TinyTwin) to get it to appear — not sure why, but other than that the OS upgrade went pretty seamlessly.

No comments:

Post a Comment