|
|
Index: HomeMythTV Tips page.
$Id: Myth Tv Tips.izu,v 1.6 2007-02-22 05:34:46 ralf Exp $
This page contains information I found useful when creating my own MythTV box. MythTV let's you create your own PVR using standard PC hardware.
Related link: What is MythTV
Now most of the stuff presented here are things I gathered on the net by searching. I list it here because it's useful to me in case I want to reinstall the box. And incidentally you may find some answers here. Maybe. Who knows.
I'm no Linux Guru. So if you have a question related to MythTV or Linux and there answer is not here, don't email me about it. Instead try to search web forums.
In this section I maintain a pot-pourri of links. These will generally be referenced later below in context.
MythTV:
KnoppMyth:
Hardware:
myth-setupmythfrontendmythfilldatabaseToggleWebSecurity.sh -mythwebAs root:
/etc/init.d/mythtv-backendnetcardconfig
I had been thinking about building my own PVR at home using MythTV for quite a while.
Unfortunately the MythTV install is quite scary. There are tons of libs involved to build MythTV and it requires a serious bit of Linux knowledge to install it from scratch. It also involves knowledge of whatever hardware you have and is compatible or not.
If you are lazy or not so knowledged in Linux or both as I am, a better way to go is to select a Linux distro that comes with MythTV all installed for you. You'll still have some minimal configuration to do but you'll mostly get something usable in a matter of minutes rather than hours or days.
In my case what did it is KnoppMyth|http://mysettopbox.tv/knoppmyth.html], a customized version of Knoppix for MythTV. I heard about it from a friend but in retrospect it's mentionned right in the MythTV QuickStart.
KnoppMyth has one document, the Pamphlet, that you actually want to read. It's not too long and it's worth it.
The version I tried is KnoppMyth R5E50. It's based on Knoppix and features a 2.6.18-chw-13 kernel. Knoppix is a debian-based distro and since I'm familliar with this it works for me.
Ideally you want to dedicate a full box to MythTV. However before doing so I wanted to validate that KnoppMyth was going to work for me. My desktop PC has an Hauppauge Win-TV PVR 150 in it, so it was perfect. I did not have a free hard disk to use though in the box. I thought for a moment about moving stuff around and resizing one of the existing HD but that sounded tricky and annoying. Instead I realized I had a SATA drive that I could spare (I was using it for in-manu redundant backups and the 300 GB NTFS partition on it had just died recently, simply giving me a BSOD when trying to mount the drive. Great deal!)
Note that KnoppMyth (supposedly) installs by default on /dev/hda (i.e. master
on IDE 0). To install on a SATA you need to do the "manual install" as described
in the pamphlet chapter 12. My manual, they
just mean you have to manually format & partition the drive yourself and then there's
a special configuration file to invoke prior to installation. This was straightforward:
In my case I end up using this partition scheme:
root@mythtv:~# fdisk /dev/sda Command (m for help): p Disk /dev/sda: 300.0 GB, 300090728448 bytes 255 heads, 63 sectors/track, 36483 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 622 4996183+ 83 Linux /dev/sda2 623 871 2000092+ 82 Linux swap / Solaris /dev/sda3 872 36483 286053390 83 Linux
Note that 280 GB of space gives me about 120 hours of recording in normal quality. Obviously you want journalling (i.e. ext3fs) on that big 280 GB partition unless you like to wait 15~20 minutes during fsck at boot time.
The installer formatted /dev/sda1 with ext3 for me. I had already done it but
obiously it wasn't necessary.
Side note: When I first tried to boot the KnoppMyth RE50 CD, it would boot and
sound after it would write a message stating "cannot find /knoppix/blah/module".
I turned out the ISO I had downloaded was OK (use md5sum to check it) but
for some reason the burn had failed. Burning it on another CD-RW solved it.
So end-in-end with the CD being fixed I got KnoppMyth running in a matter of minutes. The install was pretty fast. Once I removed the box and it rebooted, Linux booted, recognized my Hauppauge and booted X11 where I was presented with the MythTV setup stuff. Since I didn't really know what to configure there I left most settings intact.
After that I played with MythTV and noticed two things:
See next section.
The first time KnoppMyth runs, it displays configuration settings for
MythTV. You can run this configuration at any time later but invoking
mythtv-setup from an Xterm.
In restrospect, I was missing two things in my initial setup:
OK so quite frankly all this was described in KnoppMyth's Pamphlet in the Configuration section. Of course I didn't read it. So I'll summarize and let you read the details for yourself:
Note that you run mythtv-setup again later, when you exit the setup,
it says you must run mythfilldatabase. Do so.
If you're a total rookie, here's how (how come you read that far then? :-p):
mythfilldatabasemythfrontend to go to the real MythTV stuff.
One of the good things is that by today's standards I do not need anything powerful for MythTV.
To summarize this is what I use:
I already had an Hauppauge Win-TV PVR 150, all I need is a PSU, a CPU, a mobo, some RAM and a video card. I have all the rest, including a 300 GB SATA Drive.
I want this PC to be silent so the main goal is to get an XClio 450 BL for the PSU (I have one in the linux server and its nearly silent and cheaper than a SeaSonic.)
For the CPU, I'm in luck, the minimum these days is an Ahtlon 64 3200+ which comes in 90 nm and I don't want to overclock it so it shouldn't be too hot.
For the video I selected a [GeForce 6200 TC|http://www.nvidia.com/page/geforce6200_pci.html] with 128 MB -- first because I like the fact it doesn't have a fan, and to display 1024x768 it's just fine. Also I read lots of good comments in MythTV forums -- people use it to display HDTV, heck I just need NSTC on my old 19' RCA!). And finally it's the cheapest stuff you can find in PCI-E.
Add an ASUS A8V-E SE and 512 MB of Corsair DDR 400 and we're done.
I just finished installing all that yesterday and I'm really satisfied. If it were not for the front led I'd hardly know the PC is turned on -- The ASUS A8V-E has a Q-Fan thingy that automatically reduces the CPU fan speed. And contrary to the Epox crap I got last time, this works right out of the box with no pesky fan on the southbridge nor dying onboard LAN (note that I am equally satisfied with the ABIT NF8-V2 I got for the server.)
Now getting the TV output working was a bit harder. For starters, I had the SVideo cable connected on the PVR 150 (which is an input!) instead of the GeForce 6200. Double doh :-) After using the right output, I was able to see the TV in text mode but not when running X11.
There's an nvidia-settings application that was installed by KnoppMyth yet I
couldn't find anything related to TV out in there. There's also a binary called
nvtv which would persit in giving me an error:
# nvtv Fatal: No supported video card found.
I read a lot of stuff online about using the proprietary nVidia driver and
configuring different screens/monitors in /etc/X11/xorg.com but none of that
stuff worked.
Eventually I downloaded the latest proprietary nVidia Linux driver but then I had another issue: first it would refuse to do anything when X11 was running and second even when I managed to kill X11 it complained about a missing ''precompiled kernel interface" for my kernel.
OK failing to be able to stop X11 sounds really lame. How hard can it be to kill
the damn process once root? Well hard when it auto-respawns like crazy :-)
I couldn't find anything to stop in /etc/init.d/, for example no gdm and
although there's an xsession in there it changed nothing.
After discussing with MM, I found out that the trick is that KnoppMyth does it
in /etc/inittab. They have this line at the very end:
c7:2345:respawn:/usr/bin/openvt -fwc 6 -- /bin/su - mythtv -c /usr/bin/startx >& /dev/null
Even going single-user mode with telinit 1 didn't stop X. Pretty peculiar,
which sounds like a bug since it's not targetted to run level 1.
Anyhow the simple solution, if not brutal, is to comment out the line and restart. Voila, no X11 auto-starting when you don't want to.
Now the trick to get the nVidia driver to install is actually finely described in the KnoppMythWiki on the nVidiaSetup page. Heck I wasted many hours on that one when the solution was written right there. I'll summarise it here for me, I recommend you go read the wiki and get all the glory details:
mkdir /t ; cd /t wget ftp://knoppmyth.net/R5/linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb dpkg -i linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb cd /usr/src tar xjvf linux-source<tab> cd /usr/src/linux-headers-2.6.18-chw-13 cp -r . ../linux-source-2.6.18-chw-13 cd /usr/src rm linux ln -s /usr/src/linux-source-2.6.18-chw-13 linux cd /usr/src/linux-source-2.6.18-chw-13 make # <--- Ctrl-C it after a few seconds cd /t sh NVIDIA-Linux-x86-1.0-9746-pkg1.run --expert --kernel-source-path=/usr/src/linux
So the summary is that you need the kernel source, which this ISO of KnoppMyth
doesn't provide by default. The kernel is a 2.6.18-chw-13 and the
corresponding source is not in APT (it's only up to chw-11 at the time I
write this.) However ftp://knoppmyth.net/R5 has the correct linux-source DEB
and it just needs to be installed. Once that is done you need to
"patch" it to match the existing linux-headers that are in /usr/src (thus
the recursive copy.) Then you want to start a make of the kernel source just
so that it creates some local config files, so let it run for a few second and
abort it. The only difference with the wiki page is that I like to recreate a
/usr/src/linux link onto the source tree. Finally I like to run the nVidia
script in --expert mode so I can see all what it is doing.
OK not exactly obvious but it only takes a few minutes to do.
Finally I just started X using
su - mythtv -c /usr/bin/startxand found out that the
nvidia-settings application in the X menu had been
updated. Now it had all the options for my card, including full configuration of
the TV out feature and voila :-)
Oh and don't forget the uncomment the line in /etc/inittab when all works.
So to recap I now have a good MythTV install:
Now I only have a few minor things to sort out namely:
When you install KnoppMyth, out of the box you get 3 users:
In my case I used the same dumb password for all three. Since I was doing a temporary test, it was OK. But for the real box at the end I'll need to provide 3 different passwords.
There are some things that you need to be aware.
By default you can remotely login as root in ssh. That's bad. Never do that.
Edit /etc/ssh/sshd_config and set PermitRootLogin to no.
Then do /etc/init.d/ssh restart.
By default NFS is installed and running. YMMV but I consider NFS has a
security risk. It starts automatically. Use update-rc.d to change that or
use apt-get remove to get rid of it. YMMV.
So I have a Linksys WMP11, it's a wireless 802.11b card in PCI. Worked just fine in Windows, now how do I make it work in Linux?
First apparently it got recognized by KnoppMyth (I see a wlan0 mentionned
at boot time.) I probably need to configure the WEP key somewhere, oh and maybe
the SSID of my network. That might help.
So let's. Installed by default I have the wireless-tools package the linux-wlan-ng package and the ndiswrapper packages. Yes no less than 3 packages for wireless cards. Now let's go figure out which one can use this card.
My strategy is to first see what's available out there on the web and then decide which package may be the most appropriate, then try to understand the said package. But first I must know what I really have. The name on the box is just not enough.
So first what does lspci says?
# lspci 00:0b.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset (rev 01)
But in fact I want the numeric IDs:
# lspci -nn 00:0b.0 Network controller [0280]: Intersil Corporation Prism 2.5 Wavelan chipset [1260:3873] (rev 01)
The PCI ID is 1260:3873 and I'll need that when looking at some supported hardware lists.
So from the ndiswrapper > Wiki > List this specific version of the Linksys WMP11 is not listed. OK so one less package.
Oh yeah because I forgot to mention that although the name on the card is "Linksys WMP11", there's no less that 4 revisions of this card, all this different chipsets! Yeah. Great. And in my case it turns out I have the "v1" (initial) revision.
Next let's see the linux-wlan-ng hardware compatibility list, and here we have a winner. The card is listed. So we'll start with this.
Oh let's backtrack a bit. If you browse the site of the wireless-tools you will notice this little gem, the Linux Wireless LAN Howto That's a huge list of what's out there.
My card isn't listed by name but thankfully I know it's a Prism 2.5 chipset so the 3.6 Intersil PrismII based cards (the most common 802.11b cards) seems most relevant. I there I have it, it tells me to use linux-wlan-ng
# cd /etc/wlan # cp wlancfg-DEFAULT wlancfg-myssidname # vim wlancfg-myssidname lnxreq_hostWEPEncrypt=true lnxreq_hostWEPDecrypt=true dot11PrivacyInvoked=true dot11WEPDefaultKeyID=0 dot11WEPDefaultKey0=01:02:03:04:05:06:07:08:09:0a:0b:0c:0d AuthType="sharedkey"
# vim /etc/modutils/linux-wlan-ng
alias wlan0 prism2_pci # update-modules # cp /usr/share/doc/linux-wlan-ng/examples/rc.wlan /etc/init.d/wlan # cd /tmp
# linux-wlan-ng-build-firmware-deb # dpkg -i linux-wlan-ng-firmware-files_0.2.5-2_all.deb
|
|

This work is licensed by Raphaël Moll under a Creative Commons License.
|
|
| Color Theme: | Gray | Blue | Black | Sand | Khaki | Egg | None |
|
|
|
|