Sunday, May 13, 2007

Ubuntu and MythTV notes

I've been wanting a particular server PC for a long time now; a PC that I could use to record TV, be the main storage area for all of my data (especially music and photos), remotely trigger downloads and perform backups from. Installation of this PC is well underway but I wanted to post about a couple of stumbling blocks I had in case others were having them (or unless I had to go through it again!).

Background: The two major software choices I've made were to use Ubuntu for the OS and MythTV for the TV recording. I've been very happy with both decisions; highly recommended.

The vast majority of users will find Ubuntu amazingly simple to install. I had a couple of slightly unusual requirements however...

I wanted to use a filesystem called LVM. The main benefit for me with LVM is that you can add extra storage space whenever you want. LVM abstracts the logical mapping of mount points from the physical hard disks and partitions. An example: Today I may have a mountpoint at /var/mydata and it may be mapped to a partition on my current 320 Gig HD. Tomorrow I could drop another 500 Gig HD in and add some (all if liked) of it to /var/mydata.

In the Windows world this would be like having a 320 Gig drive appearing as C:/ then adding another 500 Gig drive to it. [I've been told Vista has some support for this kind of thing - can anyone confirm?]

It's a very useful feature (and Unix OS's have had it since '98) particularly for a server where my storage needs are going to be ever-increasing.

Unfortunately there is a problem with LVM under Feisty Fawn, the latest version of Ubuntu. LVM, as installed when using apt-get, seems to be located in the wrong place. Thankfully John has written up a simple work-around. It may also be related to another defect with the libdevmapper package. Either way it's easy to fix with those two references.

Installing MythTV is remarkably easy under Ubuntu, just follow this guide. Unfortunately my capture card (a Leadtek WinFast 1000 - basically a bog-standard DVB card) didn't work straight-up. It wasn't being properly detected in the MythTVconfiguration. Turns out that for some reason I was missing a couple of required kernal modules. Again, hitting the Internet quickly gave me a pointer in the right direction. dvb_core and cx88_dvb were the culprits; adding them with the following commands:

sudo modprobe dvb_core
sudo modprobe cx88_dvb

solved the issue. Of course, resetting the PC would mean that these modules would be missing next boot so I also had to add them to /etc/modules.

They were the biggest stumbling blocks (though installing shepherd - a wonderful EPG for Aussies - took some trial-and-error!). I've now got a stable system that I can record TV (remotely if I like using MythWeb) easily. I've still yet to shift all of my data to the box nor are backups happening yet, but it's just a matter of time.

Check out Ubuntu and MythTV, I've had a good experience with both of them!

1 comment:

Goatee said...

I'm a newbie to linux but I've set up something similar to LVM using 2 partitions (on separate physical drives) made with cfdisk with types FD and then using mdadm to make a linear array. AFAIK I can add an e-sata drive to the storage pool later. Shows up as /dev/md0 which I then just formated to ext3 using mkfs. If people are having problems with LVM maybe they can try this approach. There is something under the MythTV site that details setting up RAID using mdadm which I adapted slightly to suit me (linear rather than RAID 0/5 etc).