For a more general introduction of what these instructions are and why I wrote them, head over to my main MythTV page.
These instructions - really, more like a cheat sheet - are written for lenny (5.0), but should work just fine with etch (4.0) as they are based on the MythTV Wiki article for installing under etch. The package lists vary a little from the MythTV Wiki page as I presume you have --with-recommends (the default in lenny) enabled for aptitude.
While there is a little bit of hand-holding here, these instructions are not geared toward beginners. You should have a pretty solid background with Debian and a good understanding of how MythTV works in order to understand these instructions. Again, this really is just my notes cleaned-up a little.
Code run as root
# run as root
Code run as regular or administrative user
$ run as user
Placeholder for appropriate argument in command
<parameter>
e.g.
$ sudo splashy_config --set-theme <theme>
Insert argument from list of options
<option1|option2>
e.g.
$ sudo aptitude install mysql-<client|server>
Edit file as reflected
filename:
...
Look for a line like this and change it as shown // if not obvious, original will be presented
...
This is pretty straightforward: install Debian lenny as you normally would. At the task selection menu, install just the base or standard system. Do not install the full desktop system - you will get much more than you need.
I install a few extras during my automated Debian install. If you are using the stock installer provided by Debian, install the following extra packages:
# aptitude install splashy splashy-themes sudo ssh
Set sudoers
# visudo
My standard installation has three users: root (obviously), a "standard" account with very specific execute permissions allowed via sudo, and an "administrative" user with full execute access via sudo. The remainder of the commands provided here are run under the administrative account via sudo.
SUDOERS:
...
# User alias specification
User_Alias ADMINS = <super user account>
...
# User privilege specification
...
ADMINS ALL = NOPASSWD: ALL
...
Set hostname as appropriate, if not already done during installation
$ sudo nano /etc/hostname
$ sudo hostname --file /etc/hostname
$ sudo nano /etc/hosts
Install ntp (preferred) to maintain proper time
$ sudo aptitude install ntp
Alternately, install ntpdate and run on regular basis (change "M" in the sample crontab to a different, random number, between 0 and 59 of course)
$ sudo aptitude install ntpdate
$ sudo crontab -e
CRONTAB:
# m h dom mon dow command
M * * * * ntpdate 0.pool.ntp.org
Install mysql-server for master backend, mysql-client (only) for frontend or slave backend
$ sudo aptitude install mysql-<server|client>
For "public" master backends, change mysql bindings (nota bene - configuring as shown will permit ANYONE with network access to your machine to be able to access your mysql databases; use at your discretion)
$ sudo nano /etc/mysql/my.cnf
my.cnf:
...
bind-address = 0.0.0.0 # you also could be more specific, e.g. 192.168.0.2-192.168.0.255
...
$ sudo /etc/init.d/mysql restart
Install ALSA and test it
$ sudo aptitude install alsa-utils libesd-alsa0
$ sudo amixer | less
Review amixer results to make sure ALSA recognized your card correctly. If not, run alsaconf; see below.
$ sudo alsamixer
Move Master, PCM, (perhaps) Headphone, and (perhaps) Front to an appropriate level (~90%)
$ sudo speaker-test -c2 (tests two channels)
$ sudo speaker-test -c6 (tests six channels, i.e. 5.1)
Running alsaconf should no longer be necessary, but run it if there are any problems.
$ sudo alsaconf
Install capture card drivers if necessary
IVTV (not necessary in lenny):
IVTV and CX18 (e.g. Hauppauge HVR-1600) firmware (needed in lenny):
Install X and test it
$ sudo aptitude install xserver-xorg xbase-clients gdm lxde \
ttf-mscorefonts-installer iceweasel [vnc4server] xvnc4viewer
$ startx
I choose to install a lightweight but complete desktop environment, lxde. There is an alternative which is even more lightweight, if you so choose. See the MythTV wiki for more information (see the installation howto for Debian etch). I will document this more completely at a later point.
Add appropriate users to video, staff (for access to /usr/local), and powerdev groups
$ sudo adduser <user> <audio|video|staff|powerdev>
Install nVidia display drivers, if needed
$ sudo /etc/init.d/gdm stop
$ sudo aptitude install linux-headers-2.6-<486|686|amd64> make
$ cd /usr/bin
$ sudo ln -s gcc-4.1 gcc
$ sudo ln -s gcc cc
$ chmod a+x NV*.run
$ sudo ./NV*.run
Configure splashy
$ sudo splashy_config --info # list available themes
$ sudo splashy_config --set-theme <theme>
$ sudo update-initramfs -u
$ sudo nano /boot/grub/menu.lst
menu.lst:
...
# defoptions=quiet vga=788 splash
...
$ sudo update-grub
$ sudo reboot
Install lirc
$ sudo aptitude install lirc lirc-modules-source module-assistant
$ sudo m-a prepare (or module-assistant prepare)
$ sudo m-a a-i lirc (or module-assistant auto-install lirc)
Add appropriate module to /etc/modules
For PVR 150, skip debian lirc package and use modified source
Check MythTV wiki
http://www.blushingpenguin.com/mark/blog/?p=24
Quick version:
Download patched lirc 0.8.5
$ cd /usr/local/src
$ sudo tar xfj /path/to/lirc-0.8.5-CVS-pvr150.tar.bz2
$ cd lirc*
$ sudo ./setup.sh
Choose 1 Driver configuration -> 5 TV Card -> i Hauppauge PVR-150 TV card (new I2C layer...)
Choose 3 Save configuration & run configure
$ sudo make
$ sudo make install
$ cd contrib
$ sudo cp lirc.debian.new /etc/init.d/lirc
$ sudo update-rc.d lirc defaults
$ cd /usr/lib/hotplug/firmware
Copy PVR150 blaster firmware and IVTV firmware here
Uninstall current ivtv module so it can re-load
$ sudo rmmod ivtv cx25840 tuner tveeprom msp3400 wm8775 tda9887 saa7115 saa7127
$ sudo nano /etc/modules
Add lirc_pvr150 to the file
Test lirc
$ sudo depmod -ae
$ sudo modprobe lirc_<module name>
$ ls -ld /dev/lirc*
$ sudo chgrp video /dev/<lirc|lirc0>
$ cat /dev/<lirc|lirc0>
Should produce characters on the screen when buttons pressed. Press ^C to stop
Place appropriate configuration in /etc/lirc/lircd.conf or /etc/lircd.conf
$ sudo /etc/init.d/lirc restart
$ irw
lircd should recognized remote control buttons when pressed. Press ^C to stop
$ irsend SET_TRANSMITTERS 1 # if necessary
$ irsend SEND_ONCE <keycode>
Will need to modify /etc/lircd.conf to get irsend to work properly
System is ready for mythTV packages. Proceed to Installing MythTV.