My personal MythTV project. This is a summary of all the research and work put into it. Dark based his HTPC on this as well :-) So for me, primary needs are:
Additionally in the future I would like to add a DVB-T card for capturing digital broadcasts. Why no DVB-C in Belgium.. thanks to a well organised monopoly from Telenet and Belgacom one can only use their decoding boxes. I would be able to live with that for instance with a CAM slot and a Telenet access card for encrypted DVB.. but alas, only their boxes work (card and box-mac address are locked to your connection only). I just want plain DVB you |@#!'s! DVB-S I hear... yes.. maybe, if I get some satellite hookup :-)
As you've guessed, basically I need a nice front end for media watching, not specifically recording. Many solutions for that, but x264? High resolution? mmm... ok thanks to MPC Club I know the current solutions aren't really solutions. Yes they work.. some of the time... and what about the future firmwares? Why would I spend 500 EUR on a media player which has no guarantees for the future if I could have a full blown PC for that price.
I needn't explain all the reasons for not using M*crosoft MCE stuff, Dark already did a great job on that :-) (sorry it's in dutch ppl).
I see you going "like wtf" at the USB Stick. It's perfect? More and more solid state drives are becoming available (and with higher throughput), but for this project a 25 EUR cheap USB Stick will do.
I bought everything from JanW from EGW/DRAC. I encountered a problem mounting the Spire cooler on the the GA-MA69GM-S2H motherboard. As you can see on the illustration below (forgive my Gimping-skills). JanW helped me resolving this with his Dremel-alike toolkit :-)

The coolers central mountpoint overlaps with IC's on the motherboard.
The VFD's internal USB connection was also a bit troublesome. 4 wires on a 9-pin connector on the MA69GM-S2H motherboard. A single 9-pin connector appears to provide 2 USB ports. So manually hooking up the VCC (+5V), D-, D+ and GND (Ground) cables according to included schematic in the mobo manual worked fine.
Mythbuntu meets Damn Small Linux for booting from a USB stick.
First wipe the MBR for the targetted USB stick, this will do the trick on /dev/sdc1
dd if=/dev/zero of=/dev/sdc count=512 bs=1
Next, prepare the following layout (using fdisk or whatever)
Disk /dev/sda: 4127 MB, 4127195136 bytes
127 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7874 * 512 = 4031488 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 * 1 21 82646 b W95 FAT32
/dev/sda2 22 989 3811016 83 Linux
Format the partitions accordingly:
~# mkfs -t vfat /dev/sdc1
~# mkfs -t ext2 /dev/sdc2
Doesn't really matter where you do this. Basically what you do is a default installation of Mythbuntu (back & frontend with all plugins etc.. no need to configure drivers or IR yet). The idea is that we "unpack" and prepare our root-filesystem with kernel and everything in it.
Ah yes... 64bit is touchy in some virtual environments if you haven't got VT-x technology, check for a vt or hvm flag in /proc/cpuinfo
~# mount -o loop mythbuntuinstall.raw /mnt/loop
/mnt/loop# tar cvzf ~/htpc_root.tar.gz *
~# apt-get install syslinux
~# mkdir -p /mnt/mythstick/boot
~# mount /dev/sdc2 /mnt/mythstick
~# mount /dev/sdc1 /mnt/mythstick/boot
~# cd /mnt/mythstick
/mnt/mythstick# tar xvzf ~/htpc_root.tar.gz
~# dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc
The big "why?" is related towards the updating of kernels, no accidental overwrites, but we'll disable overwriting with ro in /etc/fstab and fix update-initramfs manually as well later on.
/mnt/mythstick/boot# cp vmlinuz-2.6.22-14-generic vmlinuz
/mnt/mythstick/boot# cp initrd.img-2.6.22-14-generic vmlinuz
syslinux.cfg:
DEFAULT vmlinuz
APPEND root=/dev/sda2 initrd=initrd.img nosplash
TIMEOUT 30
PROMPT 1
DISPLAY boot.msg
F1 boot.msg
LABEL casperTest
KERNEL vmlinuz
APPEND root=/dev/sda2 initrd=initrd.img nosplash
/mnt/mythstick# cd
~# umount /mnt/mythstick/boot
~# umount /mnt/mythstick
~# syslinux /dev/sdc1
The result should be an USB stick that boots... and goes straight into initramfs :-) So not very usefull at the time being.
Next is some pretty standard stuff, adapt /etc/fstab towards the newly created USB stick. The command of use here is blkid
~# blkid /dev/sdc1
/dev/sdc1: UUID="47A1-AEB3" TYPE="vfat"
~# blkid /dev/sdc2
/dev/sdc2: UUID="c9811a9e-021c-41f9-9a63-1596fb1e6154" TYPE="ext2"
/etc/fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2 on Stickie
UUID=c9811a9e-021c-41f9-9a63-1596fb1e6154 / ext2 defaults,errors=remount-ro 0 1
# /dev/sda1 on Stickie (mount ro only,we don't want to edit anything by accident)
UUID=47A1-AEB3 /boot vfat defaults,ro 0 2
# NO SWAP!!! We're running on a slow flash medium and we do not want to deliberately wear it down with writes
...
Also adjust syslinux.cfg with the necessary info, e.g. 'APPEND root=/dev/sda2' in syslinux.cfg if your usb stick is detected as sda on the new htpc box. Sadly enough I didn't get UUID to work here (as it does in GRUB for example).
Next up, adjust udev for networking on your USB stick, since Ubuntu "records" the MAC address for naming the eth* interfaces, and I like mine to be called eth0. Simply replace the MAC address in the following file with that of your new network interface in the HTPC box.
/etc/udev/rules.d/70-persistent-net.rules:
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:f1:12:ab:dd:e7", ATTRS{type}=="1", NAME="eth0"
If you boot the stick now you'll notice it working flawlessly except for X11. Maybe it will... do you feel lucky punk ;-).
There must be dozens of tutorials out there, I will not reinvent the wheel for you. So I will only touch issues that came across with this setup specifically (ATI Xorg config for instance).
The OSS driver for this card is called radeonhd (xserver-xorg-video-radeonhd package). It works perfectly in 2D with mythbuntu, as it incorporates a version that recognizes the RS690 chipset so no manual compiling is needed. DVI/HDMI should work as well since git-version 2008-03-24 (so called 'mystery digital block' was identified), this however requires manual compile & packaging. Alas to use exotic features such as TV-out (thank you Macrovision crap for being NDA protected |@#!) and 3D acceleration one must use the proprietary ATI drivers. First install them from your good old commandline:
apt-get install xorg-driver-fglrx fglrx-control
I puzzled alot with the xorg.conf file to get it right, but you can grab it here (with necessary comments on editing how, what & where). Place it in /etc/X11/xorg.conf ofcourse.
Crucial things about the X1200-series chipset on the GA-MA69GM-S2H with driver version 8.37.6 :
<snip>
(WW) fglrx(0): More than one displays are connected,so clone mode is enabled
(WW) fglrx(0): DALEnableDriverInstance on secondary failed: 9
(EE) fglrx(0): PreInitDAL failed
(EE) fglrx(0): PreInit failed
First the IR receiver (since the LCD is dependant on this driver, and it is one and the same device). The DIGN case ships with three types of IR/VFD's which use different drivers. Imon & sasem work well with LIRC and lcdproc, mine was however equiped with the third variant: IRTrans based.
Sime posted a wonderfull solution and script on mythsettopbox.tv, which I will not directly link because it will break XHTML1.0 compliance (thank you PHP |@#!). But you can all use Google with the words "irserver debian simon", first link it is ;-) Modernised version follows:
mkdir -p /etc/irtrans/remotes
mv /usr/local/irtrans/remotes/* /etc/irtrans/remotes
update-rc.d irserver defaults
update-rc.d -f lirc remove
/etc/init.d/lirc stop
/etc/init.d/irserver start
ps auxw | grep irserv
Blicbox (dutch) has an excellent reference on that, which I followed and adapted a bit. Here it goes
apt-get install build-essential libncurses5-dev
~/lcdproc# ./configure --enable-drivers=irtrans
~/lcdproc# make
~/lcdproc# make install
Do not worry here about clogging up your system with non-packaged files, once again, IRTrans sticks to /usr/local.
~/lcdproc# mv /etc/LCDd.conf /etc/LCDd.conf.dpkg-dist ~/lcdproc# cp LCDd.conf /etc/LCDd.conf
sed -i 's/Foreground=yes/Foreground=no/g' /etc/LCDd.conf
update-rc.d LCDd defaults /etc/init.d/LCDd start
LCDproc Server
0 clients, 0 screens
We shall enable MythTV settings for LCD as well, later on that is :-)
Getting a remote control to work. IRTrans by default comes with a couple of remote definition files and you can google for additional files. Alas the number of supported remotes for LIRC is vastly greater. Or one can program IRTrans to recognize a new remote... which I would do if I had the time. So I went for the very easy solution, buy one of the supported remotes: Microsoft MCE remote, which as all MS hardware is good, same cannot be said for their software ;-)
-vo x11 -subfont
Do not use the -vo xv (default!) option for mplayer with ATI driver version 8.37.6 (repo version of Mythbuntu 7.10), it will not work!
For those I remember and/or commonly used: