[mythtv-users] Debian Package docs

Dennis Lou dlou99 at yahoo.com
Mon May 5 17:31:24 EDT 2003


A few weeks ago, I said I'd turn my Debian package
notes
into documentation.  Well, since then I got bogged
down
in some issues while trying to upgrade the hardware
(details in a separate email).  After getting through
that, I spent the last week with Ray doing the
rewrite, so here it is for review.  Questions? 
Comments?


-Dennis

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com-------------- next part --------------

Step 1: Install Debian Woody on your system.

If you have a decent network connection, the simplest way to install Debian 
Woody is over it (and since this is the only practial way to install and 
use MythTV, we will assume here that you have a good network connection). 
Start by creating either a set of bootdisks or a "netinst" CD image. Get 
them or it from http://www.debian.org/distrib/netinst and use them or it to 
start the install process.

For the most part, setting up a Debian-Woody system to run MythTV is like 
setting up any Debian system.  If the disk installer is not sufficient to 
guide you, consult the instructional material available through 
www.debian.org.  However, a few special considerations apply.

IP address:

The installer offers you the option of getting the host's IP address via 
DHCP assignment. How you get the address depends, of course, on the 
particular circumstances of the network conenction available to you. But 
consider that some uses of MythTV, such as MythWeb, work better if the host 
has a static IP address. So decide accordingly. (After installation, you 
can always change the address setup by editing /etc/network/interfaces, 
then restarting networking or rebooting.)

Timezone:

MythTV relies on the system keeping accurate time, and that includes 
knowing its correct timezone. The installer will prompt you to set this up, 
so this comment just emphasies the increased importance of a standard part 
of the install process.

Non-root user account:

The installer will prompt you to create a "normal user" account. While this 
is normally an important step to include, the MythTV installer itself 
creates the "mythtv" userid, so manual creation of an ordinary user is 
unnecessary, though harmless.

Package installation:

When the installer prompts you to specify an archive access method, choose 
"http" (the special arrangements for installing MythTV itself, covered in a 
later section, require this method).

When you reach the point in the install process where it asks you if you want to 
select packages to install ("tasksel" or "dselect"), choose "no"
so that the installer will install only the core packages. In a 
later step, you will use Debian's "apt" tools to install both MythTV and 
the other packages it needs to run properly.

Step 2: Updating the Kernel 

Login as root and run "apt-get install kernel-image-2.4.16-686" 

At some point, the install script will warn you about an initrd line in lilo.conf and ask you if you want to stop.  Hit alt-F2 and login as root. Edit /etc/lilo.conf and below the line that reads 'image=vmlinuz' add (with a leading tab): 

initrd=/initrd.img 

Save /etc/lilo.conf and edit /etc/modules.  Add in your TV tuner drivers.  If your card
uses a BT8x8 chip, this usually means adding "bttv".
If your card is not of the autodetecting variety, use "bttv card=x" where x is the
card number listed at http://bt848x.sourceforge.net/config.en.html
Some cards may also need the "tuner=" specification.

Exit out of this shell and hit alt-F1 to go back to the kernel image install.  Type 'n' to not stop and continue with the kernel upgrade.  Reboot. 


Step 3: Install Support Software 

Login as root and add the following lines to /etc/apt/sources.list 

deb http://dijkstra.csh.rit.edu:8088/~mdz/debian woody mythtv 
deb http://dijkstra.csh.rit.edu:8088/~mdz/debian woody lame 
deb http://cedar-solutions.com/ftp/debian stable main 

Run "apt-get update" then "apt-get install mysql-server" and when asked, specify mysql
to start on boot.  Edit /etc/mysql/my.cnf.  Comment out line 41, "skip-networking", by adding a '#' to the front.  Run "/etc/init.d/mysql restart" to restart the MySQL server. 

Run "apt-get install xawtv alsa-utils alsa-modules-2.4.16-686 hdparm blackbox lame xmltv" 

Go to http://www.alsa-project.org/alsa-doc/ and find the module installation instructions for your sound card. A version less than 0.9.0beta11 is installed so be sure to use
snd-card-xxxx instead of snd-xxxx e.g.

modprobe snd-card-es1938;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss 

To load ALSA automatically on boot, look in the same alsa docs on how to create /etc/modutils/alsa and run update-modules.

Run "chmod o+rw /dev/video* /dev/vbi* /dev/dsp* /dev/mixer*" to make the TV tuner
card and sound card readable and writable by all.  Also run "mkdir /dev/sound".  If you are running an IDE hard drive, run "hdparm -d /dev/hd?" to check if DMA mode is turned on.
If it is not, run "hdparm -d1 /dev/hd?" and add this command to rc.boot
(replace ? with the letter of your hard drive, e.g. /dev/hda)

Run "tasksel", select 'X Window System' and type 'f' to finish.  Back at the shell, run "startx".  If X doesn't start, run "dpkg-reconfigure xserver-xfree86" and reconfigure X.   

Step 4: Testing 

Open an xterm and run xawtv.  Right click xawtv, configure the tuner and tune in a station. If you have problem opening or tuning, re-install the bttv driver by doing "modprobe -r bttv" and "modprobe bttv card=x tuner=y" using different values of 'x' and 'y' for card and/or tuner.  Open another xterm and run alsamixer.  Open a third xterm and run
"aplay /dev/dsp", then follow the mixer setting procedure in http://www.mythtv.org/docs/mythtv-HOWTO-7.html#ss7.2 and http://www.mythtv.org/docs/mythtv-HOWTO-18.html#ss18.11

After you are done, hit ESC to quit alsamixer, then quit out of everything else and run "alsactl store".  

Step 5: Install MythTV 

As root, run "apt-get install mythtv".  When prompted by the install script, set mysql host to "localhost", mysql-admin account to "root" and leave mysql-admin account password blank. The installer will report an error creating /root/.qt.  Ignore this error as it is benign.  Run "passwd mythtv" and set a password for user mythtv.  Log out as root and log in as mythtv.  Start X.  Run "mythtv-setup" and set up MythTV. You may not be used to the UI because it is optimized for infrared remotes.  Use up/down to move fields, left/right to change them, space/return to select and ESC to exit. Be sure to create a new capture card and video source and bind the TV input to the video source. Also, the default location for file storage is /mnt/store and unless this is part of a mounted filesystem, you might want to change it to somewhere else (e.g. /home/mythtv)  Exit mythtv-setup and "su root", then run "/etc/cron.daily/mythtv-backend". This may take a while as it downloads and fills th!
 e database with several days worth of TV guide info.  Be patient and let it run to completion.  While it is doing this, open an xterm and run "mythbackend".  Then open another xterm and run "mythfrontend".  Click "TV", "Setup", then configure the front end.  Be sure to turn de-interlacing off if you don't have an SSE enabled CPU.  After this, you should have a functioning MythTV system. Congratulations! 

Post installation:

Run "apt-get install lirc" to install the necessary packages for using an
infrared remote control then run "dpkg-reconfigure lirc" and reconfigure lirc.
If "MODULES=" field in /etc/lirc/hardware.conf is not empty, then you will
need to compile a kernel module (use "apt-get source lirc-modules-source" to obtain
the source).  Otherwise create or copy the proper 
/etc/lirc/lirc.conf and .lircrc files and run irxevent.  Refer to
www.mythtv.org/docs/mythtv-HOWTO-8.html for more details.


The installer creates ext2 partitions, and they are fine for ordinary 
operation. But fsck'ing a very large (over 20 GB) partition can take a long 
time so on set top box applications, ext2 is something of a nuisance following a 
system crash, power interruption or any boot that follows something 
other than a normal shutdown. To minimize this, consider converting your 
filesystems to one of the available "journaling"  filesystems, such as ext3 
or reiserfs, which recover more quickly in these cases.  For example, you 
convert an ext2 filesystem to ext3 with these two steps:

	tune2fs -j /dev/hd??
		[replace ?? with drive and partition identifiers, e.g., hdc1]
	edit the line for that partition in /etc/fstab, changing the "ext2"
		entry to "ext3,ext2"

You may also want to consider running a clock synchronization
client program that uses NTP (Network Time Protocol) to maintain the accuracy of 
the system's clock.  Go to http://www.eecis.udel.edu/~mills/ntp/servers.html , 
pick out 2 or 3 time servers that you can use and run "apt-get install ntp-simple"
to install a basic NTP configuration.



More information about the mythtv-users mailing list