Home MythTV Download Scripts Projects Screenshots Links Contact

MythTV System Installing MythTV MythTV Setup MythTV Frontends Install DVB-S Inetbox 300s Extra functions Myth with NAS

MythTV - the install on Arch Linux

This guide is how I manage to install and afterwards having a running MythTV Mediecenter on a Arch Linux. This is a really great tool to have in the house - and use all around to end up with a really smart system - that even children kan use without problems. So this guide describes the install of the machines ( or Core and frontends ) in a chapter by it selv. For a short explanation for what is what - look at the setup for more info. A good idea is to put all hardworking ressources into the CORE server - so the more power in the CORE the better result in the end.

CORE: The server that holds the MySQL, Storage, tunercards, etc etc - so put all your money in this machine!!!!

Frontends: Recieve the signal from the CORE server using 1000mbs Network - but also getting the last details - such as sound etc ( Stereo, 5.1, 7.1 etc) and also which kind of TV-signal you'll put into your TV. But not processing the hard part!

But the default install of ArchLinux and packages are allmost the same thing. But you need to start with downloading the latest image from ArchLinux - Direct link are here:

Latest i686 image
latest x86_64 image

Download the image that fit your machines needs. Then you need to make a default install - as described here. I don't want to do that - carse then this guide will be way to long. but this will get you up and running with only the smallest default install, which is all you need. Afterwards the default install - You're ready to go. In my case the CORE server holds 4Harddrive with each 500GB - called sda, sdb, sdc, sdd. For making a lot of things easier, I have made a directory called /storage og 4 subdirectory's - all that are made with these commands:

$ mkdir -p /storage/music
$ mkdir /storage/movies
$ mkdir /storage/records
$ mkdir /storage/pictures

And mount the last 3 harddisc in the most demanding directory's for myth - so added these lines in /etc/fstab:

#######################################
# Ekstra harddisc
#######################################
/dev/sdb1 /storage/music ext3 defaults 0 1
/dev/sdc1 /storage/records ext3 defaults 0 1
/dev/sdd1 /storage/movies ext3 defaults 0 1

Now your discs will be mountet and usefull allready from boot. Since I had decidet to make my system a "Under the stairs" solution, I need a user to make all this happend the rigth way. So making the user:

$ useradd myth (you'll be asked some information - fill out these info - Groups = wheel,optical,audioo,video)
$ chown -R myth.users /storage
$ chmod -R 777 /storage

Now we have the different directory's that we're needing for sharing MythTV across a local network. Now we're ready to install the different packages - starting ouyt with updating the default ArchLinux installation. So:

$ pacman -Syu

You sometimes needing to run this twice (Caurse of updating pacman - the package database manager in ArchLinux) Afterwards the standard installation are updated, we can now begin to install the packages for beeing able to run MythTV Backend on the server. What we need here is:
NFS - PORTMAP - MYSQL - OPENSSH - HWD - APACHE - PHP (evt DHCP - if not in router - or you want to use diskless frontends)
So we need to install those packages on the machine running Masterbackend ( in my case CORE)

$ pacman -Sy nfs-utils portmap -common openssh hwd apache php ntp xorg xf86-video-XXX (where XXX is your graphiccard)

UPDATED130609: After the latest updates from ArchLinux - several services are renamed. Portmap is now called rpcbind and NFS has changed in the Daemons name: nfslock becomes nfs-common and nfsd becomes nfs-server!

Now we're ready to setup our networksharing - since all my system are running on Linux machines I choosed NFSA instead of samba - which makes it quite easy to share the data - just edit the /etc/exports to look like this:

####################################################
# My shared discs for use in my MythTV system
####################################################
/storage/movies 172.16.20.1/24(rw,sync,subtree_check)
/storage/music 172.16.20.1/24(rw,sync,subtree_check)
/storage/pictures 172.16.20.1/24(rw,sync,subtree_check)
/storage/records 172.16.20.1/24(rw,sync,subtree_check)

You'll also have to check that the file /etc/conf.d/nfs has this line - if not - write it in there:

STATD_OPTS="-no-notify"

That's all needed for sharing our network for now. You'll also have to configure your Apache/php to work together. so the php5 module should be loaded. Set up the ntp(timeserver) for being sure that the recording are started at the rigth time,

After installing all these packages, we need to check the hardware out - to be sure that all hardware are detected correctly? Do this:

$ lspci
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1e.2 Multimedia audio controller: Intel Corporation 82801G (ICH7 Family) AC'97 Audio Controller (rev 01)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc RV380 [Radeon X600 (PCIE)]
01:00.1 Display controller: ATI Technologies Inc RV380 [Radeon X600]
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
04:02.0 PCI bridge: Hint Corp HB6 Universal PCI-PCI bridge (non-transparent mode) (rev 11)
05:08.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
05:09.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

As you can see here, all my hardware is detected - if not update the list over the different hardware - with this command:

$ update-pciids

Which is a command that will update all hardware information, ans list the newest one. As you can see from the hardware list - I have a Happauge PVR500 Tunercard in my system, so I'm needed to install the IVTV which is the driver+firmware for most Hauppauge cards. So:

$ pacman -S ivtv-utils
$ depmod -a


Edit the /etc/rc.conf and add ivtv to the list of MODULE=" xxxxxxxx ivtv " and at the same time add sshd and mysqld to the list of DAEMONS

**NOTE - DVB-S Install is quite different - Installguide here **

DAEMONS=(syslog-ng network netfs portmap nfslock nfsd crond mysqld httpd mythbackend sshd)

These are the daemons that are startet at boottime! So since I placed my CORE in the garage - ssh access is a wonderfull thing these days. And at the same time add this line to /etc/hosts.allow, which are the connections we're allowing on our system:

sshd: ALL
nfsd: ALL
portmap: ALL
mountd: ALL
statd: ALL
rquotad: ALL
lockd: ALL
mysqld: ALL
6543: ALL
6544: ALL

Now we need to setup MySQL, so we have the rigth permission and access to the Database. So start up the MySQL database:

$ /etc/rc.d/mysqld start

Start by setting the administrator password to the database:

mysqladmin -u root password <NEWPASSWD>

Now edit the configuration file for MySQL placed in /etc/my.cnf - make sure these 2 lines are exactly like this:

# skip-networking (important with the # in front = ignored
&
log = /var/log/mysqld.log (which makes a logfile for debugging)

Now you're ready to reboot the machine for the first time - and access it through SSH! After rebooting the machine and logging into the shell - you could run a dmesg to see if your Tunercard is loaded properly:

Linux video capture interface: v2.00
ivtv: Start initialization, version 1.0.0
ivtv0: Initializing card #0
ivtv0: Autodetected Hauppauge card (cx23416 based)
ACPI: PCI Interrupt 0000:05:08.0[A] -> GSI 18 (level, low) -> IRQ 21
ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv0: Encoder revision: 0x02060039
tveeprom 0-0050: Hauppauge model 23659, rev D491, serial# 8092776
tveeprom 0-0050: tuner model is Philips FQ1216AME MK4 (idx 91, type 56)
tveeprom 0-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) (eeprom 0x74)
tveeprom 0-0050: second tuner model is Philips TEA5768HL FM Radio (idx 101, type 62)
tveeprom 0-0050: audio processor is CX25843 (idx 37)
tveeprom 0-0050: decoder processor is CX25843 (idx 30)
tveeprom 0-0050: has radio, has no IR receiver, has no IR transmitter
ivtv0: Autodetected WinTV PVR 500 (unit #1)
tuner 0-0043: chip found @ 0x86 (ivtv i2c driver #0)
tda9887 0-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 0-0060: TEA5767 detected.
tuner 0-0060: chip found @ 0xc0 (ivtv i2c driver #0)
tuner 0-0060: type set to 62 (Philips TEA5767HN FM Radio)
tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
tuner 0-0061: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4))
ivtv0: Registered device video0 for encoder MPEG (4 MB)
ivtv0: Registered device video32 for encoder YUV (2 MB)
ivtv0: Registered device vbi0 for encoder VBI (1 MB)
ivtv0: Registered device video24 for encoder PCM audio (1 MB)
ivtv0: Registered device radio0 for encoder radio
ivtv0: Initialized card #0: WinTV PVR 500 (unit #1)
ivtv1: Initializing card #1
ivtv1: Autodetected Hauppauge card (cx23416 based)
ACPI: PCI Interrupt 0000:05:09.0[A] -> GSI 19 (level, low) -> IRQ 23
ivtv1: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv1: Encoder revision: 0x02060039
tuner 1-0043: chip found @ 0x86 (ivtv i2c driver #1)
tda9887 1-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #1)
cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
cx25840 1-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #1)
tveeprom 1-0050: Hauppauge model 23659, rev D491, serial# 8092776
tveeprom 1-0050: tuner model is Philips FQ1216AME MK4 (idx 91, type 56)
tveeprom 1-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) (eeprom 0x74)
tveeprom 1-0050: second tuner model is Philips TEA5768HL FM Radio (idx 101, type 62)
tveeprom 1-0050: audio processor is CX25843 (idx 37)
tveeprom 1-0050: decoder processor is CX25843 (idx 30)
tveeprom 1-0050: has radio, has no IR receiver, has no IR transmitter
ivtv1: Correcting tveeprom data: no radio present on second unit
ivtv1: Autodetected WinTV PVR 500 (unit #2)
tuner 1-0061: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4))
ivtv1: Registered device video1 for encoder MPEG (4 MB)
ivtv1: Registered device video33 for encoder YUV (2 MB)
ivtv1: Registered device vbi1 for encoder VBI (1 MB)
ivtv1: Registered device video25 for encoder PCM audio (1 MB)
ivtv1: Initialized card #1: WinTV PVR 500 (unit #2)
ivtv: End initialization

When you got that one loaded - you're now ready to install all the packages for MythTV installation. For getting the lastest release of MythTV - you need to edit /etc/pacman.conf - and remove the # in front of the line:

Include = /etc/pacman.d/testing

And also uncomment the lines from the different mirrors where you want to get your updates from. The next part is downloading all packages:

$ pacman -Sy mytharchive mythbrowser mythcontrols mythdvd mythflix mythgallery mythgame mythmusic mythnewa mythphone myththemes mythvideo mythweb nuvexport libdvdcss

Those packages are only for use at the Backend - since this is the only machine that should handle the WEBGUI for MythTV, allthough the frontends should have almost the same packages - but not mythweb. The last part you'll need to configure is your Xorg server - In my case I don't need the xorg running on the backend - but still for being able to setup MythTV - I'd to have a xorg server running - so to configure the x-server do:

$ hwd -xa

It'll ask you if you want to safe the file as /etc/X11/xorg.conf - and you should agree on that! to test if it's working - type

$ X

and fix the errors that migth be here (normally none)

Afterwards you're ready to setup MythTV!

----------------------------------------------------------------------------------------------------------

MythTV - From SVN - trunk:

If you want the newest of the newest, you can use MythTV-SVN version, and on ArchLinux its pretty simple to setup. There are packages in AUR and the packages you should use are here: Packages.

Since the problem each time are the update of the different packages to get the same version on each setup(different frontends/backends etc) becaurse you SHALL run with same version number og MythTV and Mythplugins. So instead of manual building and installing the package, I made this script to handle this. Allthough it has 2requirement:

  1. All AUR packages are downloaded and extracted somewhere ( My senario = /root/MYTHTV )
  2. All requirements are fullfilled and installed on the machine!

#!/bin/bash
# This script is made for updating MythTV

echo "Starting updating the differen packages for MythTV"
echo " "
echo "Going to the /root/MYTHTV Dir"
cd /root/MYTHTV/mythtv-svn
echo "Deleting all the old Packages"
rm -rf myth*-svn/myth*.gz

echo " Building MythTV-svn Package"
makepkg --asroot
echo "Installing the new package"
pacman -Uf mythtv-svn*.gz

echo "Building Mythplugins-svn package"
cd ../mythplugins-svn
makepkg --asroot
echo "Installing the new package"
pacman -Uf mythplugins*.gz

echo "Building Myththemes-svn Package"
cd ../myththemes-svn
makepkg --asroot
echo "Installing the new package"
pacman -Uf myththemes*.gz

echo "Building Myththemes-extra-svn Package"
cd ../myththemes-extra-svn
makepkg --asroot
echo "Installing the new package"
pacman -Uf myththemes-extra-*.gz

echo "Update MYTHTV is completed"

# EOF

This will delete all old packages, afterwards update from SVN and install the packages automatickly. Easy nice and quit.

 

   
All written in these pages is made by Per Jørgensen.
Respect the original rigths on pages.
Creative Commons License
Denne værk er licensieret under en Creative Commons Navngivelse-Del på samme vilkår 2.5 Danmark Licens.