More permanent stuff at http://www.dusbabek.org/~garyd

06 December 2008

Upgrading Mythtv

Our children had been using a very old 200Mhz PII as their computer for the last 6 months or so. They aren't too demanding yet, but the biggest drawback for them was that the machine could not act as a front end to our MythTv system. That was my main motivation for setting up a MediaMVP as an SD front end for myth (still working well, btw!). So, to have another front end and a few other reasons, I decided that a new computer would was needed.

I put together a simple system on Newegg (Atom processor, 1.5TB drive, 2G RAM). I opted for a big hard drive because I planned to use the machine as a network file store for backups (this is the 'few other reasons' part).

I threw Xubuntu 8.10 on the new kids computer and tried to build a mythfrontend from source (0.20.2) but ran into too many problems with dependencies that weren't backward compatible. I briefly contemplated throwing on an older version of Mythbuntu (like 7.10) but ruled that out as well--it didn't seem right to do that to new hardware.

The decision was made: it was time for me to upgrade my Myth systems. The new machine for the kids and the myth server would both get shiny new copies of Mythbuntu 8.10 installed on them. I figured the timing was good since I had the week of Thanksgiving off from work. This meant that I would have time to focus on any problems that might crop up. In other words: I kind of expected the crap to fly.

Installing Mythbuntu 8.10 on the kids new hardware was a piece of cake. No problems there.

Things were different when it came to my existing backend though. My initial plan was to take the current machine, remove the hard drives, put in a spare blank hard drive temporarily, install Mythtv 0.21 using Mythbuntu 8.10 to make sure there were no problems. If that test proved it would work, I would back up the existing system, wipe the disks and recreate the system. If it didn't work, I would just put the old drives back end and figure out what to do next--nothing lost. (Given that I had such a hard time with lirc the last time around, I didn't want to take chances patching the existing system up to 0.21.)

I'm glad I did it that way. Mythbuntu wasn't going to have it on my hardware. Ubiquity managed to crash at the hardware detection phase of the install. Code-diving didn't help much either. I installed Mythbuntu so much over the span of two days, I wore out the cylinder hole of the CD I burned it on. Eventually, I realized that it just wasn't going to work. Xubuntu disc in hand, I went to work.

Xubuntu went on the old myth server smoothly. I decided to install myth from source, rather than use apt-get. It will make things easier if I need to patch later on, as I did previously when I needed to get the schedulesdirect updates.

My first happy discovery was that ivtv was baked into 8.10. One less thing to tinker with. I apt-got the tools, enabled ivtv in /etc/modules and was excited to see video getting dumped.

Next was lirc. Getting lirc to work the first time around was difficult for two reasons: the blaster tip on my Hauppauge blaster cable wasn't blasting, and it seems that lirc doesn't care much for the Hauppauge blaster hardware at a very fundamental level. Fortunately, my faulty blaster is a thing of past due to my handy soldering skills (I replaced the LED). Fortunately, for the second problem Mark at Mark's Braindump had patched the lirc source to make it happy with the Hauppauge. Thanks Mark!

Building myth was simple. Nothing outside of the readme. Configuring it turned into a bit of a chore though.

I verified it could record a program and that my macbook could show it. All was good there. Next, I had to figure out how to restore my old database and video files. For the video, I decided to save myself time and just use the old disks as-is, and remove all non-video files from them. That way, I wouldn't have to wait the several hours it would take to copy 200GB+ of video files from my backup.

I restored my myth database using the process outlined on the myth wiki. Then I set up the storage groups to point to the drives where I would be storing data. (+1 for the storage groups feature. I was forever limited in the past to 250GB of shows, but no more. I have two drives for 500GB of storage dedicated to myth videos and can add more drives when the time comes.)

I ran into a problem where a show would display the first time I tried to play it, but if I escaped out of the show and tried to access it again through the recordings menu, myth would complain that it could not find the file. Ouch.

The source of the problem should have occurred to me much earlier, but it didn't. I had changed the hostname for the server when I put 8.10 on it. The hostname is used in several critical database tables that I restored. Simple sql to update those tables with the right hostname solved that problem.

All is good again. The family is happily watching old shows, new shows and generally too much TV again.

There are still a few things I would like to do. I moved all my ripped movies from one of the 250GB drives now dedicated for myth shows and stuck them on the 1.5TB behemoth in the kids computer. I want to get that directory exported as a read-only nfs share that my various frontends can mount and use mythvideo to watch movies from. Also, it would be nice to find time to set up a vlc server on either the myth server or the kids computer to use for streaming movies to the MediaMVP. Then I need to re-backup my MP3s on the kids computer and turn mt-daapd on so that all my songs are available to any computer running iTunes. All that, and I'll be happy.

1 comments:

Greg H said...

That's an awesome triumph of technology and too-much-video. I'm glad you wrote this, because I'm going to be doing pretty much the same thing in the near future and it's good to know that I would have been pulling out my hair at certain points, which hair pulling can now be avoided. Huzzah.