<?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</title>
	<atom:link href="http://www.pomeroy.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pomeroy.us</link>
	<description>IT security thoughts and personal stuff</description>
	<lastBuildDate>Sat, 28 Jan 2012 08:55:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>House Rules for the Austin Pad</title>
		<link>http://www.pomeroy.us/2012/01/house-rules-for-the-austin-pad/</link>
		<comments>http://www.pomeroy.us/2012/01/house-rules-for-the-austin-pad/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 07:07:57 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[humour]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[austin]]></category>

		<guid isPermaLink="false">http://www.pomeroy.us/?p=439</guid>
		<description><![CDATA[Ok, here&#8217;s the house rules for the Austin pad .. yes it&#8217;s at 3301 Westland Drive, Austin, TX, 78704.  Y&#8217;all are expected to know and adhere to the rules.  No exceptions.  Even for me. Wireless access is at  HFA-Guest  /  &#60;password listed on the fridge&#62;  .. no the password is not &#8220;password listed on the [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, here&#8217;s the house rules for the Austin pad .. yes it&#8217;s at 3301 Westland Drive, Austin, TX, 78704.  Y&#8217;all are expected to know and adhere to the rules.  No exceptions.  Even for me.</p>
<ol>
<li>Wireless access is at  <strong>HFA-Guest</strong>  /  &lt;<strong>password listed on the fridge</strong>&gt;  .. no the password is not &#8220;password listed on the fridge&#8221; .. don&#8217;t bitch about the password, it&#8217;s free WiFi bro!</li>
<li><strong>Don&#8217;t</strong> adjust the temperature!  If you&#8217;re cold, put on a sweater, toque (beanie if you&#8217;re south of the 49th parallel).  If you&#8217;re hot, have a drink with ice, and if that doesn&#8217;t help, then piss off.</li>
<li>Austin tunes over-ride. Period. Don&#8217;t care you want to listen to some wimpy East Coast, West Coast, Popular rock or Northerner crap.</li>
<li>If there is a NFL game on, then the game is ON .. don&#8217;t expect much else.</li>
<li>Don&#8217;t suck up *all* the bandwidth in pr0n, dude. Really? I know it&#8217;s you. Remember what I do for a living?? Yes there are &#8220;proxies&#8221; on friend&#8217;s free Internet connections. Duh.</li>
<li>GPS (aka TomTom or Garvin) HIGHLY recommended for out-of-town-ers.</li>
<li>GPS (aka TomTom or Garvin) HIGHLY recommended for in-towners.</li>
<li>Be energy conscious. Rinse your damn dishes (don&#8217;t be lazy) &#8211; that&#8217;s what the drying rack is for. Duh.</li>
<li>You consume the last bottle of _______, REPLACE it. Damn, there is a Tarjay (Target for our American friends), or H-E-B, or Randall&#8217;s within walking distance!</li>
<li>Do NOT put your drinks on my Red&#8217;s Porch tab. Food is negotiable.</li>
<li>You MUST have a valid reason to go to another joint than Red&#8217;s</li>
<li>Yes, it IS a shower curtain rod like Marriott&#8217;s.  No, I didn&#8217;t steal it. Nice, eh? That&#8217;s another 5.5&#8243; of room in the shower!!</li>
<li>No you don&#8217;t have to come run with me in the morning at 5am.  Nor do I .. but sometimes I&#8217;d appreciate the encouragement out of bed.</li>
<li>Recycling bin is in the pantry.  Just cuz y&#8217;all are too lazy to actually walk outside and dump your junk in the recycle bucket out back. Just sayin&#8217;. By the way .. organics hit the bucket at the BACK .. if you give a cr@p about that stuff.</li>
<li>Yes, I do offer a taxi service at 5am to the AUS airport.  It&#8217;s $50,000 per one way.  Your choice, but it&#8217;s COB bud.</li>
<li>Don&#8217;t touch the Henkle knife (knives) .. I have to sacrifice  goat entrails to keep it sharp.  Pretty sure you don&#8217;t want any part of that. Just sayin&#8217;. You get the steak knives.</li>
<li>NEVER turn off the Cranberries. EVER. See rule #3.</li>
<li>Whoever gets to the music remote wins. Except when Rule #3 applies. That means Al wins. All the time. Damn dude don&#8217;t cry.</li>
</ol>
<p>Ok, you get the point. Be responsible. Recycle. Use less energy. Don&#8217;t be lazy. Book your stay. (It&#8217;s only uncomfortable for those of you who don&#8217;t and wind up sleeping in the same guest bed .. y&#8217;all are NOT sleeping with me).</p>
<p>Oh .. ya, I&#8217;m sure you&#8217;ll have fun here .. no problems, mate. Yes the lights in the back yard are a secret. DON&#8217;T tell Amanda.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2012/01/house-rules-for-the-austin-pad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neat sayings</title>
		<link>http://www.pomeroy.us/2012/01/neat-sayings/</link>
		<comments>http://www.pomeroy.us/2012/01/neat-sayings/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 21:28:36 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.pomeroy.us/?p=435</guid>
		<description><![CDATA[Are you where you want to be? Are you who you want to be? The getting lost was worth the coming home.  What I fear, I can create.  We must be willing to let go of the life we planned, so as to have the life that is waiting for us.]]></description>
			<content:encoded><![CDATA[<ul>
<li>Are you where you want to be?</li>
<li>Are you who you want to be?</li>
</ul>
<ul>
<li>The getting lost was worth the coming home.  <img src='http://www.pomeroy.us/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<ul>
<li>What I fear, I can create.  We must be willing to let go of the life we planned, so as to have the life that is waiting for us.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2012/01/neat-sayings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing Apache web servers</title>
		<link>http://www.pomeroy.us/2011/11/securing-apache-web-servers/</link>
		<comments>http://www.pomeroy.us/2011/11/securing-apache-web-servers/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 04:49:53 +0000</pubDate>
		<dc:creator>prodadmin</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.pomeroy.us/?p=424</guid>
		<description><![CDATA[Great article by Pete Freitag on Securing Apache Web Servers (20 ways to Secure your Apache Configuration) Here are 20 things you can do to make your apache configuration more secure. Disclaimer: The thing about security is that there are no guarantees or absolutes. These suggestions should make your server a bit tighter, but don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Great article by Pete Freitag on Securing Apache Web Servers<br />
(<a href="http://www.petefreitag.com/item/505.cfm">20 ways to Secure your Apache Configuration</a>)</p>
<p>Here are 20 things you can do to make your apache configuration more secure.</p>
<p>Disclaimer: The thing about security is that there are no guarantees or absolutes. These suggestions should make your server a bit tighter, but don&#8217;t think your server is necessarily secure after following these suggestions.</p>
<p>Additionally some of these suggestions may decrease performance, or cause problems due to your environment. It is up to you to determine if any of the changes I suggest are not compatible with your requirements. In other words proceed at your own risk.</p>
<h3>First, make sure you&#8217;ve installed latest security patches</h3>
<p>There is no sense in putting locks on the windows, if your door is wide open. As such, if you&#8217;re not patched up there isn&#8217;t really much point in continuing any longer on this list.</p>
<h3>Hide the Apache Version number, and other sensitive information.</h3>
<p>By default many Apache installations tell the world what version of Apache you&#8217;re running, what operating system/version you&#8217;re running, and even what Apache Modules are installed on the server. Attackers can use this information to their advantage when performing an attack. It also sends the message that you have left most defaults alone.</p>
<p>There are two directives that you need to add, or edit in your <code>httpd.conf</code> file:</p>
<pre>ServerSignature Off
ServerTokens Prod</pre>
<p>The <code>ServerSignature</code> appears on the bottom of pages generated by apache such as 404 pages, directory listings, etc.</p>
<p>The <code>ServerTokens</code> directive is used to determine what Apache will put in the <code>Server</code> HTTP response header. By setting it to <code>Prod</code> it sets the HTTP response header as follows:</p>
<pre>Server: Apache</pre>
<p>If you&#8217;re super paranoid you could change this to something other than &#8220;Apache&#8221; by editing the source code, or by using mod_security (see below).</p>
<h3>Make sure apache is running under its own user account and group</h3>
<p>Several apache installations have it run as the user <code>nobody</code>. So suppose both Apache, and your mail server were running as <code>nobody</code> an attack through Apache may allow the mail server to also be compromised, and vise versa.</p>
<pre>User apache
Group apache</pre>
<h3>Ensure that files outside the web root are not served</h3>
<p>We don&#8217;t want apache to be able to access any files out side of its web root. So assuming all your web sites are placed under one directory (we will call this <code>/web</code>), you would set it up as follows:</p>
<pre>&lt;Directory /&gt;
  Order Deny,Allow
  Deny from all
  Options None
  AllowOverride None
&lt;/Directory&gt;
&lt;Directory /web&gt;
  Order Allow,Deny
  Allow from all
&lt;/Directory&gt;</pre>
<blockquote><p>Note that because we set <code>Options None</code> and <code>AllowOverride None</code> this will turn off all options and overrides for the server. You now have to add them explicitly for each directory that requires an Option or Override.</p></blockquote>
<h3>Turn off directory browsing</h3>
<p>You can do this with an <code>Options</code> directive inside a <code>Directory</code> tag. Set <code>Options</code> to either <code>None</code> or <code>-Indexes</code></p>
<pre>Options -Indexes</pre>
<h3>Turn off server side includes</h3>
<p>This is also done with the <code>Options</code> directive inside a <code>Directory</code> tag. Set <code>Options</code> to either <code>None</code> or <code>-Includes</code></p>
<pre>Options -Includes</pre>
<h3>Turn off CGI execution</h3>
<p>If you&#8217;re not using CGI turn it off with the <code>Options</code> directive inside a <code>Directory</code> tag. Set <code>Options</code> to either <code>None</code> or <code>-ExecCGI</code></p>
<pre>Options -ExecCGI</pre>
<h3>Don&#8217;t allow apache to follow symbolic links</h3>
<p>This can again can be done using the <code>Options</code> directive inside a <code>Directory</code> tag. Set <code>Options</code> to either <code>None</code> or <code>-FollowSymLinks</code></p>
<pre>Options -FollowSymLinks</pre>
<h3>Turning off multiple Options</h3>
<p>If you want to turn off all <code>Options</code> simply use:</p>
<pre>Options None</pre>
<p>If you only want to turn off some separate each option with a space in your <code>Options</code> directive:</p>
<pre>Options -ExecCGI -FollowSymLinks -Indexes</pre>
<h3>Turn off support for .htaccess files</h3>
<p>This is done in a <code>Directory</code> tag but with the <code>AllowOverride</code> directive. Set it to <code>None</code>.</p>
<pre>AllowOverride None</pre>
<p>If you require Overrides ensure that they cannot be downloaded, and/or change the name to something other than <code>.htaccess</code>. For example we could change it to <code>.httpdoverride</code>, and block all files that start with <code>.ht</code> from being downloaded as follows:</p>
<pre>AccessFileName .httpdoverride
&lt;Files ~ "^\.ht"&gt;
    Order allow,deny
    Deny from all
    Satisfy All
&lt;/Files&gt;</pre>
<h3>Run mod_security</h3>
<p><a href="http://www.modsecurity.org/">mod_security</a> is a super handy Apache module written by Ivan Ristic, the author of <a href="http://www.dealazon.com/product/0596007248">Apache Security</a> from O&#8217;Reilly press.</p>
<p>You can do the following with mod_security:</p>
<ul>
<li>Simple filtering</li>
<li>Regular Expression based filtering</li>
<li>URL Encoding Validation</li>
<li>Unicode Encoding Validation</li>
<li>Auditing</li>
<li>Null byte attack prevention</li>
<li>Upload memory limits</li>
<li>Server identity masking</li>
<li>Built in Chroot support</li>
<li>And more</li>
</ul>
<h3>Disable any unnecessary modules</h3>
<p>Apache typically comes with several modules installed. Go through the apache <a href="http://httpd.apache.org/docs/2.0/mod/">module documentation</a> and learn what each module you have enabled actually does. Many times you will find that you don&#8217;t need to have the said module enabled.</p>
<p>Look for lines in your <code>httpd.conf</code> that contain <code>LoadModule</code>. To disable the module you can typically just add a <code>#</code> at the beginning of the line. To search for modules run:</p>
<pre>grep LoadModule httpd.conf</pre>
<p>Here are some modules that are typically enabled but often not needed: <code>mod_imap</code>, <code>mod_include</code>, <code>mod_info</code>, <code>mod_userdir</code>, <code>mod_status</code>, <code>mod_cgi</code>, <code>mod_autoindex</code>.</p>
<h3>Make sure only root has read access to apache&#8217;s config and binaries</h3>
<p>This can be done assuming your apache installation is located at <code>/usr/local/apache</code> as follows:</p>
<pre>chown -R root:root /usr/local/apache
chmod -R o-rwx /usr/local/apache</pre>
<h3>Lower the Timeout value</h3>
<p>By default the <code>Timeout</code> directive is set to 300 seconds. You can decrease help mitigate the potential effects of a denial of service attack.</p>
<pre>Timeout 45</pre>
<h3>Limiting large requests</h3>
<p>Apache has several directives that allow you to limit the size of a request, this can also be useful for mitigating the effects of a denial of service attack.</p>
<p>A good place to start is the <code>LimitRequestBody</code> directive. This directive is set to unlimited by default. If you are allowing file uploads of no larger than 1MB, you could set this setting to something like:</p>
<pre>LimitRequestBody 1048576</pre>
<p>If you&#8217;re not allowing file uploads you can set it even smaller.</p>
<p>Some other directives to look at are <code>LimitRequestFields</code>, <code>LimitRequestFieldSize</code> and <code>LimitRequestLine</code>. These directives are set to a reasonable defaults for most servers, but you may want to tweak them to best fit your needs. See the <a href="http://httpd.apache.org/docs/2.0/mod/core.html">documentation</a> for more info.</p>
<h3>Limiting the size of an XML Body</h3>
<p>If you&#8217;re running <code>mod_dav</code> (typically used with subversion) then you may want to limit the max size of an XML request body. The <code>LimitXMLRequestBody</code> directive is only available on Apache 2, and its default value is 1 million bytes (approx 1mb). Many tutorials will have you set this value to 0 which means files of any size may be uploaded, which may be necessary if you&#8217;re using WebDAV to upload large files, but if you&#8217;re simply using it for source control, you can probably get away with setting an upper bound, such as 10mb:</p>
<pre>LimitXMLRequestBody 10485760</pre>
<h3>Limiting Concurrency</h3>
<p>Apache has several configuration settings that can be used to adjust handling of concurrent requests. The <code>MaxClients</code> is the maximum number of child processes that will be created to serve requests. This may be set too high if your server doesn&#8217;t have enough memory to handle a large number of concurrent requests.</p>
<p>Other directives such as <code>MaxSpareServers</code>, <code>MaxRequestsPerChild</code>, and on Apache2 <code>ThreadsPerChild</code>, <code>ServerLimit</code>, and <code>MaxSpareThreads</code> are important to adjust to match your operating system, and hardware.</p>
<h3>Restricting Access by IP</h3>
<p>If you have a resource that should only by accessed by a certain network, or IP address you can enforce this in your apache configuration. For instance if you want to restrict access to your intranet to allow only the 176.16 network:</p>
<pre>Order Deny,Allow
Deny from all
Allow from 176.16.0.0/16</pre>
<p>Or by IP:</p>
<pre>Order Deny,Allow
Deny from all
Allow from 127.0.0.1</pre>
<h3>Adjusting KeepAlive settings</h3>
<p>According to the Apache documentation using HTTP Keep Alive&#8217;s can improve client performance by as much as 50%, so be careful before changing these settings, you will be trading performance for a slight denial of service mitigation.</p>
<p>KeepAlive&#8217;s are turned on by default and you should leave them on, but you may consider changing the <code>MaxKeepAliveRequests</code> which defaults to <code>100</code>, and the <code>KeepAliveTimeout</code> which defaults to <code>15</code>. Analyze your log files to determine the appropriate values.</p>
<h3>Run Apache in a Chroot environment</h3>
<p><code>chroot</code> allows you to run a program in its own isolated <em>jail</em>. This prevents a break in on one service from being able to effect anything else on the server.</p>
<p>It can be fairly tricky to <a href="http://penguin.triumf.ca/chroot.html">set this up using <code>chroot</code></a> due to library dependencies. I mentioned above that the <code>mod_security</code> module has built in chroot support. It makes the process as simple as adding a <code>mod_security</code> directive to your configuration:</p>
<pre>SecChrootDir /chroot/apache</pre>
<p>There are however some caveats however, so check out the <a href="http://www.modsecurity.org/documentation/modsecurity-apache-manual-1.9.html#N1082B">docs</a> for more info.</p>
<h4>Acknowledgments</h4>
<p>I have found the book <a title="Apache Security" href="http://www.dealazon.com/product/0596007248">Apache Security</a> to be a highly valuable resource for securing an apache web server. Some of the suggestions listed above were inspired by this book.</p>
<h4></h4>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/11/securing-apache-web-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to give and receive feedback</title>
		<link>http://www.pomeroy.us/2011/10/how-to-give-and-receive-feedback/</link>
		<comments>http://www.pomeroy.us/2011/10/how-to-give-and-receive-feedback/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 15:39:59 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=416</guid>
		<description><![CDATA[From HP headlines: Imagine setting out on a journey without a map and signposts. That’s what it would be like if you tried to do your job without feedback from customers, partners, members of your team, and other key stakeholders, said Piau-Phang (PP) Foo, managing director and senior vice president of Global Sales, Asia Pacific [...]]]></description>
			<content:encoded><![CDATA[<p>From HP headlines:</p>
<p>Imagine setting out on a journey without a map and signposts. That’s what it would be like if you tried to do your job without feedback from customers, partners, members of your team, and other key stakeholders, said Piau-Phang (PP) Foo, managing director and senior vice president of Global Sales, Asia Pacific and Japan (APJ), in a recent Leading Ideas webcast.</p>
<p>Feedback can be a powerful tool to foster learning and drive better performance. “When executed well and on a consistent basis, it helps get people on track,” said Foo. “It serves as a guide to assist people to know how they are doing and how others perceive their performance.”</p>
<p>Foo cited research that shows that companies that provide frequent feedback energize and motivate their workforce to better performance. They have higher levels of customer satisfaction, hire and retain the best talent, and have better business outcomes.</p>
<p>But giving and receiving feedback, which Foo said is “an objective message about behavior and consequences,” can be challenging. And if you’re like many others, you’ve likely had at least one negative experience when feedback degraded into a verbal wrestling match, an argument about who’s right and wrong.</p>
<p>It doesn’t have to be this way, said Foo. With a little bit of knowledge and preparation, all of us can get better at giving and receiving feedback.</p>
<h3>Ten tips for giving feedback</h3>
<p>In his webcast, Foo offered HP leaders a range of practical and inspiring ideas for making feedback a competitive advantage, starting with giving feedback:</p>
<ol>
<li><strong><em>Set expectations.</em></strong>When someone new joins his team, Foo lets that person know that he typically offers prompt feedback. At the same time, he invites the new employee (and everyone else on his team) to give him prompt feedback, as well.</li>
<li><strong><em>Make it informal.</em></strong>Foo tries to make feedback a regular occurrence. “Feedback works best if it is a continual process and not something you do only once or twice a year in a formal session,” he said. “Sometimes, I say to one of my subordinates, ‘Hey, let’s grab a quick lunch so I can give you some feedback.’”</li>
<li><strong><em>Stay focused.</em></strong>Foo says that it is important to focus on just one or two topics at a time—maybe three at the most—so the person receiving feedback is not overwhelmed.</li>
<li><strong><em>Discuss actions, not attributes.</em></strong>People tend to be more open to practical ideas and suggestions that could enhance their job performance than they are to feedback related to aspects of their personality.</li>
<li><strong><em>Be specific.</em></strong>Convey the facts in an objective way, said Foo. For example, describe how an employee’s actions have had an impact on a customer or another member of the team. Avoid expressing emotions and feelings, which can put the other person on the defensive.</li>
<li><strong><em>Check your assumptions.</em></strong>If you plan to give feedback based on something you’ve heard, be sure to investigate the situation for yourself so you can understand the bigger picture and have more empathy. Careless feedback can harm a relationship. “Whatever feedback you give, make sure it’s correct,” Foo said.</li>
<li><strong><em>Be aware of your motivation.</em></strong>People sometimes use “feedback” as a way to get even with or belittle someone. But that’s not true feedback, said Foo. If you are upset about something, take a time out. “Cool down a little bit. Don’t overreact,” he advised.</li>
<li><strong><em>Be balanced.</em></strong>Don’t just focus on the negative. Take a look over a period of time and give specific examples of what the person receiving feedback has done well. Acknowledge his or her contributions to customers and the team.</li>
<li><strong><em>Suggest ways to improve.</em></strong>It’s easy to say that something’s wrong, but the person giving feedback should spend time in advance thinking about ways to improve. “It’s not up to you to come up with all the solutions, but you can start the process,” said Foo.</li>
<li><strong><em>Agree on a time to follow up.</em></strong> Following up can help make feedback stick, but rather than imposing a timeframe, Foo suggests asking the person receiving feedback when he or she would like to talk about the matter again.</li>
</ol>
<h3>Five tips for receiving feedback</h3>
<p>Foo also offered practical insights for receiving feedback:</p>
<ol>
<li><strong><em>Go beyond welcoming feedback; ask for it.</em></strong>If you really want to benefit from feedback, seek it, Foo advised. “Make an effort. It can be as simple as sending a quick email to a colleague and saying, ‘How did I do?’”</li>
<li><strong><em>Manage your emotions.</em></strong>Many of us find it easy to receive feedback when it is positive, but the moment we hear something challenging, we tend to get defensive. “You really need to manage your emotions,” said Foo. “Evaluate the situation before you respond.”</li>
<li><strong><em>Don’t argue, deny, or try to justify.</em></strong>If the feedback you receive catches you by surprise, try to understand the other person’s point of view before you react. Ask for specific examples. For instance, you could say, “When did you see me doing that?”</li>
<li><strong><em>Keep the proper perspective.</em></strong>Feedback usually relates to a specific area of your life, and now you have the opportunity to do something about it. Remember that it’s not about your entire life or you as a person.</li>
<li><strong><em>Take action.</em></strong> After receiving feedback, you have to make a choice: Are you going to act on it, or are you going to ignore it? “I think we have to take action,” said Foo. “If people are willing to give us feedback and we make an effort, it makes an impression.”</li>
</ol>
<h3>Creating a culture of feedback</h3>
<p>Feedback can help us learn, grow, and be more fulfilled in our jobs. It can help our team reach higher levels of performance. For these reasons, Foo suggests letting others know that you are open to receiving feedback. Those who might offer you helpful suggestions include people on your team, others in HP, partners and customers.</p>
<p>“Feedback is one of the cheapest, most flexible, yet most powerful tools available to everybody for personal and business success,” said Foo. “It is also perhaps the most underused tool that we have to facilitate learning. I would encourage everybody to use it more often.”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/10/how-to-give-and-receive-feedback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More fantastic diving with Mike Severns</title>
		<link>http://www.pomeroy.us/2011/10/more-fantastic-diving-with-mike-severns/</link>
		<comments>http://www.pomeroy.us/2011/10/more-fantastic-diving-with-mike-severns/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 20:38:36 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[travel]]></category>
		<category><![CDATA[diving]]></category>
		<category><![CDATA[maui]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=399</guid>
		<description><![CDATA[Just finished a trip to Maui and had the good fortune of diving again with the crew at Mike Severns diving. The crew this time included dive masters AJ and Warren (as usual) but I also had a chance to dive with dive master Seth too. As usual, Andy did a masterful job as the [...]]]></description>
			<content:encoded><![CDATA[<p>Just finished a trip to Maui and had the good fortune of diving again with the crew at Mike Severns diving. The crew this time included dive masters AJ and Warren (as usual) but I also had a chance to dive with dive master Seth too. As usual, Andy did a masterful job as the captain!</p>
<div id="attachment_397" class="wp-caption alignleft" style="width: 310px"><a href="http://www.networkforensics.us/wp-content/uploads/2011/10/IMG_2076.jpg"><img class="size-medium wp-image-397" title="IMG_2076" src="http://www.networkforensics.us/wp-content/uploads/2011/10/IMG_2076-300x224.jpg" alt="Kihei-Boat-Launch" width="300" height="224" /></a><p class="wp-caption-text">Kihei Boat Launch</p></div>
<div id="attachment_398" class="wp-caption alignleft" style="width: 310px"><a href="http://www.networkforensics.us/wp-content/uploads/2011/10/IMG_2079.jpg"><img class="size-medium wp-image-398" style="margin: 2px 3px;" src="http://www.networkforensics.us/wp-content/uploads/2011/10/IMG_2079-300x224.jpg" alt="" width="300" height="224" /></a><p class="wp-caption-text">Al, Seth, Dani and Andy</p></div>
<p>Two quiet days in October and the weather was fantastic. Day one I got to dive with AJ and Warren, while the second day I dove with Seth. The fact that every single time I head out with these guys, they have outstanding customer service and attitude .. and that&#8217;s not just the awesome sticky buns they consistently provide.</p>
<p>Day one was a great day in the Molokini crater where we saw lots of coral creatures including an extremely large lobster. The second dive at Puu O&#8217;Lai had great visibility and lots of turtles and several amazing (apparently rare) fly-bys of four Spotted Eagle Rays.</p>
<div id="attachment_403" class="wp-caption alignleft" style="width: 310px"><a href="http://www.networkforensics.us/wp-content/uploads/2011/10/DSC04076.jpg"><img class="size-medium wp-image-403" title="DSC04076" src="http://www.networkforensics.us/wp-content/uploads/2011/10/DSC04076-300x158.jpg" alt="Spotted-Eagle-Rays" width="300" height="158" /></a><p class="wp-caption-text">Spotted Eagle Rays</p></div>
<div id="attachment_402" class="wp-caption alignleft" style="width: 310px"><a href="http://www.networkforensics.us/wp-content/uploads/2011/10/DSC04074.jpg"><img class="size-medium wp-image-402  " style="margin: 2px 3px;" title="DSC04074" src="http://www.networkforensics.us/wp-content/uploads/2011/10/DSC04074-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Bubbles off back wall of Molokini</p></div>
<p>Day two we hit the back wall of the Molokini Crater with the (literally) breath-taking 350&#8242; expanse of coral and creatures. Dive two on the second day was at Wailea Point with more very friendly turtles.</p>
<p>Thanks again guys &#8211; hopefully we&#8217;ll see you in another year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/10/more-fantastic-diving-with-mike-severns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress notes for pomeroy.us</title>
		<link>http://www.pomeroy.us/2011/09/wordpress-notes-for-pomeroy-us/</link>
		<comments>http://www.pomeroy.us/2011/09/wordpress-notes-for-pomeroy-us/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 19:09:48 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=390</guid>
		<description><![CDATA[Production site is www.networkforensics.us (or www.pomeroy.us) Development site is dev.networkforensics.us (or dev.pomeroy.us) Assumptions: - webserver root directory is /var/web - production node is called prod - development node is called dev - WordPress database is called wpdb Procedure to copy production WordPress instance to the development node: 1. Copy webserver www root dir via a [...]]]></description>
			<content:encoded><![CDATA[<p>Production site is www.networkforensics.us (or www.pomeroy.us)<br />
Development site is dev.networkforensics.us (or dev.pomeroy.us)</p>
<p>Assumptions:<br />
- webserver root directory is  /var/web<br />
- production node is called  prod<br />
- development node is called  dev<br />
- WordPress database is called  wpdb</p>
<p>Procedure to copy production WordPress instance to the development node:<br />
1. Copy webserver www root dir via a tarball<br />
<code>tar czf prod-20110909.tgz /var/web</code></p>
<p>2. Dump the WordPress database to a MySQL dmp file:<br />
<code>mysqldump -u$mysqluser -p$mysqlpass wpdb | \<br />
&nbsp;gzip -c > prod-20110909.dmp.gz</code></p>
<p>3. Copy these two backup files to the dev node:<br />
<code>scp prod-20110909* user@dev:.</code></p>
<p>On the development node:<br />
4. Unpack the webserver tarball:<br />
<code>mv /var/web /var/web.previous<br />
cd /<br />
tar xzvf prod-20110909.tgz</code></p>
<p>5. Drop the WordPress database and restore the new version:<br />
<code>mysql> drop database wpdb;<br />
mysql> create database wpdp;<br />
$ gunzip prod-20110909.dmp.gz<br />
$ mysql -u$mysqluser -p wpdb < prod-20110909.dmp</code></p>
<p>6. Update the WordPress 'siteurl' and 'home' options to point to the development node:<br />
<code>update wp_options set option_value='http://dev.pomeroy.us' where option_name='siteurl';<br />
update wp_options set option_value='http://dev.pomeroy.us' where option_name='home';</code></p>
<p>Should be all done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/09/wordpress-notes-for-pomeroy-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indianapolis Food Stops!</title>
		<link>http://www.pomeroy.us/2011/09/indianapolis-food-stops/</link>
		<comments>http://www.pomeroy.us/2011/09/indianapolis-food-stops/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 02:33:57 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[nfl]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=341</guid>
		<description><![CDATA[Ok, next time we&#8217;re in Indianapolis to see the Colts, we&#8217;re checking out these places: Zest 1134 E. 54th St. Indianapolis, IN 46220 (317) 466-1853 www.zestexcitingfood.com/]]></description>
			<content:encoded><![CDATA[<p>Ok, next time we&#8217;re in Indianapolis to see the Colts, we&#8217;re checking out these places:</p>
<p>Zest<br />
1134 E. 54th St.<br />
Indianapolis, IN 46220<br />
(317) 466-1853<br />
www.zestexcitingfood.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/09/indianapolis-food-stops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9/11 Tribute Movement</title>
		<link>http://www.pomeroy.us/2011/08/911-tribute-movement/</link>
		<comments>http://www.pomeroy.us/2011/08/911-tribute-movement/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 02:31:58 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=302</guid>
		<description><![CDATA[Few human made disasters in recent history have had a larger impact on the United States, North America, and in fact the western world than the attacks on the World Trade tower buildings. I encourage my friends and acquaintances to visit the 9/11 Tribute Movement website and pledge their memorial activity. Remembrance of those who [...]]]></description>
			<content:encoded><![CDATA[<p>Few human made disasters in recent history have had a larger impact on the United States, North America, and in fact the western world than the attacks on the World Trade tower buildings. I encourage my friends and acquaintances to visit the 9/11 Tribute Movement website and pledge their memorial activity.<a title="9/11 Tribute" href="http://www.911day.org"><img class="alignright size-medium wp-image-301" title="911dayofservice.logo" src="http://www.networkforensics.us/wp-content/uploads/2011/08/911dayofservice.logo_-300x40.png" alt="" width="300" height="40" /></a></p>
<p>Remembrance of those who lost their lives and those who gave their lives in the line of duty is an important act that we all should honor.</p>
<p><a title="911day Pledge" href="http://www.911day.org/tribute/mountain-bike-most-difficult-trail-yet-and-give-minute-silence-top"><img class="alignleft size-full wp-image-304" title="iWill" src="http://www.networkforensics.us/wp-content/uploads/2011/08/iWill.png" alt="" width="234" height="180" /></a> We will be doing our <a title="911day Pledge" href="http://www.911day.org/tribute/mountain-bike-most-difficult-trail-yet-and-give-minute-silence-top">most difficult cross country mountain bike ride and will give a minute of silence</a> at the top in honor of those who lost their lives as well as in support of the survivors.</p>
<p></br>Visit <a title="9/11 Tribute" href="http://www.911day.org">www.911day.org</a> and tell the nation what you&#8217;ll be doing on 9/11/11.</br></br></p>
<p>Update: At 6,398&#8242; on Moose Mountain, we gave a moment of silence.<a href="http://www.networkforensics.us/wp-content/uploads/2011/08/IMG_0473.jpg"><img src="http://www.networkforensics.us/wp-content/uploads/2011/08/IMG_0473-300x225.jpg" alt="Moose Mountain 9/11 Tribute" title="IMG_0473" width="267" height="200" class="alignleft size-medium wp-image-361" /></a></br></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/08/911-tribute-movement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>90 Day Plan for New IT Security Managers</title>
		<link>http://www.pomeroy.us/2011/03/90-day-plan-for-new-it-security-managers/</link>
		<comments>http://www.pomeroy.us/2011/03/90-day-plan-for-new-it-security-managers/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 03:47:16 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=283</guid>
		<description><![CDATA[You&#8217;ve just taken over as an information security director, manager, or architect at an organization. Either this is a new organization that has never had this role before or your predecessor has moved on for some reason. Now what? The following outlines steps that have been shown to be effective (also based on what&#8217;s been [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve just taken over as an information security director, manager, or architect at an organization. Either this is a new organization that has never had this role before or your predecessor has moved on for some reason. Now what? The following outlines steps that have been shown to be effective (also based on what&#8217;s been ineffective) getting traction and generating results within the first three months. Once some small successes are under your belt, you can grow the momentum to help the business grow faster or reduce the risk to their success (or both).</p>
<p><strong>Now what do we do?</strong></p>
<p>Apply a tried and true multi phase approach .. assess current state, determine desired target state, perform a gap analysis, implement improvements based on priority. Basically we need to establish current state, determine what future state should be, and use the gap analysis as the deliverables of the IT security program. There may be many trade-offs that are made due to limiters like political challenges, funding constraints and difficulty in changing corporate culture. The plan you build with the business gives you the ammunition needed to persuade all your stakeholders of the value in the changes you&#8217;ll be proposing.</p>
<p><strong>1. Understand the Current Environment</strong></p>
<p>For a manager or enterprise architect to determine where to start, a current state must be known. This is basically an inventory of what IT security controls, people and processes are in place. This inventory is used to determine what immediately known risks and gaps from relevant security control frameworks exist. The known risks and gaps gives us a starting point to understand where impacts on the business may originate from.</p>
<p>Take the opportunity to socialize foundational security concepts with your new business owners and solicit their input. What are the security related concerns they have? If there has been any articulation of Strengths, Weaknesses, Opportunities, and Threats (SWOT), obtaining that review can also give you an idea of weaknesses or threats that are indicative of missing controls. In the discussions with your new constituents, talk to the infrastructure managers and ask them what security related concerns keep them awake at night – there is likely some awareness but they don&#8217;t know how to move forward. Keep in mind most organizations will want a pragmatic approach versus an ivory tower perfect target state.</p>
<p>Some simple questions can quickly give you a picture of the state of security controls. For example, in organizations I&#8217;ve worked with, the network administrators could not provide me a complete “layer three” diagram – a diagram that shows all the network segments and how they hang together. It wasn&#8217;t that they didn&#8217;t want to, the diagrams simply didn&#8217;t exist. With over 1,500 network nodes over two data centers and two office complexes, the network group had the topology and configuration “in their heads”. Obvious weaknesses and threats include prevention of succession planning or disaster recovery, poor security transparency, and making nearly any change to the environment higher risk than necessary.</p>
<p>Another example is an organization that had weak asset control. At any point in time it was nearly impossible to determine if unauthorized network nodes existed, since the workstation, notebook, server, virtual machine, switches, firewalls, printers and any other network connected equipment were tracked separately, if at all. No regular audits were performed to reconcile what the organization had purchased was actually what was connected to their networks. This points to weak change control and weak asset control. Without strong asset control, it is difficult to offer assurance to the business owners that serious vulnerabilities have been mitigated to a level they can accept.</p>
<p><a href="http://www.networkforensics.us/wp-content/uploads/2011/03/issue-register.png"><img class="alignright size-medium wp-image-280" title="issue-register" src="http://www.networkforensics.us/wp-content/uploads/2011/03/issue-register-300x66.png" alt="" width="300" height="66" /></a></p>
<p>Ensure you&#8217;re asking questions that will allow you to develop future metrics, such as:</p>
<ul>
<li>Do security controls that are in place generate measurable performance statistics?</li>
<li>How many user accounts are added, disabled, deleted per day/week/month/quarter?</li>
<li>What volume of inbound email is spam/malware?</li>
<li>Does the operations team have baselines of normal network, system, application activity?</li>
<li>Profile of user accounts &#8211; how many are inactive (say 90 days)</li>
<li>How automated is the new hire, dehire, change process? Is there room for manual error?</li>
<li>How many administrator accounts are there (percentage of all accounts)</li>
<li>What degree of individual user accountability is there? Are there signed acceptable use agreements?</li>
<li>Are there accurate network topology and security zone as-built diagrams?</li>
<li>Is there clear segregation of assets that contain high value data?</li>
<li>Are content filtering and malware controls deployed?</li>
</ul>
<p>All these identified issues can then be dropped into a mind map or even a spreadsheet to visualize the highest risks. More on this in a minute.</p>
<p><strong><span id="more-283"></span>2. Determine Target State</strong></p>
<p>Next there must be a clear understanding of business goals, since IT (and IT security) always needs traceability back to the goals of a business. Application of good architecture practice then leads to being able to generate a &#8216;future state&#8217; and a gap analysis. You don&#8217;t have time for a full heavy weight analysis, so a good place to start here is to identify what external regulatory compliance mandates exist &#8211; there likely are multiples. For example, financial integrity and reporting requirements (SOX / CSOX / JSOX / GLB / Basel / <a href="https://www.pcisecuritystandards.org/security_standards/index.php">PCI-DSS</a>), privacy (CA-SB-1384, PIPA), critical infrastructure (<a href="http://www.nerc.com/page.php?cid=2|20">NERC CIP</a>), government IT systems (<a href="http://csrc.nist.gov/groups/SMA/fisma/index.html">FISMA</a>), and health records (HIPAA). Over and above the external regulatory requirements, there may also be a requirement for voluntary or internal compliance mandates, such as corporate policy compliance.</p>
<p>Keep in mind that where a framework like <a href="http://en.wikipedia.org/wiki/ISO/IEC_27002">ISO 27002</a> or <a href="http://www.nist.org/nist_plugins/content/content.php?cat.17">NIST SP 800-53</a> is used, there may be some latitude. For example, your organization may decide that some controls in the framework are not applicable, and exclude them.  So a &#8220;C&#8221; or &#8220;C+&#8221; may be as good as your organization wants to get. That&#8217;s ok, as long as it&#8217;s a concerted decision and you can still hit your mandatory targets.</p>
<p>This is an area where there may a need for substantial effort, so using a common security control framework like ISO 27002 or NIST 800-53 can give a somewhat logical progression of capability maturity that you can build on to close the gaps and start to get a better foundation in place that allows your IT security program to be sustainable. The other benefit to getting to know a good framework is that many compliance mandates are attainable by using the controls in these frameworks – although you may need to adjust a little here or there. The frameworks also act as a checklist for areas to ensure are addressed adequately for your organization.</p>
<p>While using your chosen control framework, also consider a capability maturity level, such as what is outlined in the Carnegie Mellon software Capability Maturity Model (CMM). Where you find deficiencies, choosing controls and configurations that phase in a new control gradually over some predetermined period of time versus expecting a sudden transition from low capability to high capability allows the organization to adapt and culturalize the new controls.</p>
<p><a href="http://www.networkforensics.us/wp-content/uploads/2011/03/it-roadmap.png"><img class="alignright size-medium wp-image-281" title="it-roadmap" src="http://www.networkforensics.us/wp-content/uploads/2011/03/it-roadmap-300x215.png" alt="" width="300" height="215" /></a>I would suggest using the control framework categories so you can cross reference the issues you&#8217;ve uncovered to controls in the framework – you&#8217;ll use this to help triage what needs to be focused on first, while helping to capture that data in a way you&#8217;ll use for the long term plan.</p>
<p><strong>3. Assess Highest Risks and Identify Operational Wins (gap analysis)</strong></p>
<p>A successful security plan includes executive endorsement of policy, standards, procedures and guidelines. That said, start with the highest risks you identified in step one. Especially the risks that have simple or inexpensive controls that would work. Remember to integrate metrics where possible to enable feedback and improvement. See <a href="http://www.securitymetrics.org">www.securitymetrics.org</a> for examples of good metrics.</p>
<p>Ensure you are improving:</p>
<ul>
<li>Situational awareness (logging, monitoring, reporting and visibility)</li>
<li>Response capability to Computer Security Incidents</li>
<li>Long term security controls (build the foundation so you&#8217;re not always fighting fires)</li>
</ul>
<p>There are several assessment methodologies available, including the NSA IAM, Canadian RCMP TRA and Open Source Risk Assessment toolkits and methodologies.</p>
<p><strong>4. Implement Controls to Mitigate Risks</strong></p>
<p>Long term you want to introduce a way to reduce the daily crisis response, by building up the foundational maturity of the organization&#8217;s security controls. Short term you need to get some of the major issues and exposures fixed.</p>
<p><a href="http://www.networkforensics.us/wp-content/uploads/2011/03/priorities.png"><img class="alignright size-medium wp-image-282" title="priorities" src="http://www.networkforensics.us/wp-content/uploads/2011/03/priorities-300x150.png" alt="" width="300" height="150" /></a>Finally changes to process and possibly organization can complete the ability of IT security to stay evergreen (sustainable). Once you&#8217;ve made some changes to the environment, it&#8217;s important to ensure there is management metrics and process implemented to sustain the changes you&#8217;ve made. For instance, if an asset inventory has been done, the value of that goes out the window if there is no measurable, enforceable process to keep the inventory accurate.</p>
<p>Work the evaluation process with your stakeholders and senior management to ensure you are building your roadmap with their support. Laying out a long term plan and showing where you are in the plan will allow you to get increased executive buy-in for more expensive and possibly organizational changes.</p>
<p>You will find that the focus on issues, from whatever source they have been discovered (Architecture Assessments through actual Security Incidents), will tend to be on the highest criticality. This will result in projects or funding for efforts to close a particular issue or exposure &#8211; but still results in fire-fighting. You need over the term of your 90 days to ensure you socialize the IT Security Program framework that includes short-term fire-fighting (Urgent) -AND- long term (Foundational) work. This is more than a simple compliance mandate, since companies can be fully compliant with all regulatory mandates, but still get pwned. A rational application of a framework like ISO 27002 or NIST SP 800-53 can result in compliance success and good security.</p>
<p>You will be presented with &#8220;stakeholders&#8221; that insist on massively grand Total Cost of Ownership (TCO) or foundational Security Policy work, but you must resist such efforts that will undermine and ultimately defeat good security.</p>
<p>This is a plan that I&#8217;ve found helpful to survive the first 90 days and possibly build and maintain a positive working relationship with your senior management as they see value in the IT security program. At that point you will have an IT security program that actually works for the organization and is cost effective.</p>
<p><strong>5. Publish a Schedule of Audits</strong></p>
<p>Once some of the foundational controls are in place, gain acceptance and buy-in from your constituents through the use of a well known internal audit schedule. This will help to confirm the effectiveness of steps 1 through 4 and helps in reducing the amount of effort required to perform audits for regulatory mandate compliance proof. In some cases, you may be able to combine these audits, although what you are trying to do here is ensure all the controls you have put into place are functioning as expected, while external audits may not go that deep.</p>
<p>Once you have these steps in place, your security posture will improve and you will experience less fire-drills around suspected incidents.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pomeroy.us/2011/03/90-day-plan-for-new-it-security-managers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a new PVR</title>
		<link>http://www.pomeroy.us/2011/02/building-a-new-pvr/</link>
		<comments>http://www.pomeroy.us/2011/02/building-a-new-pvr/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 21:16:02 +0000</pubDate>
		<dc:creator>apomeroy</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[pvr]]></category>
		<category><![CDATA[server]]></category>

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

