<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Allen Pomeroy &#187; pvr</title>
	<atom:link href="http://www.pomeroy.us/tag/pvr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pomeroy.us</link>
	<description>IT security thoughts and personal stuff</description>
	<lastBuildDate>Sat, 28 Jan 2012 08:55:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Building a new PVR</title>
		<link>http://www.pomeroy.us/2011/02/building-a-new-pvr/</link>
		<comments>http://www.pomeroy.us/2011/02/building-a-new-pvr/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 21:16:02 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[pvr]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=234</guid>
		<description><![CDATA[&#60;Updated Aug 18, 2011 after a successful PVR rollout&#62; Technology has evolved since the last MythTV PVR I built, as chronicled here.  Here&#8217;s the latest techniques and tech that I&#8217;ve used to (start) build(ing) my current PVR. I&#8217;ll update this article as I go, as there&#8217;s been some bumps along the way, so completion of [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><em><strong>&lt;Updated Aug 18, 2011 after a successful PVR rollout&gt;</strong><br />
</em></p>
<p>Technology has evolved since the last MythTV PVR I built, as chronicled <a href="http://www.networkforensics.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/">here</a>.  Here&#8217;s the latest techniques and tech that I&#8217;ve used to (start) build(ing) my current PVR. I&#8217;ll update this article as I go, as there&#8217;s been some bumps along the way, so completion of the project has been slower than I anticipated.</p>
<p>Requirements for my new PVR include:</p>
<ul>
<li>Linux operating system for cost and flexibility reasons</li>
<li>Quiet! Fan-less operation if at all possible, external power supply ok</li>
<li>Small form factor, black case to fit in with my current home theater gear</li>
<li>Video capture with MPEG-2 hardware acceleration to help keep the CPU needed as small as possible, in an expansion card format for the most compact physical footprint .. additionally there must be at least two independent tuners</li>
<li>Analog tuners, but would be good if they were capable of digital for when I eventually move to digital/HD</li>
<li>IR receiver and transmitter capability for easy remote control and ability of the PVR to use my current set-top box as a source (gives me all the cable company movies and channels that are not available via the basic cable connection</li>
<li>Ability to schedule at least 10 shows and retain 5 episodes of each show .. also ability to schedule based on show name alone</li>
<li>Ability to perform post-recording processing, such as removing commercials or changing formats</li>
<li>Should be able to use a pre-packaged distribution for most if not all of the functions .. I know it&#8217;s a home-brew, but I&#8217;m tired of messing with individual packages, firmware, and custom codes to make it work. Using a distribution package makes it easier to maintain through updates.</li>
<li>Want to purchase the parts from the same supplier if possible (ended up using <a href="http://www.newegg.ca">newegg.ca</a>)</li>
</ul>
<p>Since I already run MythTV, it was an obvious starting point and given I don&#8217;t have an affinity to a specific Linux distribution, I looked at Mythbuntu and Mythdora since I&#8217;m familiar with and already run both Ubuntu and Fedora distributions.</p>
<p>After downloading the Mythbuntu 10.10 ISO disk image, I discovered I didn&#8217;t have my USB DVD drive, so I wanted to create a bootable USB flash disk.  I followed the excellent instructions at <a href="https://help.ubuntu.com/community/Installation/FromUSBStick">https://help.ubuntu.com/community/Installation/FromUSBStick</a> and successfully burned a bootable Mythbuntu disk on a 2GB USB flash disk via a Ubuntu VM running on my MacBook Pro.</p>
<p><a href="http://www.networkforensics.us/wp-content/uploads/2011/01/ISK_QC1.jpg"><img class="alignright size-medium wp-image-238" title="ISK-300-65" src="http://www.networkforensics.us/wp-content/uploads/2011/01/ISK_QC1-300x300.jpg" alt="" width="300" height="300" /></a><strong>The Hardware</strong></p>
<p>The hardware that I chose to use included:</p>
<ul>
<li>An <a title="Antec ISK-300-65" href="http://www.antec.com/pdf/manuals/ISK%20300-65%20Manual_EN.pdf">Antec ISK-300-65</a> case, good for fan-less operation</li>
<li>ASUS AT5IONT-I mainboard dual core Atom D525 CPU</li>
<li>Hauppauge WinPVR-2250 dual tuner PVR card with MPEG-2 hardware acceleration (PCI-express)</li>
<li>4GB DDR3 SO-DIMM memory (2x 2GB)</li>
<li>2x 750GB 2.5&#8243; SATA HDDs</li>
<li>My existing Microsoft MCE USB IR receiver/blaster and remote</li>
</ul>
<p>I evaluated the very cool and potentially high performance hybrid HDD/SSD disks, but there were too many experiences users expressed that were sub-optimal, most stating the technology is too new. Having a terabyte 2.5&#8243; disk with 4GB of SSD would be sweet, but for now I&#8217;m just sticking with 750GB 7200RPM 2.5&#8243; SATA disks. Since I changed my mind and I&#8217;m not going to put a DVD drive into the case, I chose to put another HDD in and mirror them up (since there are two SATA adapters on the mainboard and space in the case for two HDD).</p>
<p>The ASUS mainboard is designed for fan-less operations, and coupled with the Antek case as one massive heat sink, it is incredibly quiet. Video outputs are all handled by the mainboard versus the video capture card and include DVI, HDMI and component video outputs. On initial power on, I was somewhat <a href="http://www.networkforensics.us/wp-content/uploads/2011/02/IMG_1281.jpg"><img class="alignright size-full wp-image-266" title="ISK-rear-view" src="http://www.networkforensics.us/wp-content/uploads/2011/02/IMG_1281.jpg" alt="" width="224" height="300" /></a>underwhelmed, since although the power on button turned on the blue power light on the mainboard, then spun up the disk and fan, no joy on the mainboard BIOS POST. After some Googling, I found the Asus board uses the very finicky Intel memory controller that is used with the Atom CPU. I purchased a pair of KVR1066D3S7/1G (Kingston 1GB 204-Pin DDR3 SO-DIMM DDR3 1066 (PC3 8500) Laptop Memory) to boot the AT5IONT-I far enough to get the BIOS updated. See the forum thread <a href="http://vip.asus.com/forum/view.aspx?SLanguage=en-us&amp;id=20100817160043390&amp;board_id=1&amp;model=AT5IONT-I&amp;page=1&amp;count=33">here</a> for other people&#8217;s experiences. Version 312 of the ASUS BIOS did not support the 2GB DIMMs so I was a bit annoyed that I had to purchase 1GB DIMMs (Kingston KVR1066D3S7/1G) in order to get into the BIOS.  I downloaded the 316 BIOS ROM image from the ASUS website and put it onto a FAT formatted USB memory stick, thinking I&#8217;d have to go through the pain of booting some form of Windows or DOS to run some lame BIOS updater utility. I was pleasantly surprised to find a BIOS update utility built into the BIOS! All I had to do is plug in the USB stick and select the option to update the BIOS. It worked! Not only the most painless BIOS update I&#8217;ve ever done, now the 2GB memory DIMMs work (anyone want to buy my 1GB DIMMs for the cost of shipping?). On to the installation of Mythbuntu.</p>
<p>I originally wanted to have a slim DVD drive to play DVDs but then realized that I don&#8217;t even have any movies on DVD any more.  All the oldie goldies that I had, I now have copies in iTunes. Since the mainboard only supports two SATA interfaces, I chose to reserve one for a future redundant HDD (as it turns out I just ordered the extra disk when I purchased the 1GB DIMMs).</p>
<p>The Hauppauge card is a dual-tuner analog/digital that has an IR receiver and blaster &#8211; so it can change channels on a cable set top box. The 2250 also has dual tuners so that the conflicts that I often encountered with a single tuner can be avoided.  <a href="http://www.networkforensics.us/wp-content/uploads/2011/01/hvr2250.jpg"><img class="alignright size-medium wp-image-241" title="hvr2250" src="http://www.networkforensics.us/wp-content/uploads/2011/01/hvr2250-300x156.jpg" alt="" width="300" height="156" /></a></p>
<p><strong>OS Install</strong></p>
<p>I tried a couple of All-In-One distributions (Mythdora and Mythbuntu) and even a couple of versions of each.  Seemed like I ran into issues with both distros in different areas. Mythbuntu 10.10 wouldn&#8217;t save the Video Sources. Mythdora had a better setup interface than Mythbuntu 10.10, but would not setup a default route for some reason &#8211; all the subsequent updates and package installs would obviously fail.  Sigh. Doing a base install of Fedora 14 then installing from ATrpm repositories would go better for the OS install (including full mdadm mirroring of the two SATA drives), but compiling the Hauppauge HVR 2250 analog driver from Steve Toth&#8217;s excellent support site would fail with usb_ function call mismatch errors. Apparently the usb_ memory function definitions have changed in recent 2.6 kernels. Arrrg!</p>
<blockquote><p><strong><em>Fortunately I set this aside for a while and in the mean time, Mythbuntu came out with release 11.04 &#8230; would it work??</em></strong></p></blockquote>
<p>So now it works for analog .. exactly what I wanted. Ironically I don&#8217;t need the digital tuners for a while yet.</p>
<p><span id="more-234"></span>Here&#8217;s how:</p>
<p>I downloaded Mythbuntu 11.04 64 bit ISO and created bootable USB flashdrive via<br />
<a title="Pen Drive Linux" href="http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3">http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3</a> on my HP notebook (Windows 7). Booted off the USB and selected the Install option. Ultimately I wanted to partition the drives and use mdadm software RAID 1 with LVM2 on top for partition and filesystem management options. No matter how I tried, the Mythbuntu 11.04 installer just would not let me do an install in that configuration. So I did a vanilla install, configured things the way I wanted THEN did a transition to LVM2 mirroring setup.</p>
<p><strong>1. Use USB stick to boot Mythbuntu 11.04 and perform MythTV install</strong><br />
Use the following partition table on /dev/sda with all primary partitions and ignore /dev/sdb for now &#8211; note you&#8217;ll need to use /srv for the MythTV storage fs as those are the mount point options available in the install image. Don&#8217;t worry, we&#8217;ll change it later to /storage and only /dev/sda1 (/boot) will remain after we&#8217;re done the conversion to LVM mirroring.<br />
<code>/dev/sda1 /boot 150MB<br />
/dev/sda2 / 8GB<br />
/dev/sda3 swap 8GB<br />
/dev/sda4 /srv 630GB</code></p>
<p>Once the install is done, change the /srv filesystem to /storage and make it owned by user mythtv then create the storage directories that MythTV will use for LiveTV and Recordings.<br />
<code>umount /srv<br />
vi /etc/fstab (change /srv to /storage)<br />
mkdir /storage<br />
mount /storage<br />
mkdir /storage/livetv<br />
mkdir /storage/recordings<br />
mkdir /storage/db_backups<br />
chown mythtv:mythtv /storage/*</code></p>
<p><strong>2. Compile V4L code</strong><br />
Install tools needed to get and build the code<br />
<code>apt-get install git patch patchutils libproc-processtable-perl gcc make</code></p>
<p>Get the code base and build it &#8211; based on the forum post &#8220;<a href="http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers">How to Obtain, Build and Install V4L-DVB Device Drivers</a>&#8221;<br />
<code>git clone git://linuxtv.org/media_build.git<br />
cd media_build<br />
./build<br />
sudo make install<br />
</code></p>
<p><strong>3. Download HVR 2250 firmware and install in /lib/firmware</strong><br />
<code>wget http://www.steventoth.net/linux/hvr22xx/firmwares/4019072/NXP7164-2010-03-10.1.fw<br />
sudo cp NXP7164-2010-03-10.1.fw /lib/firmware</code></p>
<p>I found that the HVR 2250 card wasn&#8217;t completely recognized even with the firmware in place, as seen in dmesg output .. and no /dev/video* or /dev/dvb/&#8230; devices were created. Googling found a <a href="http://ubuntuforums.org/archive/index.php/t-1526513.html">few forum posts</a> that discuss the issue .. the solution: create /etc/modprobe.d/saa7164.conf and force a card selection.</p>
<p><code>Jun 23 22:17:54 pvr kernel: [10.642158] saa7164 driver loaded<br />
Jun 23 22:17:54 pvr kernel: [10.642321] saa7164 0000:07:00.0: PCI INT A -&gt; GSI 19 (level, low) ...<br />
Jun 23 22:17:54 pvr kernel: [10.643371] saa7164[0]: Your board isn't known (yet) to the driver.<br />
Jun 23 22:17:54 pvr kernel: [10.643376] saa7164[0]: Try to pick one of the existing card configs via<br />
Jun 23 22:17:54 pvr kernel: [10.643380] saa7164[0]: card=&lt;n&gt; insmod option.  Updating to the latest<br />
Jun 23 22:17:54 pvr kernel: [10.643384] saa7164[0]: version might help as well.<br />
Jun 23 22:17:54 pvr kernel: [10.643395] saa7164[0]: Here are valid choices for the card=&lt;n&gt; insmod option:<br />
Jun 23 22:17:54 pvr kernel: [10.643403] saa7164[0]:    card=0 -&gt; Unknown<br />
Jun 23 22:17:54 pvr kernel: [10.643410] saa7164[0]:    card=1 -&gt; Generic Rev2<br />
Jun 23 22:17:54 pvr kernel: [10.643417] saa7164[0]:    card=2 -&gt; Generic Rev3<br />
Jun 23 22:17:54 pvr kernel: [10.643424] saa7164[0]:    card=3 -&gt; Hauppauge WinTV-HVR2250</code></p>
<p>To set a card number option, create a modprobe directive file /etc/modprobe.d/saa7164.conf<br />
<code>options saa7164 card=3</code></p>
<p>Now reboot and watch the dmesg output to ensure the firmware is loaded properly<br />
<code>Aug 18 19:31:29 pvr1 kernel: [24.480644] saa7164 driver loaded<br />
Aug 18 19:31:29 pvr1 kernel: [24.480891] saa7164 0000:07:00.0: PCI INT A -&gt; GSI 19 (level, low) ...<br />
Aug 18 19:31:29 pvr1 kernel: [24.490973] CORE saa7164[0]: subsystem: 0070:8891, board: Hauppauge WinTV-HVR2250 [card=3,insmod option]<br />
Aug 18 19:31:29 pvr1 kernel: [24.490992] saa7164[0]/0: found at 0000:07:00.0, rev: 129, irq: 19, latency: 0, mmio: 0xfb800000<br />
Aug 18 19:31:29 pvr1 kernel: [24.700362] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw)<br />
Aug 18 19:31:29 pvr1 kernel: [27.153217] saa7164_downloadfirmware() firmware read 4019072 bytes.<br />
Aug 18 19:31:29 pvr1 kernel: [27.153227] saa7164_downloadfirmware() firmware loaded.<br />
Aug 18 19:31:29 pvr1 kernel: [27.153257] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072<br />
Aug 18 19:31:29 pvr1 kernel: [27.153269] saa7164_downloadfirmware() FirmwareSize = 0x1fd6<br />
Aug 18 19:31:29 pvr1 kernel: [27.153276] saa7164_downloadfirmware() BSLSize = 0x0<br />
Aug 18 19:31:29 pvr1 kernel: [27.153282] saa7164_downloadfirmware() Reserved = 0x0<br />
Aug 18 19:31:29 pvr1 kernel: [27.153289] saa7164_downloadfirmware() Version = 0x1661c00<br />
Aug 18 19:31:29 pvr1 kernel: [27.304006] Modules linked in: nvidia(P+) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel(+) ir_lirc_codec lirc_dev ir_mce_kbd_decoder ir_sony_decoder snd_hda_codec ir_jvc_decoder snd_hwdep snd_pcm snd_seq_midi rc_rc6_mce psmouse ir_rc6_decoder ir_rc5_decoder mceusb serio_raw snd_rawmidi ir_nec_decoder joydev snd_seq_midi_event rc_core snd_seq saa7164(+) snd_timer snd_seq_device snd xhci_hcd asus_atk0110 dvb_core v4l2_common videodev media v4l2_compat_ioctl32 tveeprom soundcore snd_page_alloc lp parport usbhid hid ahci r8169 libahci<br />
Aug 18 19:31:35 pvr1 kernel: [34.380040] saa7164_downloadimage() Image downloaded, booting...<br />
Aug 18 19:31:35 pvr1 kernel: [34.490037] saa7164_downloadimage() Image booted successfully.<br />
Aug 18 19:31:36 pvr1 kernel: [36.830033] saa7164_downloadimage() Image downloaded, booting...<br />
Aug 18 19:31:38 pvr1 kernel: [38.270702] saa7164_downloadimage() Image booted successfully.<br />
Aug 18 19:31:38 pvr1 kernel: [38.996628] DVB: registering new adapter (saa7164)<br />
Aug 18 19:31:38 pvr1 kernel: [38.999488] saa7164[0]: registered device video0 [mpeg]<br />
Aug 18 19:31:39 pvr1 kernel: [39.231624] saa7164[0]: registered device video1 [mpeg]<br />
Aug 18 19:31:39 pvr1 kernel: [39.443888] saa7164[0]: registered device vbi0 [vbi]<br />
Aug 18 19:31:39 pvr1 kernel: [39.444038] saa7164[0]: registered device vbi1 [vbi]<br />
</code></p>
<p><strong>4. Run MythTV Backend setup, use IVTV MPEG driver and /dev/video0, /dev/video1</strong><a href="http://www.networkforensics.us/wp-content/uploads/2011/02/mythtv-backend-setup1.png"><img class="alignright size-medium wp-image-316" title="mythtv-backend-setup1" src="http://www.networkforensics.us/wp-content/uploads/2011/02/mythtv-backend-setup1-300x228.png" alt="" width="300" height="228" /></a></p>
<p>This configuration will result in the NTSC (analog) tuners to function with MythTV by initializing the tuner as an &#8220;IVTV MPEG-2 Encoder&#8221; defined for /dev/video0 and /dev/video1.</p>
<p><em>&lt;I&#8217;ll post an update here for each of the backend setup steps, but for now follow the setup steps in order starting with General&gt;</em></p>
<p>Under Storage, change the default directories for Recordings, LiveTV and Database Backups to the directories you created in step 1.</p>
<p><strong>5. Setup mail transport agent so we can send status email</strong><br />
<code>apt-get install postfix bsd-mailx</code></p>
<p>Since I locate the PVR behind a firewall on a residential Internet connection, I choose &#8220;Internet connected with Smart (Relay) host&#8221;<br />
<code>shawmail.cg.shawcable.net</code></p>
<p><strong>6. Fix up some of the annoying outstanding problems</strong></p>
<p><strong>Arrow Buttons Repeat</strong></p>
<p>For some reason, the Windows Media Center remote control IR codes are working but arrow button presses cause double movements. Huh? Ok, Google solves it:</p>
<p>MCE remote menu entries skipping twice for every button push<br />
<a href="http://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat">http://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat</a></p>
<p>When navigating the menus in MythTV, it may appear that each time you hit the up or down arrow, that the button his hit twice but if you are using irw, the button only appears to be pressed once. This is likely caused by another kernel module that is attempting to treat the MCE remote as a keyboard. As a test try unloading a few modules<br />
<code>modprobe -r ir_rc6_decoder<br />
modprobe -r rc_rc6_mce<br />
modprobe -r ir_rc5_decoder</code></p>
<p>Since this solved the problem, the post author suggests the following command on system boot (in /etc/rc.local)<br />
<code>echo lirc &gt; /sys/class/rc/rc0/protocols</code></p>
<p><strong>Audio Pauses and Stutters</strong></p>
<p>Turns out the default 4096 buffer size is too small for this system, so I increase it to 16384 (trial and error).</p>
<p>Put these lines in /etc/rc.local:</p>
<p><code># prevent Arrow Button repeat<br />
echo lirc &gt; /sys/class/rc/rc0/protocols<br />
# increase of audio buffer - from 4096 default to 16384<br />
echo 16384 | tee /proc/asound/card0/pcm1p/sub0/prealloc</code></p>
<p><strong>7. Setup the Disk Mirroring</strong></p>
<p>I&#8217;m not going to use mdadm (dang it!) because mdadm (3.1.4) breaks initramfs (<a title="mdadm broken" href="http://ubuntuforums.org/showthread.php?t=1744498">forum posts here</a>). People upgrading Ubuntu to the &#8220;natty&#8221; release experienced this behavior where initramfs could not mount /root. For now I&#8217;ll use LVM2 to do the mirroring of</p>
<p>/<br />
swap<br />
/storage</p>
<p>but /boot will still be a standalone ext4 partition and filesystem on /dev/sda1. For recovery if /dev/sda dies, I&#8217;ll partition /dev/sdb the same and keep /dev/sdb1 in sync with /dev/sda1 &#8211; as well as have grub install a boot loader on both /dev/sda and /dev/sdb.  With the Asus AT5IONT-I mainboard, you can designate which SATA disk is the &#8220;Primary&#8221; and which is the &#8220;Secondary&#8221;. Worst case, if /dev/sda dies the Secondary drive can be manually mapped to the Primary disk (/dev/sda). Whew. A lot of extra work because mdadm is broken!</p>
<p><strong>7.1. Install the lvm2 package</strong></p>
<p><code>apt-get install lvm2</code></p>
<p><strong>7.2. Partition the second drive with the desired end state</strong></p>
<p><code>fdisk /dev/sdb</code></p>
<p>primary partition 1, 150M, <strong>set active</strong>, partition type flags &#8220;83&#8243; (normal Linux fs)<br />
primary partition 2, rest of the disk, partition type flags &#8220;fd&#8221; (Linux logical volume)</p>
<p><strong>7.3. Setup the first LVM partition for pvr on /dev/sdb</strong></p>
<p><code># initialize the LVM volume<br />
pvcreate /dev/sdb2<br />
pvdisplay /dev/sdb2<br />
# create the volume group<br />
vgcreate rootvg /dev/sdb2<br />
# create the logical volumes (with extents from one physical disk)<br />
lvcreate -L 8G -n lv_root rootvg<br />
lvcreate -L 8G -n lv_swap rootvg<br />
lvcreate -L 650G -n lv_storage rootvg</code></p>
<p>This gives us the volumes we&#8217;ll use in our final configuration. Go ahead a get the filesystem contents copied across to the new LVM volumes.</p>
<p><code># create the filesystems<br />
mkfs.ext4 /dev/rootvg/lv_root<br />
mkfs.ext4 /dev/rootvg/lv_storage<br />
mkswap /dev/rootvg/lv_swap<br />
# copy the old fs to new fs<br />
mkdir /mnt/root<br />
mount /dev/rootvg/lv_root /mnt/root<br />
cd /<br />
find . -xdev -print | cpio -pmd /mnt/root<br />
umount /mnt/root<br />
mkdir /mnt/storage<br />
mount /dev/rootvg/lv_storage /mnt/storage<br />
cd /storage<br />
find . -xdev -print | cpio -pmd /mnt/storage<br />
umount /mnt/storage</code></p>
<p><strong>7.4. Update boot configuration to use LVM root volume</strong></p>
<p>Copy the /dev/sda1 /boot filesystem to /dev/sdb1 for a backup in case something goes horribly wrong, you&#8217;ll at least have a starting point to recover.</p>
<p>To update GRUB to use the LVM device, add <code>GRUB_DEVICE=/dev/mapper/rootvg-lv_root</code><br />
to /etc/default/grub and disable the UUID volume label tracking by uncommenting the <code>GRUB_DISABLE_LINUX_UUID=true</code> line.</p>
<p>Update the /boot/grub/grub.cfg by running<br />
<code>cp /boot/grub/grub.cfg /boot/grub/grub.cfg.orig<br />
update-grub -o /boot/grub/grub.cfg</code><br />
You should see update-grub detect the original boot env on /dev/sda1 (/boot) with a root of /dev/sda2 (where we configured /) and you should also see it detect the new root environment on /dev/mapper/rootvg-lv_root.</p>
<p>Then install the grub boot environment on /dev/sda and optionally /dev/sdb. Note /dev/sdb will not have a boot block or env loaded yet, so no worries about having to save what might be there.<br />
<code>grub-install /dev/sda<br />
grub-install /dev/sdb</code></p>
<p>Update the /etc/fstab to swing the filesystems over to the LVM volumes &#8211; update the device specs from their UUID labels to /dev/mapper/rootvg-lv_root, /dev/mapper/rootvg-lv_swap and /dev/mapper/rootvg-lv_storage<br />
<code>cp /etc/fstab /etc/fstab.orig<br />
vi /etc/fstab</code></p>
<p>It should look something like<br />
<code># / was on /dev/sda2 during installation<br />
#UUID=fc0fa1e9-e2b6-4d11-9a51-d3c432bb3137 / ext4 errors=remount-ro 0 1<br />
/dev/mapper/rootvg-lv_root / ext4 errors=remount-ro 0 1<br />
# leave /boot alone<br />
/dev/sda1 /boot ext4 defaults 0 2<br />
# /storage was on /dev/sda4 during installation<br />
#UUID=131514d2-3911-45df-8d6f-b9a19f2379bb /storage ext4 defaults 0 2<br />
/dev/mapper/rootvg-lv_storage /storage ext4 errors=remount-ro 2<br />
# swap was on /dev/sda3 during installation<br />
#UUID=eedc9a3b-d957-4904-988e-32b117def5ac none swap sw 0 0<br />
/dev/mapper/rootvg-lv_swap none swap sw 0 0</code></p>
<p>This is the nail-biting time, now reboot. When GRUB comes up and shows you the boot environments, select the normal boot Ubuntu Linux with the root on /dev/mapper/rootvg-lv_root.</p>
<p><strong>7.5. Extend the LVM to use /dev/sda</strong><br />
Now we&#8217;re running on the LVM volumes on /dev/sdb, we want to reclaim the plain 0&#215;83 Linux filesystem partitions off /dev/sda and add them to the rootvg volume group then extend each logical volume so it has a mirror on /dev/sda.</p>
<p><code># delete /dev/sda2, /dev/sda3, /dev/sda4 partitions<br />
# add /dev/sda2 as the remaining disk, toggle the partition<br />
# type flags to 0xfd (Linux LVM)<br />
fdisk /dev/sda</code></p>
<p>Now clear the first few blocks of /dev/sda2 since it will still have a Linux ext4 filesystem signature on it and we don&#8217;t want to confuse LVM.<br />
<code>dd if=/dev/zero of=/dev/sda2 count=100</code></p>
<p>Extend the volume group to include /dev/sda2 and add a mirror onto each logical volume.</p>
<p><code># initialize the /dev/sda2 partition for LVM<br />
pvcreate /dev/sda2<br />
pvdisplay /dev/sda2<br />
# extend the volume group to include /dev/sda2<br />
vgextend rootvg /dev/sda2<br />
vgdisplay -v<br />
# now extend each logical volume to /dev/sda2<br />
lvconvert -m1 --mirrorlog core /dev/rootvg/lv_root /dev/sda2<br />
lvconvert -m1 --mirrorlog core /dev/rootvg/lv_swap /dev/sda2<br />
lvconvert -m1 --mirrorlog core /dev/rootvg/lv_storage /dev/sda2</code></p>
<p>Let this run for a while, the system will be very busy syncing (re-silvering) the physical extents on /dev/sdb2 to /dev/sda2.</p>
<p>Side note: If something messes up and you need to remove the /dev/sda2 or /dev/sdb2 volume, or if you need to tear down the lvm2 setup (such as to remove or play around with RAID volumes), use</p>
<p><code>lvremove /dev/mapper/rootvg-lv_root<br />
vgremove rootvg<br />
pvremove /dev/sdb2</code></p>
<p>so you don&#8217;t have problems with residual signatures when you try to initialize the LVM volume group an physical devices again.</p>
<p><strong>7.6. Update /boot on /dev/sdb</strong></p>
<p><code>mount /dev/sdb1 /mnt/boot<br />
cd /boot<br />
find . -print | cpio -pvmd /mnt/boot<br />
umount /mnt/boot</code></p>
<p>Now you should be able to boot off either /dev/sda or /dev/sdb.</p>
<p><strong>8. Remaining issues</strong><br />
Despite turning off the screen saver, the HDMI to TV output dims occasionally and I&#8217;m pretty sure it&#8217;s not my Sony Bravia that&#8217;s doing it.</p>
<p>Audio is still a pain in the butt &#8211; I&#8217;m using the analog audio out on the Asus mainboard into a pair of Audio Engine speakers to get audio, since I think the HDMI driver needs to be changed to support audio over HDMI. I&#8217;m using the Open Source video driver instead of the nVidia and I think that&#8217;s the culprit. No time to test it right now though.</p>
<p><strong>Update:</strong><br />
Tried out a LVM volume extend for the /storage filesystem:</p>
<p><code>df -h /storage</code><br />
Filesystem Size Used Avail Use% Mounted on<br />
/dev/mapper/rootvg-lv_storage<br />
669G 70G 565G 11% /storage</p>
<p><code>vgdisplay</code><br />
&#8212; Volume group &#8212;<br />
VG Name rootvg<br />
System ID<br />
Format lvm2<br />
Metadata Areas 2<br />
Metadata Sequence No 11<br />
VG Access read/write<br />
VG Status resizable<br />
MAX LV 0<br />
Cur LV 3<br />
Open LV 3<br />
Max PV 0<br />
Cur PV 2<br />
Act PV 2<br />
VG Size 1.36 TiB<br />
PE Size 4.00 MiB<br />
Total PE 357628<br />
Alloc PE / Size 355728 / 1.36 TiB<br />
Free PE / Size <strong>1900 / 7.42 GiB</strong><br />
VG UUID JwB28k-Eeg6-HNq0-Ghdn-r4db-mNqd-fZWYfG</p>
<p>Since vgdisplay shows we have free space (7GB), issue the <code>lvextend</code> command:<br />
<code>lvextend -L +1G /dev/rootvg/lv_storage</code><br />
Extending 2 mirror images.<br />
Extending logical volume lv_storage to 679.78 GiB<br />
Logical volume lv_storage successfully resized</p>
<p>After extending the logical volume, we can extend the filesystem. We will extend the fs while it&#8217;s mounted, since the current versions of resize2fs allow online extension or shrinkage.</p>
<p><code>resize2fs /dev/mapper/rootvg-lv_storage</code><br />
resize2fs 1.41.14 (22-Dec-2010)<br />
Filesystem at /dev/mapper/rootvg-lv_storage is mounted on /storage; on-line resizing required<br />
old desc_blocks = 43, new_desc_blocks = 43<br />
Performing an on-line resize of /dev/mapper/rootvg-lv_storage to 178200576 (4k) blocks.<br />
The filesystem on /dev/mapper/rootvg-lv_storage is now 178200576 blocks long.</p>
<p>Yay! LVM sure makes fs and volume manipulation easy.</p>
<p><code>df -h /storage</code><br />
Filesystem Size Used Avail Use% Mounted on<br />
/dev/mapper/rootvg-lv_storage<br />
670G 70G 566G 11% /storage</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/02/building-a-new-pvr/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to build a MythTV PVR on Fedora Core 7</title>
		<link>http://www.pomeroy.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/</link>
		<comments>http://www.pomeroy.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/#comments</comments>
		<pubDate>Wed, 27 May 2009 12:46:23 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[pvr]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=76</guid>
		<description><![CDATA[&#60;Notes In Progress &#8211; many of these steps have been automated in scripts, I&#8217;m in the process of updating this doc to show those steps and include the scripts&#62; Fresh install of OS and MythTV on n43 Created 2007/09/05 &#8211; last revised 2008/01/06 I needed to upgrade MythTV to 0.20.2 due to the demise of [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong><font color="#ff6600">&lt;Notes In Progress &#8211; many of these steps have been automated in scripts, I&#8217;m in the process of updating this doc to show those steps and include the scripts&gt;</font></strong></em></p>
<p> <!--   /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{margin:0in; 	margin-bottom:.0001pt; 	font-size:12.0pt; 	font-family:"Times New Roman";} h1 	{margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	page-break-after:avoid; 	font-size:16.0pt; 	font-family:Arial;} h2 	{margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	page-break-after:avoid; 	font-size:14.0pt; 	font-family:Arial; 	font-style:italic;} p.MsoHeader, li.MsoHeader, div.MsoHeader 	{margin:0in; 	margin-bottom:.0001pt; 	font-size:12.0pt; 	font-family:"Times New Roman";} p.MsoFooter, li.MsoFooter, div.MsoFooter 	{margin:0in; 	margin-bottom:.0001pt; 	font-size:12.0pt; 	font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline;} code 	{font-family:"Courier New";} pre 	{margin:0in; 	margin-bottom:.0001pt; 	font-size:10.0pt; 	font-family:"Courier New";}    /* Page Definitions */  @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 	{page:Section1;}   /* List Definitions */  ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} -->
<div class="Section1">
<h1><strong>Fresh install of OS and MythTV on n43</strong></h1>
<p class="MsoNormal">Created 2007/09/05 &#8211; last revised 2008/01/06 </p>
<p>I needed to upgrade MythTV to 0.20.2 due to the demise of Zap2It schedules, but I didn&#8217;t have another system which matched the hardware used on my MythTV PVR.  So I installed a spare 120GB EIDE and started from scratch to build another MythTV instance from scratch.  Once I was satisfied the new instance would pass the SAT (spouse approval test), I used LVM to move everything over to the 320GB SATA disk which currently contains the old (production) MythTV sw and configuration.</p>
<p>This describes that build and migration process. </p>
<p class="MsoNormal"><strong>Hardware (n43):</strong></p>
<p class="MsoNormal">Antec Fusion HTPC case</p>
<p class="MsoNormal"><img src="images/stories/Fusion_new_q.jpg" border="0" alt="antec-fusion" title="Antec Fusion HTPC case" width="160" height="160" /> </p>
<p class="MsoNormal">AMD Sempron processor (about 1.6GHz)<br /> 512MB memory &#8211; good enough for single tuner and OS<br /> Hauppage PVR-350 standard definition capture card</p>
<p>  Integrated on to mainboard:<br /> Audio:<br /> ALC883 PCM nVidia MCP51 controller &#8211; kernel module  snd-hda-intel  (high definition audio)<br /> Video:<br /> nVidia C51 &#8211; Quadro NVS 210S / GeForce 6150LE<br /> nVidia EIDE and SATA controller &#8211; &#8230;  </p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">1.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Install OS</h2>
<p class="MsoNormal"> Seems to be lots of hits on Fedora 7 and MythTV, as well the reading I’ve done on Fedora 7 seems to show it can be easily kept up to date (via <span style="font-family: 'Courier New'">yum</span>) – and it has the OS clustering capabilities as part of the base now, which I’ll use when I split the current single system making it the back end and adding a silent (diskless) front end.</p>
<p class="MsoNormal"> Downloaded and burnt Fedora 7 i386 DVD.  For future options, extracted and burnt boot.iso &#8230; also see notes on how to install Fedora 7 via boot.iso and NFS. (notes to be added)</p>
<p class="MsoNormal"> Disabled SATA hdd in BIOS (could have unplugged it, but easier to just disable via sw). <br /> Used DVD drive in n43 to install Fedora 7 on the temporary EIDE drive.<br /> Select packages for install:<br /> MySQL Server<br /> Web Server</p>
<p> See scripts for automated Fedora 7 OS setup and package install (setup1.shl, setup2.shl) (scripts to be added)</p>
<p>  About 25 min off DVD for base load</p>
<p>  Setup (first time boot):<br /> Firewall &#8211; allow SSH and HTTP, otherwise no inbound services other than ESTABLISHED,RELATED are needed at this point.  Will open MySQL and ICMP for monitoring purposes later.  When this system becomes the MythTV backend, will have to add MythTV ports (see FAQ).<br /> SELinux &#8211; disable, will add SE configuration at some future point.<br /> NTP &#8211; use default Fedora 7 NTP service configuration, time sync is obviously very important (unless you don’t want your recordings to start/end at the right times). </p>
<p class="MsoNormal"> MythTV seems to heavily use KDE, so although Gnome is default, may need to use KDE.  I selected Gnome this time. And KDE this time.  And RatPoison is a compact window manager which may be easier to configure for mythtv. Finally I’m using fvwm2 .. more on that later.</p>
<p class="MsoNormal"> Update /etc/hosts<br /> <span style="font-family: 'Courier New'">192.168.2.143  mythtv.networkforensics.org mythtv n43</span></p>
<p>  Manually set the interface speed/duplex (gigabit interface doesn’t do well in autonegotiate – poor performance, but no interface errors).  Will come back and setup an init script.<br />  <span style="font-size: 10pt; font-family: 'Courier New'"> # ethtool -s eth0 speed 100 duplex full</span></p>
<p>  Add ATrpms repository into yum configuration:<br /> NOTE: other ATrpm yum configurations on the net don’t work!<br /> &#8211; add the following into /etc/yum.conf<br /> <span style="font-size: 10pt; font-family: 'Courier New'"> [atrpms]<br /> name=Fedora Core $releasever &#8211; $basearch &#8211; ATrpms<br /> baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable<br /> gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms<br /> gpgcheck=1</span></p>
<p class="MsoNormal"> Import ATrpms key<br /> <span style="font-size: 10pt; font-family: 'Courier New'"> # rpm &#8211;import <a href="http://atrpms.net/RPM-GPG-KEY.atrpms"> http://ATrpms.net/RPM-GPG-KEY.atrpms</a></span></p>
<p class="MsoNormal"> Disable ATrpms repository, so we only get mythtv packages from it:<br /> &#8211; add the following to the atrpms section just added to the /etc/yum.conf:<br /> <span style="font-size: 10pt; font-family: 'Courier New'">enabled=0</span></p>
<p class="MsoNormal">Update the packages to current using the standard Fedora repositories</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">When following the Fedora / MythTV HOWTO (<a href="http://wilsonet.com/mythtv">http://wilsonet.com/mythtv</a>), they use variable KVER which is just uname -r</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"># echo &#8220;export KVER=\\`uname -r\\`&#8221; &gt;&gt; /etc/profile.d/kver.sh</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Do yum upgrade to get latest kernel and system</p>
<p class="MsoNormal"># yum upgrade</p>
<p class="MsoNormal">464MB 265 packages</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&lt;odd&gt;</p>
<p class="MsoNormal">Kernel panic during reboot after upgrade</p>
<p class="MsoNormal">Searched on “2.6.22 fedora 7 kernel panic noapic” &#8211; lots of suggestions but doing a single boot again, while interrupting the grub boot and adding noapic to the end of the kernel boot line seemed to fix it.  Now the grub.conf looks like (note the vga=791 arg):</p>
<p class="MsoNormal">default=0<br />timeout=5<br />splashimage=(hd0,0)/grub/splash.xpm.gz<br />hiddenmenu<br />title Fedora (2.6.22.4-65.fc7)<br />        root (hd0,0)<br />        kernel /vmlinuz-2.6.22.4-65.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet <strong>vga=791</strong><br />        initrd /initrd-2.6.22.4-65.fc7.img<br />title Fedora (2.6.21-1.3194.fc7)<br />        root (hd0,0)<br />        kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet <strong>vga=791</strong><br />        initrd /initrd-2.6.21-1.3194.fc7.img </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add window manager fvwm here – comes from Fed<br />
ora repo</p>
<p class="MsoNormal"># yum install fvwm2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">2.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>No mouse cursor in Gnome</h2>
<p class="MsoNormal">Seems the nVidia graphics are broken somehow.  Must disable hardware cursor?</p>
<p class="MsoNormal">&nbsp;</p>
<p style="margin-bottom: 12pt" class="MsoNormal">&lt;URL&gt;</p>
<p style="margin-bottom: 12pt" class="MsoNormal">ok add this line to your xorg.conf</p>
<p> Option &#8220;HWCursor&#8221; &#8220;off&#8221;</p>
<p> so it looks something like this</p>
<p class="MsoNormal">Code:</p>
<div style="border: 1pt inset ; padding: 5pt">
<pre style="border: medium none ; padding: 0in">Section "Device"</pre>
<pre style="border: medium none ; padding: 0in">  BoardName    "GeForce 6600/GeForce 6600 GT"</pre>
<pre style="border: medium none ; padding: 0in">  BusID        "1:0:0"</pre>
<pre style="border: medium none ; padding: 0in">  Driver       "nvidia"</pre>
<pre style="border: medium none ; padding: 0in">  Identifier   "Device[0]"</pre>
<pre style="border: medium none ; padding: 0in"><span style="color: red">  Option       "HWCursor" "off"</span></pre>
<pre style="border: medium none ; padding: 0in">  Screen       0</pre>
<pre style="border: medium none ; padding: 0in">  VendorName   "NVidia"</pre>
<pre style="border: medium none ; padding: 0in">EndSection</pre>
</div>
<p class="MsoNormal"> logged out from Gnome, causes an X restart then the mouse cursor showed up properly.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">3.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Set Monitor and Resolution</h2>
<p class="MsoNormal">In gnome, I manually set the monitor, it could not autodetect the Viewsonic Optiquest V75.  Restarted X, had to set the resolution (it defaulted to way too high of a setting)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">HOLD:</p>
<p class="MsoNormal">As per Fedora MythTV setup guide, install the nVidia drivers:</p>
<p class="MsoNormal"># yum -y install nvidia-graphics9755-kmdl-$KVER<br /> # yum -y install nvidia-graphics9755-libs nvidia-graphics9755</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Actually, this is done now by copying in a revised xorg.conf</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">[root@mythtv grub]# cat /etc/X11/xorg.conf.1024&#215;768-monitor-only-V75-BEST</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># Xorg configuration created by system-config-display<br />Section &#8220;ServerLayout&#8221;<br /> Identifier     &#8220;single head configuration&#8221;<br />         Screen      0  &#8220;Screen0&#8243; 0 0<br />         InputDevice    &#8220;Keyboard0&#8243; &#8220;CoreKeyboard&#8221;<br />EndSection<br />Section &#8220;InputDevice&#8221;<br /> Identifier  &#8220;Keyboard0&#8243;<br />         Driver      &#8220;kbd&#8221;<br />         #Option     &#8220;XkbModel&#8221; &#8220;pc105&#8243;<br />         Option      &#8220;XkbModel&#8221; &#8220;pc101&#8243;<br />         Option      &#8220;XkbLayout&#8221; &#8220;us&#8221;<br />EndSection<br />Section &#8220;Monitor&#8221;<br />  Identifier   &#8220;Monitor0&#8243;<br />         ModelName    &#8220;Monitor 1280&#215;1024&#8243;<br />         HorizSync    31.5 &#8211; 79.0<br />        VertRefresh  50.0 &#8211; 90.0<br /> Option      &#8220;dpms&#8221;<br />EndSection<br />Section &#8220;Device&#8221;<br />  Identifier  &#8220;Videocard0&#8243;<br />  Driver      &#8220;nv&#8221;<br />  Option      &#8220;HWCursor&#8221; &#8220;off&#8221;<br />EndSection<br />Section &#8220;Screen&#8221;<br />  Identifier &#8220;Screen0&#8243;<br />  Device     &#8220;Videocard0&#8243;<br />         Monitor    &#8220;Monitor0&#8243;<br />         DefaultDepth     24<br />         SubSection &#8220;Display&#8221;<br />                   Viewport   0 0<br />                   Depth     24<br />                   Modes    &#8220;1024&#215;768&#8243; &#8220;800&#215;600&#8243; &#8220;720&#215;400&#8243; &#8220;640&#215;480&#8243; &#8220;640&#215;400&#8243; &#8220;640&#215;350&#8243;<br />  EndSubSection<br />EndSection<br /></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"><br /></span></p>
<h2><span style="font-size: 10pt; font-family: 'Courier New'">
<p class="MsoNormal">Turn off screen saver </p>
<p></span></h2>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">
<p class="MsoNormal">Disable unnecessary services</p>
<p class="MsoNormal">services=&#8221;avahi pcps bluetooth&#8221;<br />for service in $services; do chkconfig $service off; service $service stop; done</p>
<p>avahi – DNS service discovery<br />pcps – smart card daemon<br />bluetooth</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">4.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Set mysql to start on boot</h2>
<p class="MsoNormal">chkconfig mysqld on</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">5.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Start up MySQL</h2>
<p class="MsoNormal">service mysqld start</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">6.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Set MySQL root password</h2>
<p class="MsoNormal">mysql –uroot</p>
<p class="MsoNormal">mysql&gt; grant all on *.* to root@localhost identified by “rootpassword” with grant option;</p>
<p class="MsoNormal">mysql&gt; grant all on *.* to root@n43 identified by ‘rootpassword’ with grant option;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">7.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Create MythTV database</h2>
<p class="MsoNormal">Test out mysql connection, user, password</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># mysql -uroot  -prootpassword </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">mysql&gt; </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Run MythTV database setup</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># mysql -uroot  -prootpassword  &lt; /usr/share/mythtv/sql/mc.sql</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">/usr/share/mythtv/sql/mc.sql:<br /><span style="font-size: 10pt; font-family: 'Courier New'">CREATE DATABASE if not exists mythconverg;<br />GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY &#8220;mythtv&#8221;;<br />FLUSH PRIVILEGES;<br />GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost<br /> IDENTIFIED BY &#8220;mythtv&#8221;;<br />FLUSH PRIVILEGES;<br />ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;</span></p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">8.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">    </span>Install MythTV Suite</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"># yum &#8211;enable=atrpms install mythtv-suite</p>
<p class="MsoNormal">122 packages, 105MB</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Create directory for recordings</p>
<p class="MsoNormal"># mkdir /storage/recordings</p>
<p class="MsoNormal"># chown mythtv:mythtv /storage/recordings</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">9.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none"><br />
    </span>Install ivtv drivers and firmware for PVR-350</h2>
<p class="MsoNormal"># yum &#8211;enable=atrpms install ivtv-firmware<br /> # yum &#8211;enable=atrpms install ivtv-kmdl-$KVER</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">10.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">           </span>Update modprobe.conf to enable TV Out on PVR-350</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"># load ivtv-fb for PVR-350 output<br /> install ivtv /sbin/modprobe &#8211;ignore-install ivtv; /sbin/modprobe ivtv-fb</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Manually load ivtv</p>
<p class="MsoNormal"># /sbin/depmod -a<br /> # /sbin/modprobe ivtv</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Manually tried to load ivtv-fb – segfaulted … see the part of the howto on modifying grub boot loader…</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">We&#8217;re going to make little modification to the kernel boot line in your grub.conf file that should force the ivtv frame buffer to load on /dev/fb1, as well as allow the ivtv-fb module to be loaded and unloaded. Without doing this, unloading the ivtv-fb module would probably crash your system. <strong>To the end of all &#8216;kernel /vmlinuz&#8230;&#8217; lines in /boot/grub/grub.conf, append &#8216;vga=791&#8242;, then reboot your system.</strong> This tells the kernel to load a frame buffer for your video card at 1024&#215;768, 16-bit color. I use this all the time myself, simply so I can see more when I&#8217;m not in X. I&#8217;d always done this on my 350-equipped box without even thinking about it, which could explain some of why I&#8217;ve not run into some of the problems other folks have&#8230;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Note video device:</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">[root@mythtv ~]# ls -l /dev/video*</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">lrwxrwxrwx 1 root root      6 2007-09-09 18:17 /dev/video -&gt; video0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">crw&#8212;&#8212;- 1 root root 81,  0 2007-09-09 18:17 /dev/video0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">crw&#8212;&#8212;- 1 root root 81, 16 2007-09-09 18:17 /dev/video16</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">crw&#8212;&#8212;- 1 root root 81, 24 2007-09-09 18:17 /dev/video24</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">crw&#8212;&#8212;- 1 root root 81, 32 2007-09-09 18:17 /dev/video32</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">crw&#8212;&#8212;- 1 root root 81, 48 2007-09-09 18:17 /dev/video48</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">[root@mythtv ~]#</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">From dmesg:</p>
<p class="MsoNormal">ivtv0: Registered device video0 for encoder MPEG (4 MB)</p>
<p class="MsoNormal">ivtv0: Registered device video32 for encoder YUV (2 MB)</p>
<p class="MsoNormal">ivtv0: Registered device vbi0 for encoder VBI (1 MB)</p>
<p class="MsoNormal">ivtv0: Registered device video24 for encoder PCM audio (1 MB)</p>
<p class="MsoNormal">ivtv0: Registered device radio0 for encoder radio</p>
<p class="MsoNormal">ivtv0: Registered device video16 for decoder MPEG (1 MB)</p>
<p class="MsoNormal">ivtv0: Registered device vbi8 for decoder VBI (1 MB)</p>
<p class="MsoNormal">ivtv0: Registered device vbi16 for decoder VOUT</p>
<p class="MsoNormal">ivtv0: Registered device video48 for decoder YUV (1 MB)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">11.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">           </span>Test out PVR-350 TV Out</h2>
<p class="MsoNormal">As per <a href="https://help.ubuntu.com/community/MythTV_Edgy_hardware_pvr-350_TV-out">https://help.ubuntu.com/community/MythTV_Edgy_hardware_pvr-350_TV-out</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Try to display the TV test pattern by putting the saa7127 module into test mode:</p>
<pre># /sbin/rmmod saa7127</pre>
<pre># /sbin/modprobe saa7127 test_image=1</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Works!</p>
<p class="MsoNormal">Resume normal operation:</p>
<pre># rmmod saa7127</pre>
<pre># modprobe saa7127</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Test video capture</p>
<p class="MsoNormal"># /usr/bin/v4l2-ctl -i 0</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">12.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">           </span>Manually compile ivtv module for X</h2>
<p class="MsoNormal">Had to manually compile ivtv driver for x to enable tv out .. due to some 2.6.22 issue.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">As per README in ivtv x driver package – must install xorg sdk to allow compile:</p>
<p class="MsoNormal"># yum install xorg-x11-server-sdk</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Then compile the new ivtv xdriver:</p>
<p class="MsoNormal"># sh ./configure</p>
<p class="MsoNormal"># make</p>
<p class="MsoNormal"># make install</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Copy into xorg directory:</p>
<p class="MsoNormal"># cp /usr/local/lib/xorg/modules/drivers/ivtv_drv.so  /usr/lib/xorg/modules/drivers</p>
<p class="MsoNormal">if gdm failed, ps -ef , then kill it to restart</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">copy in new xorg.conf (with TV Out section) and do  &lt;ctrl&gt;&lt;alt&gt;&lt;backspace&gt; to restart x server</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">[root@mythtv ~]# cat /etc/X11/xorg.conf.tvout</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># XFree86 4 configuration created by pyxf86config</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;ServerLayout&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier     &#8220;Default Layout&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Screen      0  &#8220;Screen0&#8243; 0 0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        InputDevice    &#8220;Mouse0&#8243; &#8220;CorePointer&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        InputDevice    &#8220;Keyboard0&#8243; &#8220;CoreKeyboard&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;Files&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># RgbPath is the location of the RGB database.  Note, this is the name of the</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># file minus the extension (like &#8220;.txt&#8221; or &#8220;.db&#8221;).  There is normally</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># no need to change the default.</span></p>
<p class="MsoNormal"><span style=<br />
"font-size: 10pt; font-family: 'Courier New'"># Multiple FontPath entries are allowed (they are concatenated together)</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># By default, Red Hat 6.0 and later now use a font server independent of</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># the X server to render fonts.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        RgbPath      &#8220;/usr/X11R6/lib/X11/rgb&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#        ModulePath   &#8220;/usr/X11R6/lib/modules/extensions/nvidia&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#        ModulePath   &#8220;/usr/X11R6/lib/modules/extensions&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#        ModulePath   &#8220;/usr/X11R6/lib/modules&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        FontPath     &#8220;unix/:7100&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;Module&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;dbe&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;extmod&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;fbdevhw&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;glx&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;record&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;freetype&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Load  &#8220;type1&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;InputDevice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># Specify which keyboard LEDs can be user-controlled (eg, with xset(1))</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;Xleds&#8221;         &#8220;1 2 3&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># To disable the XKEYBOARD extension, uncomment XkbDisable.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbDisable&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># To customise the XKB settings to suit your keyboard, modify the</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># lines below (which are the defaults).  For example, for a non-U.S.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># keyboard, you will probably want to use:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbModel&#8221;      &#8220;pc102&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># If you have a US Microsoft Natural keyboard, you can use:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbModel&#8221;      &#8220;microsoft&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># Then to change the language, change the Layout setting.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># For example, a german layout can be obtained with:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbLayout&#8221;     &#8220;de&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># or:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbLayout&#8221;     &#8220;de&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbVariant&#8221;    &#8220;nodeadkeys&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># If you&#8217;d like to switch the positions of your capslock and</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># control keys, use:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbOptions&#8221;    &#8220;ctrl:swapcaps&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># Or if you just want both to be control, use:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#       Option  &#8220;XkbOptions&#8221;    &#8220;ctrl:nocaps&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">#</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;Keyboard0&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Driver      &#8220;keyboard&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;XkbRules&#8221; &#8220;xfree86&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        #Option      &#8220;XkbModel&#8221; &#8220;pc105&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;XkbModel&#8221; &#8220;pc101&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;XkbLayout&#8221; &#8220;us&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;InputDevice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;Mouse0&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Driver      &#8220;mouse&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Protocol&#8221; &#8220;IMPS/2&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Device&#8221; &#8220;/dev/input/mice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;ZAxisMapping&#8221; &#8220;4 5&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Emulate3Buttons&#8221; &#8220;no&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;InputDevice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># If the normal CorePointer mouse is not a USB mouse then</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># this input device can be used in AlwaysCore mode to let you</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"># also use USB mice at the same time.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;DevInputMice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Driver      &#8220;mouse&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Protocol&#8221; &#8220;IMPS/2&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Device&#8221; &#8220;/dev/input/mice&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;ZAxisMapping&#8221; &#8220;4 5&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;Emulate3Buttons&#8221; &#8220;no&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;Monitor&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;NTSC Monitor&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        HorizSync  30-68</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        VertRefresh 50-120</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Mode &#8220;720&#215;480&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          # D: 34.563 MHz, H: 37.244 kHz, V: 73.897 Hz</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          DotClock 34.564</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          HTimings 720 752 840 928</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          VTimings 480 484 488 504</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          Flags    &#8220;-HSync&#8221; &#8220;-VSync&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        EndMode</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;Device&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;Hauppauge PVR 350 iTVC15 Framebuffer&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        #Driver      &#8220;ivtvdev&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        # 2007/09/09 ACP &#8211; changed to ivtv</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Driver      &#8220;ivtv&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        ### change fb1 to whatever your card grabbed</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;fbdev&#8221; &#8220;/dev/fb1&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Option      &#8220;ivtv&#8221; &#8220;/dev/fb1&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        ### change the BusID to whatever is reported by lspci,</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        ### converted from hex to decimal</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        BusID &#8220;PCI:4:6:0&#8243; # lspci says 00:08.0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        ### More examples</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        #BusID &#8220;PCI:0:10:0&#8243; # lspci says 00:0a.0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        #BusID &#8220;PCI:1:14:0&#8243; # lspci says 01:0e.0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        #BusID &#8220;PCI:0:5:1&#8243; # lspci says 00:05.1</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;Screen&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Identifier  &#8220;Screen0&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Device      &#8220;Hauppauge PVR 350 iTVC15 Framebuffer&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Monitor     &#8220;NTSC Monitor&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        DefaultDepth 24</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        DefaultFbbpp 32</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Subsection &#8220;Display&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          Depth 24</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          FbBpp 32</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">          Modes &#8220;720&#215;480&#8243;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        EndSubsection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">Section &#8220;DRI&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Group        0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">        Mode         0666</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">EndSection</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2 style="margin-left: 0.25in; text-indent: -0.25in">13.<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none">           </span>Run mythtv-setup </h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Blank menu ..</p>
<p class="MsoNormal">Check out <a href="http://www.gossamer-threads.com/lists/mythtv/users/286856">http://www.gossamer-threads.com/lists/mythtv/users/286856</a></p>
<p class="MsoNormal">I found this simple set of directions to add in a base set of true</p>
<p class="MsoNormal">type fonts (which includes Ariel) to Fedora 7 and it solved the problem.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">1. Open a Terminal and cd to a directory you can work in</p>
<p class="MsoNormal">2. Become root</p>
<p class="MsoNormal">3. Download the MS Core Fonts Smart Package File</p>
<p class="MsoNormal">wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec</p>
<p cl<br />
ass="MsoNormal">4. Make sure that the rpm-build and cabextract packages are installed</p>
<p class="MsoNormal">yum install rpm-build cabextract</p>
<p class="MsoNormal">5. Build the Core Fonts package:</p>
<p class="MsoNormal">rpmbuild -ba msttcorefonts-2.0-1.spec</p>
<p class="MsoNormal">6. Install the Core Fonts package</p>
<p class="MsoNormal">rpm -Uvh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The web site I found this one was: <a href="http://www.fedorafaq.org/#installfonts">http://www.fedorafaq.org/#installfonts</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Sign in as mythtv</p>
<p class="MsoNormal">$ mythtv-setup</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Setup Video Capture cards, listing source, channel setup</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">$ mythfilldatabase</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Setup remote control</h2>
<p class="MsoNormal">Go get the LIRC packages from ATrpms</p>
<p class="MsoNormal"># yum &#8211;enable=atrpms install lirc-0.8.3</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">And get the kernel modules:</p>
<p class="MsoNormal"># yum &#8211;enable=atrpms install lirc-kmdl-2.6.22.4-65.fc7-0.8.3-70_cvs20070827.fc7</p>
<p class="MsoNormal">resulted in:</p>
<p class="MsoNormal">Installed: lirc-kmdl-2.6.22.4-65.fc7.i686 0:0.8.3-70_cvs20070827.fc7</p>
<p class="MsoNormal">Dependency Installed: lirc-devices.noarch 0:0.8-4.fc7</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Manual test:</p>
<p class="MsoNormal"># modprobe lirc_mceusb2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Update modprobe.conf to load LIRC</p>
<p class="MsoNormal">…</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">/dev/lirc was symlinked to /dev/lirc/0 (which is the PVR-350 …) so re-linked to /dev/lirc/1 and restarted lircd </p>
<p class="MsoNormal"># service lircd restart</p>
<p class="MsoNormal">then irw showed button presses!</p>
<p class="MsoNormal">Updated /etc/init.d/lircd to relink the /dev/lirc symlink to /dev/lirc/1</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Get MythTV to use remote:</p>
<p class="MsoNormal">Copy lircrc file into ~mythtv/.mythtv/lircrc and ~mythtv/lircrc  (no dots)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Install lirc kernel modules</p>
<p class="MsoNormal">NO yum &#8211;enable atrpms install lirc-kmdl-2.6.22.4-65.fc7</p>
<p class="MsoNormal">Had to uninstall all the modules I installed then re-install lirc 0.8.3 from atrpms</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Page on the Microsoft MCE remote:  <a href="http://www.mythtv.org/wiki/index.php/MCE_Remote">http://www.mythtv.org/wiki/index.php/MCE_Remote</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Setup (tune) screen size</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Overscan (image off the screen)</p>
<p class="MsoNormal"><a href="http://www.mythtv.org/wiki/index.php/Overscan">http://www.mythtv.org/wiki/index.php/Overscan</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">on Toshiba tv (pixels):</p>
<p class="MsoNormal">width  632</p>
<p class="MsoNormal">height  436</p>
<p class="MsoNormal">GUI x offset  36</p>
<p class="MsoNormal">GUI y offset  16</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Setup auto-login, auto-start of mythfrontend</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">URL <a href="http://www.mythtv.org/wiki/index.php/Frontend_Auto_Login">http://www.mythtv.org/wiki/index.php/Frontend_Auto_Login</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Tried ratpoison, Gnome and KDE – ratpoison I couldn’t get working without troubleshooting and Gnome and KDE are too heavy weight.   fvwm works well, although the font sizes are a bit small – haven’t found where to adjust them yet.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Use fvwm window manager:</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add to inittab:</p>
<pre>c7:12345:respawn:/sbin/mingetty --autologin=mythtv tty7</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">~mythtv/.bash_profile</p>
<pre>if [ -z "$DISPLAY" ] &#038;&#038; [ $(tty) == /dev/tty7 ]; then</pre>
<pre>while [ 1 == 1 ]</pre>
<pre>     do</pre>
<pre>          startx</pre>
<pre>          sleep 10</pre>
<pre>     done</pre>
<pre>fi</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">HOLD</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Use ratpoison window manager:</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add to inittab:</p>
<pre>c7:12345:respawn:/sbin/mingetty --autologin=mythtv tty7</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">~mythtv/.bash_profile</p>
<pre>if [ -z "$DISPLAY" ] &#038;&#038; [ $(tty) == /dev/tty7 ]; then</pre>
<pre>while [ 1 == 1 ]</pre>
<pre>     do</pre>
<pre>          startx</pre>
<pre>          sleep 10</pre>
<pre>     done</pre>
<pre>fi</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">.xinitrc:</p>
<pre>xset -dpms s off</pre>
<pre>xsetroot -solid black</pre>
<pre>ratpoison &#038;</pre>
<pre>x11vnc -many -q -bg -rfbauth .vnc/passwd</pre>
<pre>mythfrontend &gt; /home/mythtv/mythfrontend.log 2&gt;&#038;1</pre>
<pre>for i in 5 4 3 2 1 ; do</pre>
<pre>  if [ -f mythfrontend.log.$i ]; then</pre>
<pre>    mv -f mythfrontend.log.$i  mythfrontend.log.$(($i + 1))</pre>
<pre>  fi</pre>
<pre>done</pre>
<pre>mv mythfrontend.log  mythfrontend.log.1</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">.ratpoisonrc:</p>
<pre># This is a sample .ratpoisonrc file</pre>
<pre>#</pre>
<pre># Set the prefix key to that of screen's default</pre>
<pre>escape C-a</pre>
<pre> </pre>
<pre># put something informative on the screen while we load stuff</pre>
<pre>exec xloadimage -onroot -quiet -center /home/mythtv/.mythtv/mythtvstart.jpg</pre>
<pre> </pre>
<pre># Gets rid of that ugly crosshairs default cursor and set the background to black</pre>
<pre>exec xsetroot -cursor_name left_ptr</pre>
<pre> </pre>
<pre># Use the name of the program rather than the title in the window list</pre>
<pre>defwinname name</pre>
<pre> </pre>
<pre>### fire up an xterm with ctrl-A x</pre>
<pre>bind x exec xterm -j -fn '*-courier-*-r-*-14-*'</pre>
<pre> </pre>
<pre># Since running a 720x576 definition the ratpoison screens are too big for the</pre>
<pre># display so we reduce the size of them with defpadding to make them fit</pre>
<pre>#defpadding 25 25 25 25</pre>
<pre> </pre>
<pre>keystate_numlock = enable</pre>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">KDE application file into ~mythtv/.kde/Autostart</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Had to setup desktop for mythtv (all black, no screen saver)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Migrate from 120GB disk back to 320GB SATA</h2>
<p class="MsoNormal">2007/10/20 Fedora 7</p>
<p class="MsoNormal">Use LVM to move the data, including /root, swap and /storage</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">In BIOS, enable SATA drive, position as HDD #2 (120GB IDE as HDD #1)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Boot single user (interrupt grub, select first kernel  &lt;e&gt;dit,  select kernel spec line,  &lt;e&gt;dit, add  “single” on the end of the line,  &lt;b&gt;oot the system (off the old IDE disk)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Display partition table for both drives just to be sure that the 320GB (new) disk is /dev/sbd and the current ‘production’ IDE disk is /dev/sda</p>
<p class="MsoNormal"># fdisk  -l  /dev/sda</p>
<p class="MsoNormal"># fdisk  -l  /dev/sdb</p>
<p class="MsoNormal">&nbsp;</p>
<p c<br />
lass="MsoNormal">Zero out the partition table and MBR on the SATA disk as we had previously installed Fedora 7, and that data will confuse the migration process.</p>
<p class="MsoNormal"># dd  if=/dev/zero   of=/dev/sdb  bs=1024k  count=100</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Partition new disk to add similar partition structure, including LVM partition</p>
<p class="MsoNormal">sdb1  100MB  ext3  /boot  (0&#215;83)</p>
<p class="MsoNormal">sdb2  &lt;the rest&gt;  LVM  (0x8e)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Set the disk bootable (option a)</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">[root@mythtv ~]# fdisk -l /dev/sdb</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Disk /dev/sdb: 250.0 GB, 250059350016 bytes</p>
<p class="MsoNormal">255 heads, 63 sectors/track, 30401 cylinders</p>
<p class="MsoNormal">Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">   Device Boot      Start         End      Blocks   Id  System</p>
<p class="MsoNormal">/dev/sdb1   *           1          13      104391   83  Linux</p>
<p class="MsoNormal">/dev/sdb2              14       30401   244091610   8e  Linux LVM</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Zero out the LVM partition as we had already setup a fresh Fedora 7 install, and the LVM information will still be there (and called VolGroup00, it will confuse LVM on the old IDE disk)</p>
<p class="MsoNormal"># dd  if=/dev/zero   of=/dev/sdb2  bs=1024k  count=100</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Copy the /boot contents across:</p>
<p class="MsoNormal"># mkfs.ext3  /dev/sdb1</p>
<p class="MsoNormal"># mkdir /tmp/new</p>
<p class="MsoNormal"># mount /dev/sdb1 /tmp/new</p>
<p class="MsoNormal"># cd /boot</p>
<p class="MsoNormal"># find . –print | cpio –pmd /tmp/new</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Now update (install) boot loader on new 320GB disk:</p>
<p class="MsoNormal"># mount /dev/sdb1 /tmp/new  (if not still mounted)</p>
<p class="MsoNormal"># mv /tmp/new/grub/device.map /tmp/new/grub/device.map.old</p>
<p class="MsoNormal"># /sbin/grub-install  /dev/sdb</p>
<p class="MsoNormal"># umount /tmp/new</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Label this filesystem as /boot to match /etc/fstab:</p>
<p class="MsoNormal"># e2label  /dev/sdb1  /boot</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Now ‘create’ the new physical volume in LVM and display the pv’s to ensure all’s good:</p>
<p class="MsoNormal"># pvcreate /dev/sdb2<br /> # pvdisplay</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Add the new physical volume into the VolGroup00 volume group</p>
<p class="MsoNormal"># vgextend VolGroup00 /dev/sdb2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Move all the physical extents from the old IDE disk to the new SATA disk (this will tell lvm to move the physical extents from PV /dev/sda2 to some other free physical volume – the only other volume is the SATA disk we just added).  Note this will take a LONG time and will display it’s progress:</p>
<p class="MsoNormal"># pvmove  /dev/sda2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Remove the old disk:</p>
<p class="MsoNormal"># pvremove /dev/sda2</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Power off and disconnect power to the old IDE disk, boot to ensure all comes up ok</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Power off and remove IDE</p>
<p class="MsoNormal">&nbsp;</p>
<h2>HOLD Get firmware for Hauppauge PVR-350</h2>
<p class="MsoNormal"><a href="http://ivtvdriver.org/index.php/Firmware">http://ivtvdriver.org/index.php/Firmware</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Firmware files (Video 4 Linux):</p>
<p class="MsoNormal">v4l-cx2341x-enc.fw</p>
<p class="MsoNormal">v4l-cx2341x-enc.fw</p>
<p class="MsoNormal">v4l-cx2341x-init.mpg</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Place in hot plug directory for ivtv to get and load into the PVR-350 on boot:</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">/lib/firmware/v4l-cx2341x-dec.fw</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">/lib/firmware/v4l-cx2341x-enc.fw</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New'">/lib/firmware/v4l-cx2341x-init.mpg</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Example of missing fw in dmesg:</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv:  ==================== START INIT IVTV ====================</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv:  version 1.0.0 (2.6.22.4-65.fc7 SMP mod_unload 686 4KSTACKS ) loading</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: eth0: forcedeth.c: subsystem: 01462:7252 bound to 0000:00:14.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 19</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ACPI: PCI Interrupt 0000:04:08.0[A] -&gt; Link [LNKA] -&gt; GSI 19 (level, low) -&gt; IRQ 20</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: firewire_ohci: Added fw-ohci device 0000:04:08.0, OHCI version 1.10</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: Autodetected Hauppauge card (cx23415 based)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 18</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ACPI: PCI Interrupt 0000:04:06.0[A] -&gt; Link [LNKC] -&gt; GSI 18 (level, low) -&gt; IRQ 21</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: firewire_core: created new fw device fw0 (0 config rom retries)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: unable to open firmware v4l-cx2341x-enc.fw (must be 376836 bytes)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: did you put the firmware in the hotplug firmware directory?</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: Retry loading firmware</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: unable to open firmware v4l-cx2341x-enc.fw (must be 376836 bytes)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: did you put the firmware in the hotplug firmware directory?</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: Error initializing firmware</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv0: Error -19 on initialization</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Sep  5 16:02:29 mythtv kernel: ivtv:  ====================  END INIT IVTV  ====================</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Example of initialization of fw in dmesg:</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Linux video capture interface: v2.00</span></p>
<p class="MsoNormal"><span<br />
style="font-size: 9pt; font-family: 'Courier New'">ivtv:  ==================== START INIT IVTV ====================</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv:  version 1.0.0 (2.6.22.4-65.fc7 SMP mod_unload 686 4KSTACKS ) loading</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">eth0: forcedeth.c: subsystem: 01462:7252 bound to 0000:00:14.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 19</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt 0000:04:08.0[A] -&gt; Link [LNKA] -&gt; GSI 19 (level, low) -&gt; IRQ 20</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">firewire_ohci: Added fw-ohci device 0000:04:08.0, OHCI version 1.10</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Autodetected Hauppauge card (cx23415 based)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 18</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt 0000:04:06.0[A] -&gt; Link [LNKC] -&gt; GSI 18 (level, low) -&gt; IRQ 21</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">firewire_core: created new fw device fw0 (0 config rom retries)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: loaded v4l-cx2341x-enc.fw firmware (3730290280 bytes)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: loaded v4l-cx2341x-dec.fw firmware (3730290288 bytes)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Encoder revision: 0&#215;02060039</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Decoder revision: 0&#215;02020023</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: Hauppauge model 48132, rev K268, serial# 9868627</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: tuner model is LG TAPE H001F MK3 (idx 68, type 47)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: TV standards NTSC(M) (eeprom 0&#215;08)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: audio processor is MSP4448 (idx 27)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: decoder processor is SAA7115 (idx 19)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Autodetected Hauppauge WinTV PVR-350</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tuner 2-0043: chip found @ 0&#215;86 (ivtv i2c driver #0)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tda9887 2-0043: tda988[5/6/7] found @ 0&#215;43 (tuner)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #0)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">saa7115 2-0021: saa7115 found (1f7115d0e100000) @ 0&#215;42 (ivtv i2c driver #0)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">saa7127 2-0044: saa7129 found @ 0&#215;88 (ivtv i2c driver #0)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">msp3400 2-0040: MSP4448G-A2 found @ 0&#215;80 (ivtv i2c driver #0)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">msp3400 2-0040: MSP4448G-A2 supports radio, mode is autodetect and autoselect</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">tuner 2-0061: type set to 47 (LG NTSC (TAPE series))</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device video0 for encoder MPEG (4 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device video32 for encoder YUV (2 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device vbi0 for encoder VBI (1 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device video24 for encoder PCM audio (1 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device radio0 for encoder radio</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device video16 for decoder MPEG (1 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device vbi8 for decoder VBI (1 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device vbi16 for decoder VOUT</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Registered device video48 for decoder YUV (1 MB)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: loaded v4l-cx2341x-init.mpg firmware (3730291512 bytes)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv0: Initialized Hauppauge WinTV PVR-350, card #0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt Link [LAZA] enabled at IRQ 22</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ACPI: PCI Interrupt 0000:00:10.1[B] -&gt; Link [LAZA] -&gt; GSI 22 (level, low) -&gt; IRQ 18</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">PCI: Setting latency timer of device 0000:00:10.1 to 64</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">ivtv:  ====================  END INIT IVTV  ====================</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">As per <a href="http://wilsonet.com/mythtv/fcmyth.php?SID&#038;expandables=closed&#038;ivtv=open&#038;pvr350out=open%23capture">http://wilsonet.com/mythtv/fcmyth.php?SID&#038;expandables=closed&#038;ivtv=open&#038;pvr350out=open#capture</a>:</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Alternatively, use yum to install from the ATrpms repository</p>
<p class="MsoNormal"># yum install ivtv-firmware</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Get DVD libraries</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Download from ATrpms:</p>
<p class="MsoNormal">libdvdcss-1.2.9-3.fc7.i386.rpm</p>
<p class="MsoNormal"># rpm &#8211;install libdvdcss-1.2.9-3.fc7.i386.rpm</p>
<p class="MsoNormal">&nbsp;</p>
<p>  </span></p>
</div>
<hr /> Vendors for PVR computing parts in Canada:<br /><span class="postbody">As a convenience to the Canadian members of our community, I&#8217;d like to start a list of retailers that sell harder-to-find components. </p>
<p> <span style="font-weight: bold">New Type: </span><a class="postlink" href="http://www.ntcw.com" target="_blank">www.ntcw.com</a>  <span style="font-style: italic">&#8211; Zalman, Thermalright, Swiftech, Vantec, Alpha, Seasonic, Nexus</span> <span style="color: purple">updated Mar 23 03</span> <br /> <span style="font-weight: bold">RP Electronics: </span><a class="postlink" href="http://www.rpelectronics.com" target="_blank">www.rpelectronics.com</a>  <span style="font-style: italic">&#8211; DIY Electronic supplies</span> <br /> <span style=<br />
"font-weight: bold">Digikey: </span><a class="postlink" href="http://canada.digikey.com" target="_blank">http://canada.digikey.com</a> <span style="font-style: italic">&#8211; DIY Electronics, Panaflo, etc</span> <br /> <span style="font-weight: bold">E-Compuvision: </span><a class="postlink" href="http://www.e-compuvision.com" target="_blank">www.e-compuvision.com</a>  <span style="font-style: italic">&#8211; Vantec, Alpha, Swiftech, Zalman</span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Bigfoot: </span><a class="postlink" href="http://www.bigfootcomputers.com" target="_blank">www.bigfootcomputers.com</a>  <span style="font-style: italic">&#8211; Thermalright, Panaflo, Swiftech, Zalman, Alpha &#038; more</span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Tweakbox: </span><a class="postlink" href="http://www.tweakbox.com" target="_blank">www.tweakbox.com</a>   <span style="font-style: italic">&#8211; Panaflo, tails &#038; more</span> <br /> <span style="font-weight: bold">QuietPC: </span><a class="postlink" href="http://www.quietpc.ca" target="_blank">www.quietpc.ca</a> <span style="font-style: italic">&#8211; Fortron, Zalman, Nexus, I-Style, PowerSnooze, VIA, AcoustiPak, Molex, Papst, more</span><span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Maxibyte: </span><a class="postlink" href="http://www.maxibyte.biz/cat4_1.htm" target="_blank">www.maxibyte.biz/cat4_1.htm</a> <span style="font-style: italic">&#8211; Zalman, Q-Technology, Papst</span> <br /> <span style="font-weight: bold">MutePC: </span><a class="postlink" href="http://www.mutepc.net" target="_blank">www.mutepc.net</a> <span style="font-style: italic">&#8211; Koolance, Zalman, Q-Technology, Papst, Akasa, Molex, <span style="font-weight: bold">Noiseblocker</span></span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Genitech: </span><a class="postlink" href="http://www.genitechcomputers.com/parts-cpu.shtml" target="_blank">www.genitechcomputers.com/parts-cpu.shtml</a> <span style="font-style: italic">&#8211; Zalman</span> <br /> <span style="font-weight: bold">autodeletepro: </span><a class="postlink" href="http://www.adpmods.coml" target="_blank">www.adpmods.coml</a> <span style="font-style: italic">&#8211; Panaflo, Evercool, Thermalright </span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Techniche SilentPC: </span><a class="postlink" href="http://www.silentpc.net" target="_blank">www.silentpc.net</a> <span style="font-style: italic">&#8211; Silent PC retrofitting: Seasonic, Nexus, Thermalright, Panaflo, Zalman, etc.</span> <span style="color: red">added Mar 19 03</span> <br /> <span style="font-weight: bold">NCIX: </span><a class="postlink" href="http://www.ncix.com" target="_blank">www.ncix.com</a> <span style="font-style: italic">&#8211; Zalman, Alpha, ThermalRight, Antec, Papst, Panaflo, Vantec, Ahanix</span> <span style="color: orange">updated Dec 30 03</span> <br /> <span style="font-weight: bold">FrontierPC: </span><a class="postlink" href="http://www.fronet.com" target="_blank">www.fronet.com</a> <span style="font-style: italic">&#8211; Zalman, Thermalright, Evercase, Nexus, Seasonic, NoVibes, Arctic Cooler, Antec, Panaflo, <span style="font-weight: bold"><span style="color: green">Samsung w/8MB buffer</span></span></span>  <span style="color: orange">updated Jan 1 04</span> <br /> <span style="font-weight: bold">Vibe Computers: </span><a class="postlink" href="http://www.vibecomputers.com" target="_blank">www.vibecomputers.com</a> <span style="font-style: italic">&#8211; Thermalright, Zalman, Swiftech, Panaflo, Antec, Papst</span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Memory Express: </span><a class="postlink" href="http://www.memoryexpress.com" target="_blank">www.memoryexpress.com</a> <span style="font-style: italic">&#8211; Panaflo, Samsung, Thermalright, Zalman, Ahanix/Nikao, </span> <span style="color: orange">updated Dec 31 03</span> <br /> <span style="font-weight: bold">Canada Computers: </span><a class="postlink" href="http://www.canadacomputers.com" target="_blank">www.canadacomputers.com</a> <span style="font-style: italic">&#8211; Zalman, Antec, etc.</span> <span style="color: orange">updated Dec 30 03</span> <br /> <span style="font-weight: bold">La centrale informatique: </span><a class="postlink" href="http://www.shoplci.com" target="_blank">www.shoplci.com</a> <span style="font-style: italic">&#8211; Evercase, Antec, Vantec.</span> <span style="color: orange">added Dec 30 03</span> <br /> <span style="font-weight: bold">CIPC: </span><a class="postlink" href="http://www.cipc-info.com" target="_blank">www.cipc-info.com</a> <span style="font-style: italic">&#8211;  Antec, Asaka, Panaflo,Papst, Vantec, Zalman.</span> <span style="color: orange">added Dec 30 03</span> <br /> <span style="font-weight: bold">Lux-Design: </span><a class="postlink" href="http://www.lux-design.com" target="_blank">www.lux-design.com</a> <span style="font-style: italic">&#8211;  Panaflo, Thermalright.</span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">ByteWize: </span><a class="postlink" href="http://www.bytewizecomputers.com" target="_blank">www.bytewizecomputers.com</a> <span style="font-style: italic">&#8211;  Antec, Sparkle, Zalman, Samsung</span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">shopRBC: </span><a class="postlink" href="http://www.shoprbc.com" target="_blank">www.shoprbc.com</a> <span style="font-style: italic">&#8211;  Thermalright, Antec, Zalman, Swiftech, Alpha</span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">Atop Online: </span><a class="postlink" href="http://www.atoponline.com" target="_blank">www.atoponline.com</a> <span style="font-style: italic">&#8211;  Samsung, Zalman </span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">Ajump: </span><a class="postlink" href="http://www.ajump.ca" target="_blank">www.ajump.ca</a> <span style="font-style: italic">&#8211;  Evercase, Ahanix, Antec, Sparkle </span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">myCableShop: </span><a class="postlink" href="http://www.mycableshop.ca" target="_blank">www.mycableshop.ca</a> <span style="font-style: italic">&#8211;   </span> <span style="color: orange">added Dec 31 03</span> <br /> <span style="font-weight: bold">Canadian Tire: </span> <span style="font-style: italic">&#8211; TrimBrite Door Edge Molding (see <a class="postlink" href="http://forums.silentpcreview.com/viewtopic.php?p=58645#58645" target="_blank">this posting</a>)  </span> <span style="color: orange">added Dec 31 03</span> </p>
<p> If I missed anything post a reply to this thread &#038; I&#8217;ll add your updates.</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MythTV FC7 LVM on RAID1 Configuration</title>
		<link>http://www.pomeroy.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/</link>
		<comments>http://www.pomeroy.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:48:38 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[pvr]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.ca/blog/?p=37</guid>
		<description><![CDATA[MythTV PVR HDD Mirroring 2008/07/24 Host: n43 (mythtv) - Two SATA 500GB drives sda sdb - current production drive is sdb Problem: I&#8217;ve done migrations of LVM2 volumes from 320GB SATA to 500GB SATA and added a redundant 500GB SATA. Now I want to get software RAID 1 setup to protect the root, swap and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MythTV PVR HDD Mirroring 2008/07/24</strong><br />
Host: n43 (mythtv)<br />
- Two SATA 500GB drives  sda  sdb<br />
- current production drive is  sdb</p>
<p>Problem:  I&#8217;ve done migrations of LVM2 volumes from 320GB SATA to 500GB SATA and added<br />
a redundant 500GB SATA.  <strong>Now I want to get software RAID 1 setup to protect the<br />
root, swap and /storage filesystems from damage if/when one of the shiny new 500GB SATA<br />
disks bite the dust.</strong></p>
<p>Followed howtoforge.com linux_lvm_p1 (start of article) to free up sda from LVM<br />
volume group VolGroup00 .. http://www.howtoforge.com/linux_lvm_p7</p>
<p><strong>0. Did a file level backup to the fileserver:</strong><br />
[root@n59 20080724]# ssh   <script type="text/javascript"><!--
 &lt;!
 var prefix = '&amp;#109;a' + 'i&amp;#108;' + '&amp;#116;o';
 var path = 'hr' + 'ef' + '=';
 var addy10473 = 'r&amp;#111;&amp;#111;t' + '&amp;#64;';
 addy10473 = addy10473 + '192' + '&amp;#46;' + '168' + '&amp;#46;' + '1' + '&amp;#46;' + '2';
 document.write( '&lt;a ' + path + ''' + prefix + ':' + addy10473 + ''&gt;' );
 document.write( addy10473 );
 document.write( '&lt;/a&gt;' );
 // &gt;n
// --></script><a href="mailto:root@192.168.1.2">root@192.168.1.2</a><script type="text/javascript"><!--
 &lt;!
 document.write( '&lt;span style='display: none;'&gt;' );
 // &gt;</p>
<p>// --></script><span style="display: none;">This e-mail address is being protected from spambots, you need JavaScript enabled to view it  <script type="text/javascript"><!--
 &lt;!
 document.write( '&lt;/' );
 document.write( 'span&gt;' );
 // &gt;</p>
<p>// --></script></span> &#8220;tar cf &#8211; /lib&#8221; | dd of=mythtv-lib.tar<br />
(repeat for /boot /storage /var /etc /home)</p>
<p><strong>1. Free up sda2 LVM volume.  I know this volume is not used anymore,<br />
but it still has same-disk backup of /storage from when I was tweaking<br />
MythTV.</strong></p>
<p>[root@mythtv ~]# pvmove /dev/sda2<br />
[root@mythtv ~]# vgreduce /dev/VolGroup00 /dev/sda2<br />
[root@mythtv ~]# pvremove /dev/sda2</p>
<p>- now running on sdb only -</p>
<p>Setup RAID 1 mirroring (md)<br />
&#8211;<br />
<strong>2. Partition sda for mirroring (Auto RAID label)</strong><br />
[root@mythtv ~]# fdisk /dev/sda<br />
&lt;delete partitions&gt;<br />
&lt;add primary 1 whole disk&gt;<br />
&lt;set flag to fd &#8211; Auto RAID&gt;</p>
<p>[root@mythtv ~]# fdisk -l</p>
<p>Disk /dev/sda: 500.1 GB, 500107862016 bytes<br />
255 heads, 63 sectors/track, 60801 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sda1   *           1          19      152586   83  Linux<br />
/dev/sda2              20       60801   488231415   fd  Linux raid autodetect</p>
<p>Disk /dev/sdb: 500.1 GB, 500107862016 bytes<br />
255 heads, 63 sectors/track, 60801 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1   *           1          19      152586   83  Linux<br />
/dev/sdb2              20       60801   488231415   8e  Linux LVM</p>
<p>Notice that sdb is still using only LVM, not RAID.</p>
<p><strong>3. Setup md devices &#8211; sdb is &#8216;missing&#8217; &#8211; its still in use for LVM so &#8216;missing&#8217;<br />
keyword is used.</strong></p>
<p>[root@mythtv ~]# mdadm &#8211;create /dev/md0 &#8211;auto=yes -l 1 -n 2 /dev/sda2 missing<br />
mdadm: array /dev/md0 started.</p>
<p><strong>4. Prepare new md volume for LVM</strong></p>
<p>[root@mythtv ~]# pvcreate /dev/md0<br />
Physical volume &#8220;/dev/md0&#8243; successfully created</p>
<p><strong>5. Now extend the VolGroup00 vg to include the new md LVM volume</strong></p>
<p>[root@mythtv ~]# vgextend VolGroup00 /dev/md0<br />
Volume group &#8220;VolGroup00&#8243; successfully extended</p>
<p><strong>6. Now move data from /dev/sdb2 to LVM volume md0</strong><br />
[root@mythtv ~]# pvmove /dev/sdb2 /dev/md0</p>
<p>&lt;long time&gt;</p>
<p><strong>7. Now we remove the sdb2 volume from LVM</strong><br />
[root@mythtv ~]# vgreduce VolGroup00 /dev/sdb2<br />
[root@mythtv ~]# pvremove /dev/sdb2</p>
<p><strong>8. Now we format /dev/sdb with fd (Linux RAID autodetect):  (make it sdb1)</strong><br />
Same as sda.<br />
<strong><br />
9. Next add /dev/sdb2 to /dev/md0</strong></p>
<p>[root@mythtv ~]# mdadm &#8211;manage /dev/md0 &#8211;add /dev/sdb2<br />
<strong><br />
10. Now the RAID array will be synchronized. This will take some time, you can check with</strong></p>
<p>[root@mythtv ~]# cat /proc/mdstat</p>
<p><strong>11. Update initrd BEFORE you reboot</strong><br />
If no /etc/mdadm.conf exists, you may choose to create it.  It appears that I needed to<br />
do that AND rebuild my initrd to support LVM on RAID1 during boot.</p>
<p>echo &#8220;DEVICE /dev/hd*[0-9] /dev/sd*[0-9]&#8221; &gt; mdadm.conf<br />
mdadm &#8211;detail &#8211;scan &gt;&gt; mdadm.conf</p>
<p>mkinitrd -f /boot/initrd-`uname -r`.img `uname -r`</p>
<p><strong>12. Copy /boot over to sda &#8211; gets the new initrd (although /dev/sdb1 is still<br />
labeled BOOT, so it is the partition that will be mounted as /boot)<br />
</strong>[root@mythtv ~]# mke2fs /dev/sda1<br />
mke2fs 1.40.2 (12-Jul-2007)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=1024 (log=0)<br />
Fragment size=1024 (log=0)<br />
38152 inodes, 152584 blocks<br />
7629 blocks (5.00%) reserved for the super user<br />
First data block=1<br />
Maximum filesystem blocks=67371008<br />
19 block groups<br />
8192 blocks per group, 8192 fragments per group<br />
2008 inodes per group<br />
Superblock backups stored on blocks:<br />
8193, 24577, 40961, 57345, 73729</p>
<p>Writing inode tables: done<br />
Writing superblocks and filesystem accounting information: done</p>
<p>This filesystem will be automatically checked every 22 mounts or<br />
180 days, whichever comes first.  Use tune2fs -c or -i to override.</p>
<p>[root@mythtv ~]# mkdir /tmp/newboot<br />
[root@mythtv ~]# mount /dev/sda1 /tmp/newboot/<br />
[root@mythtv ~]# cd /boot<br />
[root@mythtv boot]# find . -print | cpio -pvmd /tmp/newboot<br />
/tmp/newboot/./vmlinuz-2.6.22.4-65.fc7<br />
/tmp/newboot/./config-2.6.22.4-65.fc7<br />
/tmp/newboot/./initrd-2.6.21-1.3194.fc7.img<br />
/tmp/newboot/./System.map-2.6.21-1.3194.fc7<br />
/tmp/newboot/./initrd-2.6.22.4-65.fc7.img<br />
/tmp/newboot/./System.map-2.6.22.4-65.fc7<br />
/tmp/newboot/./lost+found<br />
/tmp/newboot/./grub<br />
/tmp/newboot/./grub/device.map.old<br />
/tmp/newboot/./grub/jfs_stage1_5<br />
/tmp/newboot/./grub/device.map<br />
/tmp/newboot/./grub/ufs2_stage1_5<br />
/tmp/newboot/./grub/e2fs_stage1_5<br />
/tmp/newboot/./grub/xfs_stage1_5<br />
/tmp/newboot/./grub/stage2<br />
/tmp/newboot/./grub/splash.xpm.gz<br />
/tmp/newboot/./grub/grub.conf<br />
/tmp/newboot/./grub/fat_stage1_5<br />
/tmp/newboot/./grub/vstafs_stage1_5<br />
/tmp/newboot/./grub/grub.conf.dist<br />
/tmp/newboot/./grub/stage1<br />
/tmp/newboot/./grub/menu.lst<br />
/tmp/newboot/./grub/reiserfs_stage1_5<br />
/tmp/newboot/./grub/iso9660_stage1_5<br />
/tmp/newboot/./grub/minix_stage1_5<br />
/tmp/newboot/./grub/ffs_stage1_5<br />
/tmp/newboot/./config-2.6.21-1.3194.fc7<br />
/tmp/newboot/./vmlinuz-2.6.21-1.3194.fc7<br />
25716 blocks<br />
[root@mythtv boot]# cd /<br />
[root@mythtv /]# umount /tmp/newboot</p>
<p><strong>13. If you&#8217;ve mucked around with the hd ordering in grub, undo it now:</strong><br />
Grub configuration:<br />
# grub<br />
grub&gt; device (hd0) /dev/sda<br />
grub&gt; device (hd1) /dev/sdb<br />
grub&gt; root (hd0,0)<br />
grub&gt; setup (hd0)</p>
<p><strong>14. Reinstall grub to ensure initrd references in grub are updated</strong><br />
[root@mythtv ~]# /sbin/grub-install /dev/sda<br />
[root@mythtv ~]# /sbin/grub-install /dev/sdb</p>
<p>NOTE: I haven&#8217;t taken this to the fall back filesystems or having the<br />
/boot filesystem on a RAID1 volume yet, but one should be able to enable<br />
RAID1 for /boot now (create md1 == /dev/sda1 and /dev/sdb1 and setup an ext2 fs<br />
on md1 to hold the RAID1 protected /boot fs). Haven&#8217;t tested<br />
that yet, but did get that to work in earlier 2.6.x kernels (Debian and Fedora).</p>
<p><strong>15. Hold breath, have Fedora Core 7 Rescue disk ready, Reboot</strong></p>
<p><strong>16. Celebrate.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

