My Recent Adventures In Linux (Building a MythTv Box)

I started about a month ago building my very own MythTV box. Although my wife and I are proud, proud TiVo owners, I was excited about the prospect of tweaking out a pc and of course not being tied to the rules of a commercial product.

(All right, all right, I’m a geek and needed a challenge.)

My requirements for the build:
[ol]
[li]All in one box - both frontend and backend (Myth allows you to split the video watching portion and the video recording portion into two seperate PCs communicating of your LAN)[/li][li]Cost no more the $500[/li][li]Use Debian linux (my fav distro)[/li][li]Look good in or next to my entertainment center[/li][/ol]

My first build attempt quickly fizzeled. I purchased an NMediaPC bare-bones system whose power supply died on the second power-up. Luckily, Newegg refunded my money and I went shopping again.

Current Specs:
[ol]
[li]A Terminator T2 small form factor bare-bones[/li][li]A Hauppauge 500 dual tuner capture card[/li][li]An old ATI Radeon 7000 with S-video out[/li][li]A Seagate SATA 250 gig hard drive[/li][li]An old DVD-ROM ripped out of another machine[/li][li]A 2 Ghz AMD Sempron CPU[/li][li]500 megs of DDR RAM[/li][li]A serial port IR receiver[/li][/ol]

After getting my hands on all the components, I assembled the machine. Asus makes one hell of a beautiful box. I popped my Debian Etch installer and was off…

Until the 2nd menu item, detecting the NIC. My on-board NIC interface couldn’t be found. After some googling it turns out that the motherboard in the box uses SIS chipsets. The SIS ethernet controller was not supported by the installer. Oh well, I popped a spare NIC into the PCI slot and was back in business…

Until the 3rd menu item, harddrive detection. Again the onboard SIS SATA controller was not supported by the installer kernel. Ughhh. So, I popped in a spare IDE drive and I was again off…

Until the… just kidding, debian was installed and I was kinda happy, except for the 250 gig harddrive begging to be used. After quite a bit of googling, It turns out that both my NIC and harddrive are not supported with the most recent linux kernel (2.6.14). I upgraded the kernel (go APT-GET) and both the drive and NIC were found and after some tweaking, working well.

The next fun project was to migrate the OS from the IDE to the SATA drive. Luckily linux allows one to simply copy the install over without too much trouble. So, I partitioned and formatted the SATA, copied the OS over, installed GRUB to the MBR of the drive, modified GRUB to use a /dev/sda instead of a /dev/hda, crossed my fingers, shutdown the pc, removed the IDE drive, booted and … nothing. It would seem I missed a crucial step. I had to regenerate the initrd boot image to include my SIS SATA controller or the boot would never see the hard drive (go linuxquestions.org for helping me with that).

At this point, I now had a working base testing/unstable Debian linux install using the hardware I needed. My next step was to install XOrg and get myself a GUI. The biggest trouble here was my ATI radeon 7000. Those that know linux, know that ATI provides very poor support to the linux community. Lucky for me the fine folks at the GATOs project have been working on drivers for ATI video cards. One part of there project even provides the needed drives for TV-out on radeon cards, Yippie! So, I downloaded XOrg sources, patched in the GATOs code and with some dependency trouble compiled XOrg. A reboot later and I had tv-out with Xv video.

Finally, I was getting somewhere, so on to capture card. Hauppauge is a company that warms linux fans’ hearts. While not developing linux drivers themselves, they have actively worked with the IVTV project to do it. Because of that, this was the simplest part of my build. The IVTV drivers compiled relatively trouble free, modprobed in the card and I was capturing TV.

Getting near the end, It was time to install MythTV. Originally, I attempted to use the apt sources to install mythtvand mythplugins. I had a lot of trouble, though, with conflicting dependancies on QT3 libraries, so, I decided to compile myself. After hunting through the myth documentation and satisfying a tons of dependancies I was able to compile and install MythTV, MythPlugins and MythThemes, the big 3 packages.

And, now, here I stand. Myth is working well and the picture/recording quality rivals our TiVo. I also have myth playing my MP3s, showing pics of my son, and playing video files downloaded off the web (nothing illegal, just immoral).

My next step, will be to install LIRC and get a remote working. I’m hoping to use the A-B switch on our TiVo remote and use the B side with Myth. After that, I have to get it wirelessly networked since running cat 5e to the living room is not an option. And then, of course, I finally get to place it in the living room.

LarsenMTL

Have you checked out the December issue of the Linux Journal? They’ve got a cover story on MythTV. It sounds like you’re probably already past the point of the build where the article’ll get you, but it might be worth taking a look.

I just tried to read it off their website, but apparently you have to be a subscriber to read the “current” content. Oh well.

Sweet. I’ve always wanted to make one, but the cost of the video card and HD (and especially making sure the card was supported ;)) put me off.

Here’s a question I never got around to finding the answer to - do you get program information/TV-Guide style info on that thing? I don’t have one, but I figured the most useful thing about a TiVo would be selecting a program way in advance and having it recorded.

The cost is a tough one. I think you can buy TiVos now for like $99.

Yes, it has a very nice programming guide. There are a couple of ways to populate it. The most preferred is to use Zap2It.

You create an account with them and MythTv runs a cron job nightly to download listings, parse the XML and populate it’s database. After using it for a few days, I have to say that the listings aren’t as complete as TiVos, but this is free not $13 a month.

Cool! I’m in the middle of doing the same thing, although I’ve gotten really busy with work and some other projects so it’s just sitting in my office right now. I decided to go with Gentoo linux because I thought it would be fun to play with a new distribution, and so far it’s been great. I’ve mostly used Redhat before, but I love Portage so much more than rpm that I might never go back. I love how it handles dependencies.

I think I last left off configuring Xorg (it wouldn’t find my USB mouse for some reason, I still don’t know why). When I get back to it, it shouldn’t take long from there to finally install MythTV and see what it looks like. Should be fun.

MythTV is the coolest thing ever.

It’s definitely a big project; really it’s 5 or 8 seperate projects bundled into one (TV receiving subsystem, TV display subsystem, Remote control subsystem, TV guide subsystem, MythTV itself, etc.), and each one of these has hidden challenges.

It is so sweet when it’s running.

Currently, I have a server in the garage, and my MythTV nfs mounts all it’s stuff from there. I had it setup as a MythTV server, with the front purely as a client, but I prefer this setup where the server is just a storage spot, no MythTV running on it.

You may also want to check out the mvpmc project. It’s a cheap ($100 or less) box you can plug into remote TVs that can play stuff (tv, movies, music) from your main unit. This project doesn’t have all the kinks worked out, and isn’t quite as nice as MythTV. But it’s very cool.

I’ve had MythTV up and running for years (literally) in various incarnations. If you run into any snags, feel free to write, maybe I can help.

No arguments here. RPM dependency hell is well, hell. APT is one of my favorite things about Debian. Of course with this build I’m ending up compiling a lot on my own, so maybe Gentoo is worth a look on my next system.

And that is the tricky part. LOL.

Well, since you offered, I’m having difficulties with LIRC. I’m running a stock debian kernel 2.6.14, so i placed the untared source in /usr/src/linux, added the config file, and did a “make oldconfig && make dep” inside the source root directory. I then untarred the LIRC source, ran ./setup.sh, selected a serial port receiver (I purchased a homemade IR receiver from here, and then configured, make, and make install. It all went without error. I then tried the mode2 program but it fails with “Error: /dev/lirc Device does not exist” although /dev/lirc is present.

Any ideas off the top of your head? This was my first attempt and I haven’t gotten much of a chance to dig yet.

On another note, Bill H. are you still running a Myth setup? If so, I’m curious as to what hardware you are using. There are so many different components that must come together that choosing the hardware is mission critical. I’m try to recycle old components as I go.

Happy Thanksgiving.

Nevermind. I got it. Turns out the lirc_serial module wasn’t compiling correctly against my kernel.

Hey, sorry I didn’t see this.

Glad to hear you got the lirc issue resolved.

My setup isn’t terribly exciting or special.

The PC I’m using is a shuttle with an AMD 2GHz CPU and 1Gig of memory. One day I’ll rebuild it and use a quieter machine.

I use a PVR-250 for TV input and remote control. I actually have two PVR-250s and at one time used them simultaneously in a different PC. Unfortunately, the Shuttle only has one slot, so I can’t put the two cards in it. I don’t actually watch many things that overlap in time, and I don’t use picture in picture, so this hasn’t really proven to be a problem.

The shuttle has video out built in and I use that.

I use Red Hat Fedora 3, but that’s just because Fedora is my Linux of experience and choice. Others may be better.

Then I have an NFS file server in the garage, where everything is stored. It could be anything, but it happens to be a Dell 3GHz w/1GB mem, and 4x400Gig disks in a Raid Array (1.2TB). All TV recordings, Videos, Music, Pictures and assorted files are stored on it.

I used to use MythMusic as my jukebox, but eventually, I realized that using the tv as the screen wasn’t a good idea since the resolution is so poor compared to a computer. Especially since I have two PCs in the same room as the TV. So, I brutally hacked up the juke box “Glirnath” and use that instead. It’s a jukebox with a web front end.

I also run samba on the file server, so the kids in their rooms can play music from it and store files on it.

As I mentioned in a previous post, I also have a Hauppauge MVP box running MVPMC on another tv in the house. The UI on this is horrible compared to MythTV, and it has problems keeping audio and video in sync for many protocols, but what do you want for a $100 box that has a CPU on par with a dorito? I would love to put my MythTV in the garage, and replace it with another of these MVP boxes, but MVPMC will have to go a ways before that happens.

So that’s my little setup…