Migrating a MythTV server from pre-Fedora 10 to Fedora 10 1


Migrations to new releases of Fedora are not a huge problem for me since I use a separate partition for system files (including repository managed packages) and separate partitions for home directories (/home), multimedia files (/store and /music), and web server root directories (also under /home).   About the only thing I have to manage are configuration files under /etc and MySQL databases.   The former I archive nightly using a simple shell script.   The latter I dump nightly to a database archive under a directory under /home so upgrades generally only require reloading the db unless some process requires I hand edit the dump.   That has happened once, but only once.   Migration, therefore, is mostly about installing the new release over the system partition and then making sure configs are put back in place.

In the past I've waited a few months after a new release to listen for all the complaints and workarounds others discover that I'll likely need.   However, Fedora (despite whatever complaints I might voice here) has stabilized enough that I have little worry about getting a system up and running quickly.   I will likely have a few issues getting specialized software working.   I fully expect that the system I'm upgrading first – my MythTV server – won't come up the first time I get all the software loaded.   I hope to be pleasantly suprised (re: wrong) about this.

Getting Started

Migration to Fedora 10 is about as difficult as any other migration.   There are some new features that turn out to be ways of doing things that are primarily added to ease use for the functionally brain dead and are mostly just different and/or generally a nuissance to experienced users.   Disabling root logins from gdm falls into this category.   Ubuntu added this in the past.   Fedora is following suit.   The dumbing down of the Linux desktop is in full swing.   Did we learn nothing from allowing any ol' nut on the Internet?   Apparently not.   Ah well, I digress.

There are some other changes with Fedora 10 to be aware of:

  • A number of 3rd party repositories have merged to form RPM Fusion.   This includes livna, which many users have used for 3rd party multimedia support.   MythTV users will care because all of the MythTV stuff that was over at ATrpms is now on RPM Fusion.
  • MySQL has been updated.   The changes don't appear to affect MythTV as far as I can tell.
  • Upstart is replacing the old inittab for various reasons.   This may require updates to startup scripts for the MythTV backend.   Fortunately, the yum install of MythTV takes care of this and it's only an issue if you roll your own startup/shutdown scripts.
  • There are no boot messages anymore.   You can enable these by pressing the ESC key during the boot, otherwise the boot is just a simple set of color bars that moves left to right at the bottom of the display.   This is all part of the “make Linux boot faster” effort.

Aside from the GDM issue mentioned previously (and which I'll cover later), you may want to take a look at the LXDE desktop as a lightweight desktop to reduce load on a backend (or even frontend) server.

Installation

If you do your install via the dvd iso image or via the Internet (new for F10), then skip to the next section on accessing disks.   If you're like me and have a bunch of systems that need upgrading and want to do a network install like you did with f9 and before, then you need to know about the new ways of doing network installs.

First, the DVD will default to a network install using an Internet mirror for F10.   This is fine if you just have one system and have lots of time to spare.   But it's much faster to download the DVD and then install locally across the network.   The problem with this is that the new Anaconda setup doesn't offer you the choice of doing an NFS based install unless you specifically tell it to offer you that choice.   Fortunately this is pretty easy to do for seasoned users.   This change, unfortunately, is yet another dumbing down of Fedora for the masses.

First off, download the DVD and store it on a system on your local network that has the directory exported via NFS.   I put mine in $HOME/iso/f10 and export $HOME to the local network ($HOME is my home directory, re: /home/mjhammel).   You don't have to mount the DVD or extract anything from it.   It just has to be accessible via NFS.

Next, when you boot the F10 DVD (or the Network Install boot disk), hit tab when you get to the grub menu so you can add some kernel boot options.   These are actually options to Anaconda, and the options you want are as follows:

  • askmethod – this allows you to specify how you're going to install.   Technically this may not be necessary if we use the nfsiso repo option, but I didn't check that.   I simply used both.
  • asknetwork – allows you to specify the network configuraiton information.   Again this may not be necessary with the other options I'm using here.
  • ip – This should be the IP address of the server you're installing.   For my server, 192.168.1.101 was used.
  • netmask – The proper netmask given the local network addresss.   For my IP, a netmask of 255.255.255.0 is appropriate.
  • gateway – This allows the installation to access the network through your router.   For my network, the router is at 192.168.1.1.
  • noipv6 – Home networks probably aren't using IPV6 yet so this disables that network to avoid confusion.
  • lowres – Only required if you're having problems with F10 recognizing how to use your video in high resolution mode.
  • noselinux – If you're behind a firewall then you probably don't need SELinux running.   SELinux is very useful for systems directly connected to the Internet but for home users behind a firewall SELinux tends to get in the way of every day use.
  • repo – This is the important option.   You must specify “nfsiso” in order to use the DVD iso image as it exists on your NFS server.

Accessing disks

The format of /etc/fstab has changed a little recently.   These changes started a few releases ago but they're very much in play with F10.   The important thing to remember is that an entry in the old fstab format used to be by device name:

/dev/sdc1 /store/movies/Cinema-1 ext3 defaults 0 0

Now it's by UUID or LABEL:

LABEL=MythTVVideo /store/movies/Cinema-1 ext3 defaults 0 0

To find the UUID or label, use the vol_id command on the old device name:

mjhammel(tty2)$ sudo /lib/udev/vol_id /dev/sdc1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=9222e3b0-7a25-4e29-87b8-405a9ecc404e
ID_FS_UUID_ENC=9222e3b0-7a25-4e29-87b8-405a9ecc404e
ID_FS_LABEL=MythTVVideo
ID_FS_LABEL_ENC=MythTVVideo
ID_FS_LABEL_SAFE=MythTVVideo

networkmanager

We have to put things into yet another file – /etc/sysconfig/network-scripts – that will auto-generate an older config file: /etc/resolv.conf.   So to add your DNS configuration, edit and add the following lines:


After adding these I also inspected this file and found that the netmask had been set incorrectly to.   It was set to the gateway address of 192.168.1.1 (the GATEWAY entry was correct, however).   So I manually edited the NETMASK entry to 255.255.255.0 and saved the changes.

After editing the file, restart your network services:

sudo service network restart

And that will pick up the DNS changes.   Why the DNS entries aren't added automatically (and the NETMASK entry is incorrectly set) via the Network desktop tools, I don't know.

Repositories

A number of the older RPM repositories for Fedora have merged to form a new repository called RPM Fusion.   This repository provides both free and non-free software.   The web site doesn't show it but MythTV is provided by RPM Fusion.   This means ATrpms isn't needed anymore (as of this writing, the MythTV metapackage for ATrpms was not available).

Follow the configuration instructions at the RPM Fusion web site.   I used the command line method and was able to easily search for MythTV packages.

GDM

Every distribution is making big efforts to tell newbies not to login to the desktop as the root user.   This is dangerous.   It's dangerous in the same sense that holding your hand over a lit burner on the stove is dangerous.   Lesson: don't do stupid things with your tools.   Logging in with root is not a bad thing.   It's just bad if you're too stupid to breathe.

I log in as root to do things when my primary userid gets mucked up while I experiment with new things, such as with gnome.   It doesn't happen often, but it does happen.   More importantly, I log in as root to do a few configuration things after an upgrade, one of which is to recreate my primary userid with a specific UID and GID.   You can't do that with the graphical installation option of creating a new user and I don't want the users home directory recreated because it's already there.   So I use useradd manually as the root user after installation.   I know what I'm doing.   I don't need Fedora (or Ubuntu or any other distribution) to help keep me from shooting myself in the foot.

So let's re-enable root logins for the desktop.   It's really simple.   Fortunately, rivviepop phantom figured this out before I did.   It's just a matter of editing /etc/pam.d/gdm and change the line with

…user != root

to

auth reuired pam_succeed_if.so user quiet

Essentially you remove the “!= root” portion of that line. Log out of the desktop and then log back in.   If it doesn't work with the root user, hit Ctrl-Backspace to kill and restart gdm and then try it.   It shoudl work.

MySQL

The content of the /etc/my.cnf configuration file has changed in F10 (updated from F9).   There are additional lines added to deal with MySQL running in a cluster.   Most home users of MythTV won't be using this. You can therefore comment out the following lines.   Under the new ndbd section heading:

# connect-string=”nodeid=2;host=localhost:1186″

and under the new ndb_mgm section heading:

# connect-string=”host=localhost:1186″

I also added in the following lines under the mysqld section header as suggested long ago for f7 but which I'm not certain are of any use in the current release (I've never had time to lookup their purpose):

# Settings for MythTV (see http://wilsonet.com/mythtv/fcmyth.php#hw)
bind-address = 192.168.1.101
key_buffer = 16M
table_cache = 128
sort_buffer_size = 2M
myisam_sort_buffer_size = 8M
query_cache_size = 16M
skip-innodb
set-variable=thread_stack=256k

Other Settings

I have 1.5GB of memory in the server which is plenty for the workload I put on it with MythTV.   I can improve performance by reducing the amount of swap that occurs.   To do this, I add the following line to /etc/rc.local.

# With 1.5GB memory we don't need to swap as much
# Change from the default 60 to 15.
sysctl vm.swappiness=15

Services

F10 ships with a bunch of services enabled that you probably don't need.   I'm assuming you're a typical home user of MythTV that uses DSL or a cable modem for Internet access.   Given that assumption, you can use System->Administration->Services to turn off services you don't use.   I turned off (and disabled) the following:

  • bluetooth
  • gpm
  • ipv6tables
  • isdn
  • sendmail

Simple log forwarding

If you want your MythTV server to forward your nightly logs for backups and security audits then you should install ssmtp.   I wrote an article about this on Linux.com a while back that you can reference.   Ssmtp is a lot simpler to manage than sendmail and, since it replaces sendmail, doesn't require you change anything else on your system to start picking up locally generated mail.

MythTV

A metapackage is available from RPM Fusion that ties in all the required packages (and there are a lot) to get MythTV installed.   Once the RPM Fusion repository is configured, just install the entire package with the one metapackage:

sudo yum install mythtv

This doesn't quite get everything, however.   If you have Hauppauge 150/250/350/500/USB cards you need to install the ivtv-firmware package too:

sudo yum install ivtv-firmware

I then reloaded my MySQL users using phpMyAdmin and loaded my mythtv backups (which I had created using mysqldump -B mythconverg):

One other thing:   I have 4 video cards in this server, all Hauppauge cards.   Two use bttv drivers and two ivtv drivers.   When the mythtvbackend system came up the order of the cards changed though their physical locations did not.   So be sure to run mythtv-setup and verify the cards are configured correctly.   No other changes to the configuration was necessary in my case.

That's it.   I was up and running in about a day, including distractions for holiday shopping.   Hope you're upgrade goes as smoothly.

update: 2009-01-01

I upgraded my laptop to F10 this week.  As part of the process I ran into the usual set of issues with getting multimedia working, even using the new non-free repositories from RPMFusion.  Once again,  Mauriat Miranda's personal guide to Fedora F10 provides the most up to date information for getting DVDs and related working under F10.

One thing noted on Mauriat's page that I ran into that is new in F10 is that the Xine movie player pukes when using PulseAudio.  The workaround is simple enough: run the program as xine -A alsa to use the Alsa drivers instead of PulseAudio.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

One thought on “Migrating a MythTV server from pre-Fedora 10 to Fedora 10