User:Mrand

From MythTV Official Wiki
Revision as of 15:57, 10 February 2008 by Mrand (talk | contribs)

Jump to: navigation, search

Prior related experience:

  • Tandy Xenix (1984 to 1989): lived and breathed this daily. Administrator and power user
  • SCO Unix (the original, around 1988-1989): administrator
  • SunOS (1989 - 2000): general user and backup administrator for 1994-1996

I did nearly no work at all with Unix from 2000 through 2007. For New Years 2008, I built up a Ubuntu machine and installed mythTV.

Equipment

  • Video in/capture: Hauppauge WinTV-PVR-USB2 using composite inputs from cable box
  • Video out: VGA to SVIDEO Scan converter: Scan-IT 1024 Pro Plus (which is a relabeled unit made by Averkey)
  • Hard-drive: 2x Western Digital WD7500AAKS 750 GB SATA, each extracted from a mybook external USB exclosure (p/n WDG1U7500N)
  • Processor: E2200 (2.2 GHz) Core 2 Duo (/proc/cpuinfo says 4392.21 bogomips)
  • Motherboard: an el-cheapo (free, actually) ECS 945GCT-M V2.0 uATX, with
    • 82801G (ICH7) chipset: [8086:27cc] (rev 01)
    • 82801 PCI Bridge: [8086:244e] (rev e1)
    • 82945G/GZ Integrated Graphics and memory Controller [8086:2772] (rev 02)
    • Realtek RTL8101E PCI Express Fast Ethernet controller [10ec:8136] (rev 01)

Steps used for install

In the hopes of helping other less experienced people being able to bring up their own system without spending as much time as I had to spend hunting down various items, here is a step by step list of what I used to install:

  1. Grabbed alternate install .iso CD for Ubuntu, because I wanted to do RAID
  2. Installed Ubuntu:
    • Partitioned two drives identically:
      1. XFS for /var, with allocsize set to 512 Meg to reduce fragmentation)
      2. EXT3 for /boot
      3. EXT3 for everything else
    • Set each partition to be RAID 1 protected with its twin on the other drive
    • Set LVM on top of the RAID 1 for each partition except boot
    • Possibly a few other steps I've forgotten
  3. Let Ubuntu update itself
  4. $ apt-get install mythbuntu-desktop
  5. Get VNC working (seems like myth control center should do this when you enable VNC)
    • Add "DisallowTCP=false" to file "/etc/gdm/gdm.conf-custom" so remote vnc will work
    • Uncomment the unset line in ~/.vnc/xstartup
    • chmod 0750 xstartup (may already be that way)
    • add gnome-session& or xfce4-panel & xfwm4
      (KDE isn't installed by default:
  6. Enable mythfilldatabase to run regularly (yet another thing that should be prompted at install and auto configured): "mythfilldatabase Log Path" must be set to a writable filename (ex: /var/log/mythtv/mythfilldatabase.log), not a directory name.
  7. Needed channel changer controller:
    • Hunt for hours to find the name of the serial-port channel changing program for Motorola cable boxes. Finally found it on the Ubuntu website. Turns out that it is: dct-channel.tar.bz2
    • Downloaded it
    • $ apt-get install libc6 (install C compiler - includes libc6-dev)
    • $ tar xjvf dct-channel.tar.bz2
    • $ make
  8. $ apt-get install hddtemp (temperature reading util)
  9. $ apt-get install xfsdump (XFS filesystem Administrative utils) - maybe not needed
  10. Install UPS stuff per security domain writeup:
    • $ apt-get install nut-cgi (UPS monitoring utils)
    • Use useradd or adduser to create users nutdev' and nutsrv'. Put them both in a group called 'nut'.
    • Needum files in /etc/nut, per Linux Lore
  1. Needed newer version of lirc because I have a SMK version of the MCE remote.

Stuff to keep an eye on

  • /var/log is where all the logs are kept
  • vaapi, to be available in libva, may lower the power consumption and increase playback speed and quality. Someday. Hopefully sooner than later.


If When there's a problem...

  • I've removed "quiet" from the kernel line of /boot/grub/menu.lst
  • If there are major boot troubles, you can remove the word "splash" from the kernel line as well

VFS: busy inode on changed media

If you make the mistake of ejecting with the button on the front of your CD/DVD drive, the OS may be unable to unmount it and will flood /var/log/messages (the System Log) with "VFS: busy inodes on changed media." Solution is to let the apps eject the disk. But if you forget:

  1. $sudo eject
  2. Let it eject and then push the button on your drive to pull the empty CD tray back in.
  3. sudo eject -t (wasn't even necessary for me)


SQL/database corruption

Happens most often when a reboot without graceful shutdown occurs:

/etc/myth/mysql.txt contains all the important details (username and password). Interesting log files:

  • /var/log/mysql/mysql.log
  • /var/log/mysql/mysql.err

I have a script that I've created:

$ less cleandatabase.sh
echo '/etc/init.d/mythtv-backend stop'
/etc/init.d/mythtv-backend stop

echo '/etc/init.d/mysql stop'
/etc/init.d/mysql stop

echo 'check/fix database corruption'
echo 'cd /var/lib/mysql/mythconverg'
cd /var/lib/mysql/mythconverg
echo 'myisamchk -f -r *.MYI'
myisamchk -f -r *.MYI

echo '/etc/init.d/mysql start'
/etc/init.d/mysql start
echo '/etc/init.d/mythtv-backend start'
/etc/init.d/mythtv-backend start


boot problems

sudo apt-get install bootchart

will install a program which will create a .png image showing you the process time during boot