MythTV: My Personal Fedora Core How To

(this will be edited over time as things get updated)

This has been put together for my own archive since there is no guarantee that existing How-To’s are going to be available when needed (there was a key point in time when the Wilsonet.com site was down, and I really needed access to the steps).

Background

After fighting with MythTV (posted here), I was determined to just get it right. It became near obsession, and I started driving my wife a little crazy since I spent a couple of hours each night tackling different aspects of MythTV.

However, I must say that it has been worth it. And my wife sees that too, as she sees it a being something that could replace our Directv TiVo.

Also, when I built my system, I attacked it as if it were a “Proof Of Concept”. In other words, I did not get too crazy about the processor type, the filesystem layout, the computer case, or really any of that stuff. I just wanted to build a system that worked. Once I got to the point where everything worked as it should, I figured I would then tackle the other items (like a smaller, nicer, and quieter case). I believe that taking this approach made it easier in that there was a lot less pressure: I didn’t really invest much money in to the project in the beginning, and anything that I did buy I could always re-sell on eBay.
Prereqisits

At the very least, you will need the following:

  • A power supply
  • A hard drive
  • A motherboard
  • A processor (CPU)
  • A video capture card
  • Memory
  • Internet Access
  • A copy of Fedora Core
  • A Computer case capable of holding all of the above equipment.

Components

This is more of an aside, but I thought it was worth mentioning some more details about the individual components.

The computer case I chose was a standard tower case. Yes, it was ugly. The power supply in it was one that I got for free, after rebates, a while back (I bought it as an emergency spare) and it was LOUD. The hard drive was another spare item I had around (a 160GB drive). I had gotten the video card a long while back for very little money, after rebates. I had the motherboard and processor and memory (all pretty cheap after rebates.. I hate rebates!) available as well.

I had most of the stuff because it was being used as a temporary machine for my in-laws during a period of time that they stayed with us.

Anyhow, the point is that I already had most of the stuff. I didn’t want to invest a heck of a lot of money in to building a Myth PVR if the end result was going to be something that I couldn’t sell to my wife. When it all comes down to it, if she didn’t like it, then it was highly unlikely that we would use it. She, in essence, was my customer.

Assembling the System

I pieced together the 400W power supply, the tower computer case, the MachSpeed Viper K8M8MS MicroATX motherboard, the AMD64 Sempron 3000 (Socket 754) processor with stock heatsink and fan, the Ultra DDR400 512MB memory, and the 160GB Maxtor ATA100 Hard drive. I added in an XFX Geforce 6200 fanless video card with S-Video out since I would be testing the install on a standard 27-inch CRT TV.
With it all together, I made sure things powered up and were all properly recognized by the system. Since I know that this will eventually be a system without a mouse or keyboard, I made sure that the BIOS was set to ignore any keyboard related errors.

Installing the OS

Installation of the OS was pretty simple. Although I ended up doing it about 6 times due to testing things with MythTV and breaking things, in truth you should really only have to do it once.

I didn’t bother partitioning the drive. I didn’t see the sense in it. MythTV has it’s own space management logic which removes the worry of it filling the filesystem to full capacity. Besides, I figured that, down the road, I would have all of the recordings on a central server rather than local to any one machine.

I did make sure that I selected:

  • Servers -> Windows File Server
  • Servers -> Network Servers (vnc was selected by default)
  • Servers -> Web Server
  • Servers -> MySQL Database
  • Development -> Development Libraries (recommended!)
  • Development -> Development Tools (recommended)
  • Applications -> Sound and Video
  • Applications -> Graphical Internet

The Wilsonet.com how-to lists KDE as a requirement, and I installed it, but I ran everything under Gnome without any problems (KDE is a bit of a resource hog, IMHO.. not that Gnome is much better).

Keep in mind that this was a “proof of concept” machine, so I wasn’t too concerned about optimizations.

Right after the installation of the OS, when “firstboot” came up, I configured up a “mythtv” user, pointed it to my NTP server, and configured authentication to also go through my LDAP server.

Immediately after updating, I logged in as “root” and ran “yum -y update” to get all of the latest updates to the distribution. This took nearly as long as it did to install the base os!

Install Myth

The best thing to do is to go to Wilsonet.com and follow the instructions there. Aside from downloading all of the updates from the ATrpms site, there are a number of other little gotchas that are covered on that page.

Network Interface Aliases in Solaris

Most of what you will find when searching the net for “solaris network interface alias” or “solaris interface alias” will be ways to create pseudo interfaces such as “hme0:1” or “ce0:1”. This is a well documented feature under Solaris.

However, in my case, we were looking at ways to incorporate other systems in to our RAC cluster. Due to the way that Oracle RAC is designed, the public (primary) interface on all of the systems in the RAC cluster MUST be the same. In other words, they must all be “ce0” or “hme0” or whatever the device name is.

This isn’t really a problem under linux since you can easily define which interface gets to be named “eth0”, but under Solaris, this can be a bit of a problem when you try to incorporate different machine types in to the cluster. Because Solaris assigns an interface name based upon the chipset of the NIC, some systems might have “ce0” (such as on the V480) while others might have “ipge0” (such as on the T2000).

So.. how do you add a machine with a different primary device name in to the cluster? Well, the answer is actually quite simple: create an alias to it. It’s just not the same alias that you get from plumb’ing an interface.

In the /dev tree, simply create a symbolic to the primary interface using the name that you want. For example:

# cd /dev

# ln -s ce public

# ifconfig public0 plumb

# ifconfig public0
public0: flags=1000842<UP,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet 0.0.0.0 netmask 0
ether 0:3:ba:2a:e8:c5

And you are done. You now have an interface called “public0” which is known as your primary interface. Be aware, though, that this will BE DESTROYED if you reboot the system with the “-r” flag as this will force a rebuild of the entire device tree.

Replacing a Failed Disk on a Network Appliance (Netapp)

Replacing a failed disk on any system can be a scary thought, but a lot of technology has been put together on the NetApp to make this as easy and painless as possible.
Without going in to all of the talk about what RAID levels to use and the use of DP (dual parity) disks, there is an easy procedure for replacement. If the disk has not completely failed, you may see messages like:

Disk Inventory Monitor: Dual Loop Configuration WARNING!!!
The system has detected an inconsistency in the device maps
of paired-channels listed below. Review the device maps of
both channels to check for disks which may not be responding
on both A and B device ports.
channels: 0c and 0a.

In this case, you will want to find out what device is failing. Execute :

storage show disk -p

The output will look like:

PRIMARY PORT  SECONDARY PORT SHELF BAY
------- ----  --------- ---- ---------
0a.16    A    0c.16      B     1    0
0c.17    B    0a.17      A     1    1
0c.18    B    0a.18      A     1    2
0c.19    B    0a.19      A     1    3
0a.20    A    0c.20      B     1    4
0a.21    A    0c.21      B     1    5
0c.22    B    0a.22      A     1    6
0c.23    B    0a.23      A     1    7
0c.24    B    0a.24      A     1    8
0c.25    B    0a.25      A     1    9
0c.26    B    0a.26      A     1   10
0c.27    B    0a.27      A     1   11
0c.28    B    0a.28      A     1   12
0c.29    B    0a.29      A     1   13
0c.32    B                     2    0
0c.33    B    0a.33      A     2    1
0a.34    A    0c.34      B     2    2
0a.35    A    0c.35      B     2    3
0a.36    A    0c.36      B     2    4
0a.37    A    0c.37      B     2    5
0a.38    A    0c.38      B     2    6
0a.39    A    0c.39      B     2    7
0a.40    A    0c.40      B     2    8
0a.41    A    0c.41      B     2    9
0a.42    A    0c.42      B     2   10
0a.43    A    0c.43      B     2   11
0c.44    B    0a.44      A     2   12
0c.45    B    0a.45      A     2   13
0d.16    B    0b.16      A     1    0
0b.17    A    0d.17      B     1    1
0d.18    B    0b.18      A     1    2
0b.19    A    0d.19      B     1    3
0b.20    A    0d.20      B     1    4
0b.21    A    0d.21      B     1    5
0d.22    B    0b.22      A     1    6
0d.23    B    0b.23      A     1    7
0b.24    A    0d.24      B     1    8
0d.25    B    0b.25      A     1    9
0b.26    A    0d.26      B     1   10
0d.27    B    0b.27      A     1   11
0d.28    B    0b.28      A     1   12
0d.29    B    0b.29      A     1   13

Notice that disk 0c.32 is only showing up on one channel. That is the one that is causing the problem. Let’s fail the disk over to the spare:

disk replace start 0c.32 0d.29

The system will prompt you with the normal “are you sure” message, and, with the positive response, the system will begin the process of replacing the failing drive and rebuilding the contents on the new drive.

You can monitor the progress with “sysconfig -r”.

Once the reconstruction has completed, you will want to remove the drive. In order to help you properly identify the drive, you can have the RED LED blink on the drive in a consistent manner to make it obvious to the person who will be pulling the drive.

priv set advanced
blink_on 0c.32

priv set admin

If the disk is completely broken and the LED won’t blink, just turn on the RED LED’s on either side of the bad disk. That way, the one in the middle (not blinking) is easy to find and replace.

Now that we are ready to replace the drive, execute:

disk swap

Pull the drive from the system and insert the new drive.

disk swap

And your new drive has been added to the system as a spare. Confirm this with ‘volstatus -r’ or ‘sysconfig -r’.