<?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; linux</title>
	<atom:link href="http://www.networkforensics.us/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.networkforensics.us</link>
	<description>Blog of an IT security specialist  .: beta :.</description>
	<lastBuildDate>Tue, 08 Jun 2010 16:59:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=7149</generator>
		<item>
		<title>Accessing Ubuntu desktop from Mac Snow Leopard</title>
		<link>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/</link>
		<comments>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:06:34 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=109</guid>
		<description><![CDATA[Accessing my Ubuntu 9.04 Gnome desktop from the built in Mac OS X 10.6.2 VNC viewer took a bit of tweaking on the Ubuntu Gnome side. I have an OpenVPN SSL tunnel between the Mac and the Ubuntu desktop, however a SSH tunnel could also be used to protect the VNC session. In this post, [...]]]></description>
			<content:encoded><![CDATA[<p>Accessing my Ubuntu 9.04 Gnome desktop from the built in Mac OS X 10.6.2 VNC viewer took a bit of tweaking on the Ubuntu Gnome side.  I have an OpenVPN SSL tunnel between the Mac and the Ubuntu desktop, however a SSH tunnel could also be used to protect the VNC session.  In this post, I&#8217;ll just cover the VNC server setup assuming a secure connection between the Mac and the desktop.</p>
<p>Initially I followed the guidance at sanity, inc.&#8221;<a title="mac-screen-sharing-with-linux" href="http://www.sanityinc.com/articles/mac-screen-sharing-with-linux" target="_blank">How to OS X Leopard Screen Sharing with Linux</a>&#8220;, on Ubuntu I installed tightvnc:<br />
<code><br />
apt-get install tightvncserver<br />
</code><br />
Then tested it out by starting up the vnc server on the Ubuntu system as the user I want to run the remote session as:<br />
<code><br />
tightvncserver -geometry 1024x700 -depth 24 :1<br />
</code><br />
As tightvncserver starts up the VNC service, it will check for a .vncpasswd file in the user home directory.  If it doesn&#8217;t exist, you will be prompted for a password to use to protect the remote session.  Note VNC is not designed to be used for multi-user remote access.<br />
On the Mac, rather than use Bonjour to automatically discover the Ubuntu screen sharing service, I just referred to the VNC session directly within Finder  which invokes the built in VNC viewer. Enter the VNC session password when prompted and the Ubuntu desktop is displayed. <a href="http://www.networkforensics.us/wp-content/uploads/2010/02/connect-to-server1.png"><img class="alignright size-full wp-image-112" title="connect-to-server" src="http://www.networkforensics.us/wp-content/uploads/2010/02/connect-to-server1.png" alt="connect-to-server" width="316" height="86" /></a> Within Finder, either use Go -&gt; Connect to Server or Apple-K to bring up the Connect to Server window.  The server address is the URL that points to the Ubuntu VNC instance <code>vnc://10.10.1.2:5901</code> where the port is 5900 + the display number specified when starting up the tightvncserver (5901).</p>
<p>This all worked fantastic, except for the keyboard mapping within Gnome &#8211; it was scrambled.  After googling several possible solutions, the only one that was successful for me was to disable the keyboard plugin in Gnome<br />
<code><br />
<a title="gnome-keyboard-fix" href="https://bugs.launchpad.net/baltix/+source/tightvnc/+bug/112955">Amit Gurdasani  wrote on 2008-04-28:  	  #51</a></code></p>
<blockquote><p>I&#8217;ve also encountered this issue with TightVNC and the hardy release. My solution was to capture the xmodmap -pke output as ${HOME}/.Xmodmap at the login screen (DISPLAY=:0 XAUTHORITY=/var/lib/gdm/:0.Xauth sudo xmodmap -pke &gt; ${HOME}/.Xmodmap). When gnome-settings-daemon starts up and finds an .Xmodmap, it asks if it should be loaded &#8212; I answer yes. As a side effect, if gnome-settings-daemon were to be restarted without the .Xmodmap, it&#8217;d scramble the keyboard layout again. With an .Xmodmap in place, it&#8217;ll load the .Xmodmap every time.</p>
<p>Due to another issue (#199245, gnome-settings-daemon crashing with BadWindow every time a window is mapped), <em><strong>I disabled the keyboard plugin using gconf-editor, at /apps/gnome_settings_daemon/plugins/keyboard.</strong></em> Since it&#8217;s not being loaded, I suspect it might not garble the layout even if I remove the .Xmodmap now.</p>
<p>So maybe disabling the keyboard plugin is a better fix.</p></blockquote>
<p>On the Ubuntu system, invoke the Gnome configuration editor (gconf-editor on command line), then navigate to  apps -&gt; gnome_settings_daemon -&gt; plugins -&gt; keyboard  uncheck the Active keyword.  Kill the VNC daemon and relaunch it &#8211; problem fixed.<br />
<code><br />
pkill vnc<br />
tightvncserver -geometry 1024x700 -depth 24 :1<br />
</code><br />
Various methods exist to automatically start and kill the VNC server, but for now this will do it for me. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash_history</title>
		<link>http://www.networkforensics.us/2010/01/bash_history/</link>
		<comments>http://www.networkforensics.us/2010/01/bash_history/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 17:42:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=103</guid>
		<description><![CDATA[Here&#8217;s some notable cli entries that I refer to occassionally: Mac OS X: sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1 sudo /sbin/ipfw -q /etc/firewall.conf sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10 sudo route add -net 10.2.1.0/24 10.3.1.1 Linux:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some notable cli entries that I refer to occassionally:</p>
<p>Mac OS X:<br />
<code><br />
sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1<br />
sudo /sbin/ipfw -q /etc/firewall.conf<br />
sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10<br />
sudo route add -net 10.2.1.0/24 10.3.1.1<br />
</code><br />
Linux:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2010/01/bash_history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IMAP mailstore migration .. again</title>
		<link>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/</link>
		<comments>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 02:47:07 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=97</guid>
		<description><![CDATA[So last weekend, I discovered that Spamhaus decided it would be a good idea to place all of the public IP addresses for Slicehost (my Linux VPS hoster) into their Spamhaus block list (SBL). This covered both my slice in Dallas and the one in St. Louis &#8211; meaning an impressive chunk of inbound mail [...]]]></description>
			<content:encoded><![CDATA[<p>So last weekend, I discovered that <strong><a title="www.spamhaus.org" href="http://www.spamhaus.org/" target="_blank">Spamhaus</a></strong> decided it would be a good idea to place all of the public IP addresses for <a title="www.slicehost.com" href="http://www.slicehost.com" target="_self">Slicehost</a> (my Linux VPS hoster) into their Spamhaus block list (<a title="http://www.spamhaus.org/sbl/index.lasso" href="http://www.spamhaus.org/sbl/index.lasso">SBL</a>). This covered both my slice in Dallas and the one in St. Louis &#8211; meaning an impressive chunk of inbound mail to my domains was being trashed by the sending MTA and an even bigger chunk of my outbound mail was being outright rejected since the sending IP&#8217;s were on the SBL.  Slicehost worked hard to convince Spamhaus to recind the blocklist, so the Slicehost IP&#8217;s got moved over to the less-nasty-but-you&#8217;re-still-probably-a-spamming-dirtbag <a title="PBL" href="http://www.spamhaus.org/pbl/index.lasso" target="_blank">Policy Block list</a> (PBL) assuming affected IP owners would request to be removed from that list.</p>
<blockquote><p><em><strong>Sample query to see if you&#8217;re on any Spamhaus block list:  http://www.spamhaus.org/query/bl?ip=10.11.12.13</strong></em></p></blockquote>
<p>It seems it&#8217;s time to relinquish the care and feeding of my own Postfix mail system and turn to a hosted solution.  This means I need to migrate about 5GB of IMAP store to another site (again).  Last time I did a wholesale migration, I used <em><strong><a href="http://freshmeat.net/projects/imapsync/">imapsync</a></strong></em> to make the transition painless.  In the code example below, an SSL connection to the IMAPS server at imap-server.sourcedomain.com is made with username@sourcedomain.com and the password stored in the plaintext file secret1.  An SSL connection is made to the target system (which happens to be the server on which the imapsync tool is running, but could just as easily be another IMAPS server somewhere on a network accessible to the host where imapsync is running).  The &#8211;delete and &#8211;expunge1 arguments will clean the successfully moved messages from IMAP store #1 .. so be sure you have your messages on the target successfully!  Imapsync can be run iteratively to ensure you have got all the messages from your source.</p>
<p><code><br />
/usr/bin/imapsync \<br />
--host1 imap-server.sourcedomain.com \<br />
--ssl1 \<br />
--authmech1 LOGIN \<br />
--user1 username@sourcedomain.com --passfile1 secret1 \<br />
--host2 127.0.0.1 --user2 username@targetdomain.com --passfile2 secret2 \<br />
--ssl2 \<br />
--delete --expunge1 \<br />
--buffersize=128<br />
</code><br />
And one can use the<br />
<code><br />
--dry<br />
</code><br />
option to just test the process but not actually move any of the messages.</p>
<p>So that&#8217;s it &#8211; I&#8217;m about half way though migrating my current IMAP stores over to a hosted mail solution, so that I don&#8217;t need to keep up with the increasing level of care and feeding that running your own mail service requires.  Before I get too many darts about that .. I first started running my own personal MTA in 1995, adding spam and av filtering over time, and adding substantial redundancy (servers, sites, storage) so I could rely on it and fix things that broke as I had time rather than right when they broke (which was <em><strong>always</strong></em> at a bad time).  My new hosted solution takes over from two VPS servers running Postfix, Spamassassin, ClamAV, Greylisting with the IMAP store replicated across data centers in different states (15 minute rsyncs).  So soon, the (hopefully) last Allen Pomeroy owned and operated MTA can be turned off, while I get to work on fun stuff, rather than figuring out why my email is bouncing.  :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a web security lab (with VMware Fusion)</title>
		<link>http://www.networkforensics.us/2009/10/building-a-web-security-lab/</link>
		<comments>http://www.networkforensics.us/2009/10/building-a-web-security-lab/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 14:28:50 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=88</guid>
		<description><![CDATA[Problem: VMware machines load boot loader immediately, no BIOS banner, so can&#8217;t get into BIOS to alter boot settings. Solution: Edit the vm&#8217;s .vmx file and add the line: bios.bootDelay = "5000" which adds a 5000 millisecond (5 second) delay to the boot, or add: bios.forceSetupOnce = "TRUE" to make the VM enter the BIOS [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: VMware machines load boot loader immediately, no BIOS banner, so can&#8217;t get into BIOS to alter boot settings.<br />
Solution: Edit the vm&#8217;s .vmx file and add the line:<br />
<code><br />
bios.bootDelay = "5000"<br />
</code><br />
which adds a 5000 millisecond (5 second) delay to the boot, or add:<br />
<code><br />
bios.forceSetupOnce = "TRUE"<br />
</code><br />
to make the VM enter the BIOS setup at the next boot.</p>
<p>Problem: VMware Fusion 3.0 doesn&#8217;t give a way to edit the virtual network settings via the GUI.<br />
Solution: To change the subnet used by the NAT or HostOnly networks, go root in Mac OS X and edit<br />
<code><br />
/Library/Application Support/VMware Fusion/networking<br />
</code><br />
and set the following lines to the subnets desired:<br />
<code><br />
answer VNET_1_HOSTONLY_SUBNET 192.168.35.0<br />
answer VNET_8_HOSTONLY_SUBNET 10.10.1.0<br />
</code><br />
To add additional custom isolated host only VLANs, also edit the networking file and add additional VNET definitions. There can apparently only be 8 VLANs with VLAN 1 and 8 already pre-defined.<br />
<code><br />
answer VNET_2_DHCP no<br />
answer VNET_2_HOSTONLY_NETMASK 255.255.255.0<br />
answer VNET_2_HOSTONLY_SUBNET 10.10.21.0<br />
answer VNET_2_VIRTUAL_ADAPTER yes<br />
answer VNET_3_DHCP no<br />
answer VNET_3_HOSTONLY_NETMASK 255.255.255.0<br />
answer VNET_3_HOSTONLY_SUBNET 10.10.22.0<br />
answer VNET_3_VIRTUAL_ADAPTER yes<br />
answer VNET_4_DHCP no<br />
answer VNET_4_HOSTONLY_NETMASK 255.255.255.0<br />
answer VNET_4_HOSTONLY_SUBNET 10.10.23.0<br />
answer VNET_4_VIRTUAL_ADAPTER yes<br />
</code><br />
Now create your vm with as many network interfaces as you have separate VLANs (vnet) then edit the node.vmx vm configuration file and change the interfacename.connectionType to custom, and define the VLAN (vnet) that interface will attach to:<br />
<code><br />
#ethernet0.connectionType = "nat"<br />
ethernet0.connectionType = "custom"<br />
ethernet0.vnet = "vmnet3"<br />
</code><br />
Also realize that VMware will take the .1 host address on each vmnet &#8211; so you cannot assign .1 to any of your VMs.</p>
<p>Problem: Ubuntu 9.10 persistent network configuration (stores the MAC address of network adapters), so if you copy a machine, by default Ubuntu will setup a new logical adapter (eth1) since the MAC address has changed (when you answer I Copied It in VMware).<br />
Solution: Tell VMware you copied the machine, so it will chose a unique MAC address. Boot Ubuntu into single user mode (another article on that to follow) then edit the MAC address associated with eth0.<br />
<code><br />
sudo vi /etc/udev/rules.d/70-persistent-net.rules<br />
</code><br />
find the stanza of the network interface in question (NAME=&#8221;eth0&#8243;) and set the following ATTR tag to the new MAC address:<br />
<code><br />
ATTR{address}=="new-mac-address-here"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/10/building-a-web-security-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sifting through Checkpoint FW1 logs</title>
		<link>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/</link>
		<comments>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 19:28:22 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[fw]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=83</guid>
		<description><![CDATA[Once the ASCII log files are available for processing, my fw1logsearch.pl script can be used to find complex patterns of interest.]]></description>
			<content:encoded><![CDATA[<p>Recently I found myself in the unhappy position of needing to sift through slightly more than a billion Checkpoint Firewall-1 log lines, looking for specific patterns of access.  The problem was that many of the exported fwm log files had differing column positions and there had been many ruleset changes over the course of 11 months worth of log data.  Many of the excellent FW1 log summarization tools (such as <a href="http://ginini.com/software/fwlogsum/">Peter Sundstrom&#8217;s fwlogsum</a>) didn&#8217;t handle the hundreds of files and differing column positions.</p>
<blockquote><p><em>The final scripted solution was processing over 11,000 lines/second .. and still took over 23 hours for the first run.</em></p></blockquote>
<p>Log file exports via fwm logexport can have variable column positioning, except for record ID number &#8220;num&#8221;, which is *always* column number one.  I see three viable alternatives to the changing column position in the ASCII log files exported via fwm &#8211; so we can automate the log processing:</p>
<li>Export the FW1 log file to ASCII via<br />
<code>fwm logexport -i fw1-binary-logfile -o fw1-ascii-logfile.txt -n -p</code></li>
<ol>
<li>Parse the header line (line #1) of every log file and dynamically map (rearrange) the columns to a pre-determined standard in memory before further processing (painful, expensive)</li>
<li>Tell Checkpoint fwm to export in a fixed column ordering
<ul>create<br />
<code>logexport.ini</code><br />
and place in<br />
<code>$FWDIR/conf directory</code></ul>
<ul>eg. fwmgmtsrv:<br />
<code>C:\WINDOWS\FW1\R65\FW1\conf</code></ul>
<ul>logexport.ini:</ul>
<ul> <code>[Fields_Info]<br />
included_fields = num,date,time,orig,origin_id,type,action,alert,i/f_name,<br />
i/f_dir,product,rule,src,dst,proto,service,s_port,xlatesrc,xlatedst,<br />
nat_rulenum,nat_addtnl_rulenum,xlatesport,xlatedport,user,<br />
partner,community,session_id,ipv6_src,ipv6_dst,<br />
srckeyid,dstkeyid,CookieI,CookieR,msgid,elapsed,<br />
bytes,packets,start_time,snid,ua_snid,d_name,id_src,ua_operation,<br />
sso_type_desc,app_name,auth_domain,uname4domain,wa_headers,<br />
result_desc,r_dest,comment,url,redirect_url,enc_desc,e2e_enc_desc,<br />
auth_result,attack,log_sys_message,<br />
rule_uid,rule_name,service_id,resource,reason,cat_server,<br />
dstname,SOAP Method,category,ICMP,message_info,<br />
TCP flags,rpc_prog,Total logs,<br />
Suppressed logs,DCE-RPC Interface UUID,Packet info,<br />
message,ip_id,ip_len,ip_offset,fragments_dropped,during_sec</code></ul>
</li>
<li>Use OPSEC LEA tools to extract event log records instead of export via fwm logexport</li>
</ol>
<p>Once the ASCII log files are available for processing, my <strong><span style="color: #0000ff;"><a href="http://www.networkforensics.us/software/checkpoint/fw1logsearch.pl">fw1logsearch.pl</a></span></strong> script can be used to find complex patterns of interest.  Any matching records found by fw1logsearch will be output with an initial FW1 header line so that fw1logsearch can be used iteratively, to build very complex search criteria.  fw1logsearch can also write out a discard file allowing completely negative logic searches resulting in 100% of the input data separated into a match file and a didn&#8217;t match file.  Some examples of how I&#8217;ve used it are shown here:<br />
<code><br />
gunzip -c fwlogs/2009*gz | \<br />
fw1logsearch.pl --allinclude \<br />
-S '10\.1\.1[1359]\.|10\.2\.1[01]\.|192\.168\.2[245]\.' \<br />
-d '10\.1\.1[1359]\.|10\.2\.1[01]\.|192\.168\.2[245]\.' \<br />
-p '^1310$|^1411$|^1812$|^455' | \<br />
fw1logsearch.pl -S '192\.168\.22\.14$|10\.2\.11\.12$' |\<br />
fw1logsearch.pl --allexclude \<br />
-S '^192\.168\.24\.12$' -P '^1310$' --rejectfile 192-168-24-12-port-1310.txt<br />
</code><br />
Line by line:<br />
1. Unzip the compressed ASCII log files, feed them to the first instance of fw1logsearch.pl<br />
2. First fw1logsearch &#8211; all conditions must be true for any events to match<br />
Source address must NOT be in any of the following regex ranges:<br />
10.1.11.* 10.1.13.* 10.1.15.* 10.1.19.*<br />
10.2.10.* 10.2.11.*<br />
192.168.22.* 192.168.24.* 192.168.25.*<br />
Destination address must be in one of the same following regex ranges.<br />
Service (destination port) must be one of:<br />
Exactly port: 1310, 1411, 1812, or any port starting with 455<br />
No protocol is specified, so it will match either TCP or UDP</p>
<p>fw1logsearch.pl will output any matching events to stdout, including a FW1 log header line, so the next instance of fw1logsearch.pl  continues filtering the result set.</p>
<p>3. The second fw1logsearch.pl specifies Source Address must not be any of the following<br />
192.168.22.14</p>
<p>10.2.11.12</p>
<p>4. The last fw1logsearch.pl excludes port 1310 from 192.168.24.12, and puts all those records into a separate reject file, while writing the other records to stdout.</p>
<p>This script has been used to process over 4 billion records within the project I wrote it for &#8211; and precisely found all the use of particular business cases I needed to modify.  The result was zero outages and no unintended business interruption.</p>
<p>Basic syntax/help file:</p>
<p>Usage:  fw1logsearch.pl<br />
[-a|--incaction|-A|--excaction &lt;action regex&gt;]<br />
[-p|--incservice|-P|--excservice &lt;dst port regex&gt;]<br />
[-b|--incs_port|-B|--excs_port &lt;src port regex&gt;]<br />
[-s|--incsrc|-S|--excsrc &lt;src regex&gt;]<br />
[-d|--incdst|-D|--excdst &lt;dst regex&gt;]<br />
[-o|--incorig|-O|--excorig &lt;fw regex&gt;]<br />
[-r|--incrule|-R|--excrule &lt;rule-number regex&gt;]<br />
[-t|--incproto|-T|--excproto &lt;proto regex&gt;]</p>
<p>[--dnscache &lt;dns-cache-file&gt;]<br />
[--resolveip]<br />
[--allinclude]<br />
[--allexclude]<br />
[--rejectfile &lt;file&gt;]<br />
[--debug &lt;level&gt;]</p>
<p>fw1logsearch.pl will search a fwm logexport text file for regex patterns specified for supported columns (such as service, src, dst, rule, action, proto and orig).</p>
<p>Include and exclude regex matches may be specified on the same line, although they both will include (print) a line or exclude (reject) a line based on single matches.  Allinclude or Allexclude must be specified to force a match<br />
only on all specified column regex patterns.</p>
<p>Regex patterns can be enclosed with single quotes to include characters that are special to the shell, such as the &#8216;or&#8217; (|) operator.</p>
<p>Header will be output only if there are any matching lines.</p>
<p>Example invocations:<br />
$ cat 2008-07-07*txt | \<br />
fw1logsearch.pl \<br />
-p &#8217;53|domain&#8217; \<br />
-d &#8217;192.168.1.2|host1|10.10.1.2|host2&#8242; \<br />
-o &#8217;192.168.2.3|10.10.2.4|10.10.4.5&#8242; \<br />
-S &#8217;64.65.66.67|32.33.34.35|10.10.*|192.168.*&#8217; \<br />
&#8211;resolveip<br />
Will require destination port (service) to be 53, destination IP to be any of 192.168.1.2, host1, 10.10.1.2, or host2  the reporting firewall (origin) to be any of 192.168.2.3, 10.10.2.4, or 10.10.4.5  and the source IP must not be<br />
any of 64.65.66.67, 32.33.34.35, 10.10.*, or 192.168.*  Any lines that match this criteria, will display and the orig, src, and dst columns will use the default DNS cache file (dynamically built/managed) to perform name resolution, replacing the IP addresses where possible.</p>
<p>Include regex patterns:<br />
-a  &#8211;incaction    Rule action (accept, deny)<br />
-b  &#8211;incs_port    Source port (s_port)<br />
-p  &#8211;incservice   Destination port (service)<br />
-s  &#8211;incsrc       Source IP|hostname<br />
-d  &#8211;incdst       Destination IP|hostname<br />
-o  &#8211;incorig      Reporting FW IP|hostname<br />
-r  &#8211;incrule      Rule number that triggered entry<br />
-t  &#8211;incproto     Protocol of connection</p>
<p>Exclude regex patterns:<br />
-A  &#8211;excaction    Rule action (accept, deny)<br />
-B  &#8211;excs_port    Source port (s_port)<br />
-P  &#8211;excservice   Destination port (service)<br />
-S  &#8211;excsrc       Source IP|hostname<br />
-D  &#8211;excdst       Destination IP|hostname<br />
-O  &#8211;excorig      Reporting FW IP|hostname<br />
-R  &#8211;excrule      Rule number that triggered entry<br />
-T  &#8211;excproto     Protocol of connection</p>
<p>Other options:<br />
&#8211;debug {level} Turn on debugging<br />
&#8211;dnscache      Specify location of DNS cache file to be used with<br />
the Resolve IPs option<br />
&#8211;resolveip     Resolve IPs for orig, src, and dst columns AFTER filtering<br />
&#8211;rejectfile    Write out all rejected lines to a specified file</p>
<p>Download <span style="color: #0000ff;"><a href="http://www.networkforensics.us/software/checkpoint/fw1logsearch.pl">fw1logsearch.pl</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to build a MythTV PVR on Fedora Core 7</title>
		<link>http://www.networkforensics.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/</link>
		<comments>http://www.networkforensics.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>edhacker</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 Fedora 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">    </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="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 class="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 class="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 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="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.networkforensics.us/2009/05/how-to-build-a-mythtv-pvr-on-fedora-core-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAM based filesystems in Linux</title>
		<link>http://www.networkforensics.us/2009/05/ram-based-filesystems-in-linux/</link>
		<comments>http://www.networkforensics.us/2009/05/ram-based-filesystems-in-linux/#comments</comments>
		<pubDate>Mon, 18 May 2009 17:42:22 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=65</guid>
		<description><![CDATA[When doing I/O intensive processing on Linux systems, I&#8217;ve found that creating a RAM based filesystem can substantially improve processing times. Of course nothing but the transitory processing data should be written to the fake filesystem to avoid data loss in the case of unintended dismount or system crash. mount -t ramfs ramfs /tmp/ramfs -o [...]]]></description>
			<content:encoded><![CDATA[<p>When doing I/O intensive processing on Linux systems, I&#8217;ve found that creating a RAM based filesystem can substantially improve processing times.  Of course nothing but the transitory processing data should be written to the fake filesystem to avoid data loss in the case of unintended dismount or system crash.</p>
<blockquote>
<pre>
mount -t ramfs ramfs /tmp/ramfs -o size=4m</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/ram-based-filesystems-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soekris net5501 SBC Linux installation</title>
		<link>http://www.networkforensics.us/2009/05/soekris-net5501-sbc-linux-installation/</link>
		<comments>http://www.networkforensics.us/2009/05/soekris-net5501-sbc-linux-installation/#comments</comments>
		<pubDate>Fri, 15 May 2009 20:49:15 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[fw]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=60</guid>
		<description><![CDATA[Soekris Engineering net5501 SBC setup with Linux 2008/09/03 net5501 is a x86 SBC that I ordered with 4 10/100 ethernet ports, 512MB memory, 500MHz Geode LX CPU Serial console is used for setup of net5501 &#8211; BIOS writes to serial port since there is no xVGA port. &#60;ctrl-p&#62; to enter BIOS setup. DB9 pinout: 2 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Soekris Engineering net5501 SBC setup with Linux </strong></p>
<p>2008/09/03</p>
<p>net5501 is a x86 SBC that I ordered with 4 10/100 ethernet ports, 512MB memory, 500MHz Geode LX CPU</p>
<p>Serial console is used for setup of net5501 &#8211; BIOS writes to serial port since there is no xVGA port. &lt;ctrl-p&gt; to enter BIOS setup. DB9 pinout:</p>
<p>2 &#8212; 3</p>
<p>3 &#8212; 2</p>
<p>5 &#8212; 5</p>
<p>Use 19,200 bps 8 data bits, no parity, 1 stop</p>
<p>With the Macbook Pro, I use a Keyspan USA-19HS USB &lt;&#8211;&gt; DB9 RS232 serial converter (and DB9-RJ45 adapters to implement the null modem configuration and allow me to use an ethernet cable for the serial console &lt;&#8211;&gt; Keyspan device.</p>
<p>On OS X (10.5) I use &#8220;screen&#8221; to provide the serial terminal interface:</p>
<p>$ screen /dev/tty.USA19H1a2P1.1 19200,8</p>
<p>&lt;ctrl-a&gt;&lt;ctrl-\&gt; to exit</p>
<p>On the net5501 BIOS, PXEBoot is disabled:</p>
<p>set PXEBoot=Disabled</p>
<p>I setup voyage-0.5.0 on a compact flash card then installed the card into the net5501 &#8211; works great the first boot</p>
<p>Default root info:   root / voyage</p>
<p>OpenBSD setup info:</p>
<p>http://techblagh.blogspot.com/2008/08/installing-openbsd-43-on-soekris-5501.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/soekris-net5501-sbc-linux-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MythTV FC7 LVM on RAID1 Configuration</title>
		<link>http://www.networkforensics.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/</link>
		<comments>http://www.networkforensics.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:48:38 +0000</pubDate>
		<dc:creator>edhacker</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.networkforensics.us/2009/05/mythtv-fc7-lvm-on-raid1-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux iptables notes</title>
		<link>http://www.networkforensics.us/2009/05/linux-iptables-notes/</link>
		<comments>http://www.networkforensics.us/2009/05/linux-iptables-notes/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:37:23 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[fw]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.ca/blog/?p=32</guid>
		<description><![CDATA[Add local redirection of low port to unpriv high port Remove any existing entries: iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT &#8211;to-ports 11025 2&#62; /dev/null iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 80 -j REDIRECT &#8211;to-ports 8080 2&#62; /dev/null Add new redirects: iptables -t nat -I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Add local redirection of low port to unpriv high port </strong></p>
<p>Remove any existing entries:</p>
<p>iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT  &#8211;to-ports 11025 2&gt; /dev/null<br />
iptables -t nat -D PREROUTING &#8211;src 0/0 -p  tcp &#8211;dport 80 -j REDIRECT &#8211;to-ports 8080 2&gt; /dev/null</p>
<p>Add new redirects:<br />
iptables -t nat  -I PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT &#8211;to-ports 11025<br />
iptables -t nat -I PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 80 -j REDIRECT  &#8211;to-ports 8080</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/linux-iptables-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
