<?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>Morgajel.net &#187; Linux</title>
	<atom:link href="http://morgajel.net/category/open-source/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://morgajel.net</link>
	<description>Stemming the flow of evincible Ignorance. We must try to understand for the sake of understanding.</description>
	<lastBuildDate>Sun, 25 Jul 2010 20:48:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Raw WinXP Virtualbox Partitions on a Thinkpad</title>
		<link>http://morgajel.net/2010/07/13/879</link>
		<comments>http://morgajel.net/2010/07/13/879#comments</comments>
		<pubDate>Tue, 13 Jul 2010 17:50:30 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/?p=879</guid>
		<description><![CDATA[New job, new laptop. Many utilities here are windows only, so it requires a bit of&#8230; effort&#8230; to get myself up and running efficiently. The solution to the windows problem is VirtualBox. I had set this up on my last laptop with little effort, but this time around required a bit more effort. Hopefully the [...]]]></description>
			<content:encoded><![CDATA[<p>New job, new laptop. Many utilities here are windows only, so it requires a bit of&#8230; effort&#8230; to get myself up and running efficiently. The solution to the windows problem is VirtualBox. I had set this up on my last laptop with little effort, but this time around required a bit more effort. Hopefully the instructions below will help others get up and running quickly.</p>
<p><strong>Disclaimer</strong>- your laptop may catch on fire and explode (or worse) if you attempt this&#8230; or something.</p>
<p>We&#8217;ll be presuming that you&#8217;ve already resized your windows partition and have both a working Windows and Linux partition.</p>
<h2>In Windows</h2>
<p>Log into XP, grab <a rel="nofollow" href="http://www.virtualbox.org/attachment/wiki/Migrate_Windows/MergeIDE.zip">MergeIDE.zip</a> from Virtualbox&#8217;s site, extract and run it. It should be a quick flash and be done. (Note: I am not 100% sure this step is needed)</p>
<p>Create a new hardware profile and name it <strong>virtualbox</strong>. Make sure to set it as a choice during boot. Try rebooting into native windows once to ensure that it does offer you profile options.</p>
<h2>In Linux</h2>
<p>You&#8217;ll need the following packages installed (May differ for non-ubuntu systems):<br />
<code>mbr, virtualbox-ose, virtualbox-ose-qt</code></p>
<p>Create a stand-alone mbr file to use for booting (yes, you need the force flag):</p>
<p><code>install-mbr ~/.VirtualBox/WindowsXP.mbr --force</code></p>
<p>We&#8217;re presuming that your windows partition is /dev/sda1. In the below command, we are defining</p>
<ul>
<li>a vmdk file (WindowsXP.vmdk)</li>
<li>which raw disk to read (/dev/sda)</li>
<li>which partition (1)</li>
<li>the new MBR file we just created</li>
</ul>
<p><code>VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WindowsXP.vmdk -rawdisk /dev/sda -partitions 1 -mbr ~/.VirtualBox/WindowsXP.mbr -relative -register</code></p>
<p>Note that you&#8217;ll need read/write access to that drive as your user, so you may want to figure out a cleaner/securer way to implement this, rather than adding your user to the disk group (which is very dumb and insecure). I would, but it&#8217;s working and I have more important things to do at the moment.</p>
<p>Another issue- apparently thinkpads report the <a href="http://ubuntuforums.org/showthread.php?p=6716355">drive heads and cylinders oddly</a> (T410 for me and T60p in article), so we have to add some vmdk settings before virtualbox creates them incorrectly. Open ~/.VirtualBox/WindowsXP.vmdk and add the following at the bottom:<br />
<code><br />
ddb.geometry.biosCylinders="1024"<br />
ddb.geometry.biosHeads="240"<br />
ddb.geometry.biosSectors="63"<br />
</code><br />
The biosHeads appears to be the magic value- it seems to work if it&#8217;s set to 240, but the default is 255 (which fails).</p>
<p>Once you add those, start up virtualbox and check the virtual media manager, your new vmdk should be listed there. Once it&#8217;s confirmed, create a new virtual machine. Rather than creating a disk, select your vmdk as an existing disk.</p>
<p>After you finish, go the the VM settings-&gt;system and make sure the motherboard tab as io-apic  enabled (I also had PAE/NX enabled under processor and VT-x enabled under Acceleration).</p>
<h2>Start the VM</h2>
<p>There are several errors that could pop up. I&#8217;m sure there are plenty more that I stumbled across, but these were the two big ones:</p>
<ul>
<li><strong>a disk read error occurred, press ctrl+alt+del to restart </strong>- Caused by incorrect biosHeads- check and make sure it&#8217;s set to 240 (this was the fix for me, results may vary).</li>
<li><strong>Complaint about kvm/vmx</strong> &#8211; Virtualbox does not like kvm. Uninstall qemu-kvm.</li>
</ul>
<p>If things go well, it should flicker mbr in the corner, then go to the hardware profile selection screen. Select the virtualbox profile, and continue, then log in.</p>
<p>What follows is a half-hour of installing generic drivers and dealing with hardware specific auto start apps complaining that they won&#8217;t work on this installation. Windows will warn that the new drivers are not blessed, so be forewarned.</p>
<p>Once completed, at the top of the VM windows select Devices-&gt; Install Guest Additions. This will download and mount an ISO, and windows will pop open a folder with the addition executables. Select the one best for you and run the installer. It will prompt you for video and mouse drivers (and trust me, you want them).</p>
<p>The final step is to shut down the windows VM, then reboot into the native windows partition to make sure it still works.  I did receive a few blue-screens before logging in at the beginning, but they appeared random and haven&#8217;t happened since.</p>
<p>And that&#8217;s all there is to it- simple, eh? Your windows partition should now run in native mode and vm mode.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2010/07/13/879/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shutup Shutup Shutup!</title>
		<link>http://morgajel.net/2008/05/23/247</link>
		<comments>http://morgajel.net/2008/05/23/247#comments</comments>
		<pubDate>Fri, 23 May 2008 17:34:25 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://morgajel.net/2008/05/23/247/</guid>
		<description><![CDATA[die you wretched pc speaker beep that is so loud when I use the find bar in firefox or tab complete in the cli and nothing is found! rmmod pcspkr echo blacklist pcspkr >> /etc/modprobe.d/blacklist aaah, glorious silence.]]></description>
			<content:encoded><![CDATA[<p>die you wretched pc speaker beep that is so loud when I use the find bar in firefox or tab complete in the cli and nothing is found!</p>
<pre>
  rmmod pcspkr
  echo blacklist pcspkr >> /etc/modprobe.d/blacklist
</pre>
<p>aaah, glorious silence.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/05/23/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Request Tracker 3.6.5 broken after updating Cent OS</title>
		<link>http://morgajel.net/2008/04/07/241</link>
		<comments>http://morgajel.net/2008/04/07/241#comments</comments>
		<pubDate>Mon, 07 Apr 2008 15:59:18 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/2008/04/07/241/</guid>
		<description><![CDATA[Can&#8217;t locate object method &#8220;seek&#8221; via package &#8220;File::Temp&#8221; at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 816. The underlying problem is perl was updated and overwrote the &#8220;correct&#8221; version of File::Temp that you probably installed when setting up RT and forgot about. To fix this issue cpan install File::Temp /etc/init.d/httpd restart MAKE SURE TO RESTART APACHE! I didn&#8217;t, and it [...]]]></description>
			<content:encoded><![CDATA[<p> Can&#8217;t locate object method &#8220;seek&#8221; via package &#8220;File::Temp&#8221; at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 816.</p>
<p>The underlying problem is perl was updated and overwrote the &#8220;correct&#8221; version of File::Temp that you probably installed when setting up RT and forgot about. To fix this issue</p>
<p><code><br />
cpan install File::Temp<br />
/etc/init.d/httpd restart<br />
</code></p>
<p>MAKE SURE TO RESTART APACHE! I didn&#8217;t, and it cost me probably 2 hours of screwing around with it.</p>
<p>I&#8217;m posting this because<br />
<a href="http://www.nabble.com/RT-3.6.5-and-Sendmail-error-and-looks-like-perl-error-td15989015.html">http://www.nabble.com/RT-3.6.5-and-Sendmail-error-and-looks-like-perl-error-td15989015.html</a><br />
Didn&#8217;t really mention what the final working solution was.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/04/07/241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>28</title>
		<link>http://morgajel.net/2007/12/31/230</link>
		<comments>http://morgajel.net/2007/12/31/230#comments</comments>
		<pubDate>Mon, 31 Dec 2007 06:30:29 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dreams]]></category>
		<category><![CDATA[Ian]]></category>
		<category><![CDATA[Jackie]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/12/31/230/</guid>
		<description><![CDATA[Whew, it&#8217;s been a busy year. Back in 2005 I wrote a list of things I&#8217;d like to do eventually that I&#8217;d be able to do if I had the time and resources that winning the lotto would provide. I&#8217;ve made a positive step towards realizing a couple of those. Family The big change this [...]]]></description>
			<content:encoded><![CDATA[<p>Whew, it&#8217;s been a busy year. Back in 2005 I wrote a list of things I&#8217;d like to do eventually that I&#8217;d be able to do if I had the time and resources that winning the lotto would provide. I&#8217;ve made a positive step towards realizing a couple of those.</p>
<h2>Family</h2>
<p>The big change this year was the addition of Ian. We didn&#8217;t get off too well in the beginning, but we&#8217;re doing pretty good now. He&#8217;s just now to the point where he&#8217;s taking his first steps. He&#8217;s a smart kid, very inquisitive, but stubborn. Within a few years he&#8217;ll be learning how to read and write- I&#8217;m guessing it won&#8217;t be long until I&#8217;m teaching him how to program. He&#8217;s got an eye for any type of electronics, but goes nutty for my blackberry or laptop. Yeah, he&#8217;s a geek in training.</p>
<p>Jackie&#8217;s been doing fairly well, all things considered. She&#8217;s been staying home with Ian rather than going back to work, and it&#8217;s driving her a little stir crazy. To help ease the cabin fever, she got a laptop for christmas- Ian wasn&#8217;t letting her stay in the office, so now she has a way to keep in contact with people from the living room.</p>
<h2>Weddings</h2>
<p>This was the year of the wedding&#8230; Brad and Erin, Jordan and Beth, Matt and Carrie, William  and Charleen, Jackie&#8217;s friend Joslyn, Jackie&#8217;s sister Lori, and Paul and Kristen. I only made it to 4 of the weddings, but I was standing up in two of them. The ones we went to were all in Grand Rapids, so we had the joy of driving back and forth 155 miles each way, with the added bonus of dropping Ian off somewhere along the way</p>
<h2>Work</h2>
<p>Work started off pretty rough. I have a habit of reflecting the attitudes of those around me, and my supervisor at the beginning of the year was pretty negative. That coupled with Ian&#8217;s birth and all the associated expenses turned me into a pretty miserable person. Fortunately the supervisor left and was replaced with a cautious optimist. Things got better- so much so that I just passed the 1 year mark at my current place and still find it interesting and entertaining.</p>
<h2>Technologies</h2>
<p>I&#8217;ve played with many new technologies this year- Jboss, Netscaler and CentOS being the three foremost. I&#8217;ve dug back into ruby with a couple of new projects, as well as LDAP and a plethora of new utilities. I even picked up a bit of python. This trend doesn&#8217;t look like it&#8217;s gonna let up, so the job should be exciting and interesting for some time to come.</p>
<h2>Projects</h2>
<p>This year saw me move away from music and go back towards software (although I have been playing harmonica in the car at stoplights on the way to work). I joined the Luma team as head cheerleader and started the QT4 branch. After becoming frustrated with the python, qt3->qt4 transition and the codebase in general, I started an unofficial sister project, <a href="http://rubyforge.org/projects/ruma/">Ruma</a>. I still sit in the Luma channel and help when I can, but I&#8217;m gonna sit back and wait until we&#8217;re ready for QT4- hopefully we&#8217;ll scrap the entire codebase and start fresh.</p>
<p>Right now I have two other developers &#8220;working&#8221; for me on Ruma, Lars and Hiro. They&#8217;ve put a lot of effort into bringing this bad boy to life, and I&#8217;m thankful I&#8217;ve had their help. For those of you not aware, Luma and Ruma are <a href="http://en.wikipedia.org/wiki/LDAP">LDAP</a> administration tools. As a System Administrator, I use LDAP a lot, so having specialized tools can be helpful.</p>
<p>Another project I started this year was competing in National Novel Writing Month. I finished the rough draft for my first book, <a href=http://www.nanowrimo.org/eng/user/243541"">Sinblade</a>, a week early. It&#8217;s only 150 pages or so, but not a bad start all things considered. Jackie&#8217;s (sorta) working on revising it, and once she&#8217;s done I&#8217;ll open it up for others to start giving me feedback. I&#8217;m excited and nervous about it. If it takes off and people like it, I have 6 or so more books that I&#8217;m interested in writing.</p>
<p>The money situation is still pretty tight, but it&#8217;s getting better. Hopefully next year will be as much of an improvement over this year as this was over last year.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/12/31/230/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LDAP+ Sudo +TLS fix</title>
		<link>http://morgajel.net/2007/10/09/221</link>
		<comments>http://morgajel.net/2007/10/09/221#comments</comments>
		<pubDate>Tue, 09 Oct 2007 18:08:35 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/10/09/221/</guid>
		<description><![CDATA[For those of you who can&#8217;t get those three to work together, make sure you specify both TLS_CACERT tls_cacertfile- I didn&#8217;t and it caused me grief.]]></description>
			<content:encoded><![CDATA[<p>For those of you who can&#8217;t get those three to work together, make sure you specify both TLS_CACERT tls_cacertfile- I didn&#8217;t and it caused me grief.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/10/09/221/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Epson Perfection v350 on Ubuntu Feisty Fawn</title>
		<link>http://morgajel.net/2007/09/02/219</link>
		<comments>http://morgajel.net/2007/09/02/219#comments</comments>
		<pubDate>Sun, 02 Sep 2007 23:11:59 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/09/02/219/</guid>
		<description><![CDATA[Ok, I&#8217;ve done it twice now, I think I&#8217;ve figured it out. Get the source files from Epson&#8217;s linux website; I don&#8217;t recall the url but these are the files you need (or newer, no idea what the future holds): iscan-2.3.0-1.c2.i386.rpm iscan-plugin-gt-f700-2.0.0-0.c2.i386.rpm Use alien to convert them to debs (normally bad, but acceptable this time [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;ve done it twice now, I think I&#8217;ve figured it out.<br />
Get the source files from Epson&#8217;s linux website; I don&#8217;t recall the url but these are the files you need (or newer, no idea what the future holds):</p>
<pre>
iscan-2.3.0-1.c2.i386.rpm
iscan-plugin-gt-f700-2.0.0-0.c2.i386.rpm
</pre>
<p>Use alien to convert them to debs (normally bad, but acceptable this time around).</p>
<p>Install both newly created deb packages with dpkg:<br />
<code>dpkg -i iscan_2.3.0-2_i386.deb iscan-plugin-gt-f700_2.0.0-1_i386.deb</code><br />
Install sane, sane-utils:<br />
<code><br />
apt-get install sane sane-utils<br />
</code></p>
<p>Edit /etc/sane.d/dll.conf, replacing epson with epkowa (yes, I&#8217;m serious).</p>
<p>add the following to /etc/udev/rules.d/45-libsane.rules:<br />
<code><br />
# Epson Perfection v350<br />
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="012f", MODE="664", GROUP="scanner"<br />
</code></p>
<p>And I think that&#8217;s about it. Make sure you&#8217;re in the scanner group, and run:<br />
<code><br />
scanimage -L<br />
</code></p>
<p>That should simply list your scanner- if it doesn&#8217;t let me know- I might have missed something. From this point on you should be able to access the scanner with either sane or iscan.</p>
<p>The one downside to this driver is it doesn&#8217;t do the full 48000 PSI, only 24000- this means a scan of a guitar pick is *only* 16 inches across, rather than 32 inches <img src='http://morgajel.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Unfortuantely it&#8217;s not the preferred resolution for negatives.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/09/02/219/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unicron</title>
		<link>http://morgajel.net/2007/03/30/195</link>
		<comments>http://morgajel.net/2007/03/30/195#comments</comments>
		<pubDate>Fri, 30 Mar 2007 13:42:46 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Hobbies]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/03/30/195/</guid>
		<description><![CDATA[So I got the new hardware parts, so I figured I might as well document the process. I&#8217;ve decided on the name Unicron because it&#8217;s the biggest PC I&#8217;ve ever owned. I&#8217;ve been waiting over a year to really rebuild my servers- since I ran out of ide connectors in Pablo, I knew something had [...]]]></description>
			<content:encoded><![CDATA[<p>So I got the new hardware parts, so I figured I might as well document the process.  I&#8217;ve decided on the name Unicron because it&#8217;s the biggest PC I&#8217;ve ever owned. I&#8217;ve been waiting over a year to really rebuild my servers- since I ran out of ide connectors in Pablo, I knew something had to change.</p>
<p>The new case is MASSIVE- it&#8217;s sitting next to jackie&#8217;s machine and is a good 6&#8243; longer and 3&#8243; higher. processor went in easy, as did the ram. motherboard went in fine, and the harddrive rails (with rubber footies to prevent vibration noise ) made it a painless job of inserting drives and wiring them up.</p>
<p>The first problem I noticed right away- the Ars Technica review said it came with a power supply, but apparently I didn&#8217;t buy it from the same vendor, and hence ran into roadblock #1. I also noticed that, rather carelessly, I didn&#8217;t verify there was an onboard video card. Having only PCIe and PCI slots, none of my AGP cards would fit.  After a bit of digging, I found an old 8mb Trident card from the late 90&#8242;s and popped it in. it won&#8217;t run a gui installer, but I don&#8217;t need it <img src='http://morgajel.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The next real problem was that Ubuntu 6.10 doesn&#8217;t recognize sata hardware raid- it&#8217;s seeing all 4 drives individually.  This is probably going to be the showstopper. I&#8217;m pretty sure that once installed, it&#8217;ll handle them fine, but it leads me to a chicken and egg scenario. I have a couple of possibilities:</p>
<p>1) I need to figure out which Linux raid driver this chipset uses and load it into the kernel, then re-detect the drives. This seems like the most obvious fix, but the real question is &#8220;why didn&#8217;t it already do this?&#8221; My fear is there is no Linux driver for the hardware raid.</p>
<p>2) throw an IDE drive in, install to it, then run the installer from the fully loaded Ubuntu install rather than the trimmed down install disk. the one flaw with this plan is there is only one IDE chain, meaning the cdrom and IDE HD have to play nicely during the install. So far they haven&#8217;t- booting of the install CD gives me errors about hdb not being ready, and then booted every so slowly to the first set of prompts. I had to head to work before I even got to the partitioning section.</p>
<p>I&#8217;ll hopefully get a chance to try more this weekend. Updates to follow.</p>
<p>UPDATE: the board is an ASUS M2N-E, so if you know how to get raid5 working in ubuntu, let me know.</p>
<p>UPDATE 20070331: you ever notice how when you look at something for months and it never changes, you forget the details? I noticed (after getting a full night&#8217;s sleep) that there WAS a wait to set up software raid in Ubuntu&#8217;s installer, I was just blind. So after talking to shaldannon and the trilug guys, I decided to go with the following partition scheme:</p>
<p>200meg (md0), raid 1 (sda1, sdb1)<br />
1gig   (md1), raid 1 (sda2, sdb2)<br />
1.5Tb  (md2), raid 5 (sda3, sdb3, sdc2, sdc2)<br />
1gig   (md3), raid 1 (sdc1, sdd1)</p>
<p>Once that was done, the installation was a breeze.  Ubuntu is now installed and I&#8217;m slowly but surely re-implementing everything.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/03/30/195/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Useful Utility: diff</title>
		<link>http://morgajel.net/2007/03/29/85</link>
		<comments>http://morgajel.net/2007/03/29/85#comments</comments>
		<pubDate>Thu, 29 Mar 2007 14:55:16 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://morgajel.net/2006/02/21/85/</guid>
		<description><![CDATA[Diff is a handy little command used to compare two text files- useful if trying to determine what&#8217;s changed in different versions of files, used by subversion to show what files have been changed, and can even create patch files for updating sourcecode. So what are some of the more useful flags? * -i lets [...]]]></description>
			<content:encoded><![CDATA[<p>Diff is a handy little command used to compare two text files- useful if trying to determine what&#8217;s changed in different versions of files, used by subversion to show what files have been changed, and can even create patch files for updating sourcecode. So what are some of the more useful flags?</p>
<p>*  -i lets us ignore any capitalization changes<br />
*  -b lets us ignore any spacing changes<br />
*  -B ignore blank lines<br />
*  -w just ignore all white spaces<br />
*  -q just say if the files are different<br />
*  -y side by side comparison<br />
*  -r recursively compare directories<br />
*  -d find a smaller set of changes<br />
*  -u unified format</p>
<p>I often use the unified format(-u) simply because I find the +/- more intuitive than >/< .  The whitespace and capitalization ignoring is great if you change the indentation of a file or fix a comment's capitalization, but don't want to make a big deal of it. Another great use is comparing directories- for example, before upgrading apache,  make a backup copy of /etc/apache, run the upgrade, then run diff -rq /etc/apache.bak /etc/apache to see a list of files that were modified. Once you get that list, you can use diff to compare the two versions on a more granular level. Not a great example, but I have been in situations were I needed to compare two directories to see what had changed.</p>
<p>So what are some of the more unique uses? You can use the -s flag to confirm two files are the same or exclude files from a recursive compare with -x pattern. You can also use stdin for one of the comparisons with cat foo|grep badstuff | diff - bar or cat foo|grep badstuff | diff bar -. You can even create a patch file with diff -Naur file.old file.new >file.patch.</p>
<p>If you have any other uses for diff, leave them in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/03/29/85/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Utility: route</title>
		<link>http://morgajel.net/2007/03/24/112</link>
		<comments>http://morgajel.net/2007/03/24/112#comments</comments>
		<pubDate>Sat, 24 Mar 2007 07:25:37 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/03/24/112/</guid>
		<description><![CDATA[Route is one of these hate-inspiring, jaw droppingly obtuse programs that you always get the syntax wrong on. The purpose is simple enough- show and/or change the routing table. The most common uses are: route &#8211; shows the current entries route add &#8211; adds a new entry route del &#8211; removes an entry route flush- [...]]]></description>
			<content:encoded><![CDATA[<p>Route is one of these hate-inspiring, jaw droppingly obtuse programs that you always get the syntax wrong on.  The purpose is simple enough-  show and/or change the routing table. The most common uses are:</p>
<ol>
<li><b>route</b> &#8211; shows the current entries</li>
<li><b>route add</b>  &#8211; adds a new entry</li>
<li><b>route del</b> &#8211; removes an entry</li>
<li><b>route flush</b>- removes all entries</li>
</ol>
<p><b>Checking out your Routes</b><br />
The simplest use of route is to simply run route at the command line:</p>
<pre>
morgajel@p-nut ~ $ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
</pre>
<p>You&#8217;ll see 3 routes total in this example (which is very simple)- The first route points all 192.168.0.x traffic to the network card(eth0), the second points all loopback traffic (127.x.x.x) back to the local device (lo), and anything that doesn&#8217;t fit into either of those categories goes to the network card (eth0).  You may wonder why that first route is in there if the default would just catch it anyways- you see, this allows multiple network cards to point traffic to different gateways or routers on the same network.<br />
Take the next example:</p>
<pre>
morgajel@p-nut ~ $ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.100.0.0     10.100.0.1              255.255.0.0   U     0      0        0 eth1
192.168.7.0     192.168.7.1               255.255.0.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
</pre>
<p>all of your normal traffic would proceed to 192.168.0.1, but any traffic to 192.168.7.x would go to a different gateway(192.168.7.1) and all traffic to 10.100.x.x would go to a secondary network card(eth1) and be sent to yet another gateway (10.100.0.0). This would be useful if you were using a load balancing device like a Netscalar or F5, or if you had an internal network and a secondary DMZ&#8217;d network or something.</p>
<p><b> Adding and Removing Routes</b><br />
if you&#8217;re manually setting up routes for a static IP, you&#8217;ll generally do something like</p>
<pre>
route add default gw 192.168.0.1
</pre>
<p>or remove it with </p>
<pre>
route del default
route del -net 192.168.0.0 netmask 255.255.0.0 eth1
</pre>
<p>Deleting routes is always the pain- the default route you can simply remove like the first example, but anything else needs the netmask specified and the -net flag used. If you want to see some more examples of routes, try</p>
<pre>
route -C
</pre>
<p>This will show you&#8230; uh, I guess the dynamic routes that have been recently used and cached. If you&#8217;re unsure about how to remove or add a route, you can run &#8220;route add&#8221; or &#8220;route del&#8221; without any addition parameters to see more options- I think the most I&#8217;ve used is something like</p>
<pre>
route add -net 10.100.32.0 netmask 255.255.248.0 gw 10.100.32.1 eth0
</pre>
<p><b>Final Thoughts</b><br />
One thing that I learned while writing this is that there is an additional parameter called &#8220;reject&#8221; which you can append to the end of an add line to basically form a crude firewall to that route ( note- it&#8217;s not really a firewall, but it will reject packets). And of course, to get rid of any line you&#8217;ve added, you can change an add to a del and it&#8217;ll probably remove it (you may need to remove some add-specific parameters like reinstate or mss).</p>
<p>The manpage is pretty straightforward and has some decent examples- Looking at it, I&#8217;m not sure why I&#8217;ve had such problems with route in the past. Overall it seems pretty simple as long as you get the del syntax correct. Overall I think writing this helped me more than it&#8217;ll probably help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/03/24/112/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New OS: Kubuntu 6.10</title>
		<link>http://morgajel.net/2006/12/16/177</link>
		<comments>http://morgajel.net/2006/12/16/177#comments</comments>
		<pubDate>Sun, 17 Dec 2006 02:31:14 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/2006/12/16/177/</guid>
		<description><![CDATA[Ok, trying out Kubuntu on my new work laptop and I&#8217;m liking it quite a bit- the only problems I&#8217;ve had so far are with Hibernate (which I think is self- inflicted) and wireless stuff. I&#8217;ve figured out the wireless stuff and wanted to mention it for the people out there having the same troubles [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, trying out Kubuntu on my new work laptop and I&#8217;m liking it quite a bit- the only problems I&#8217;ve had so far are with Hibernate (which I think is self- inflicted) and wireless stuff. I&#8217;ve figured out the wireless stuff and wanted to mention it for the people out there having the same troubles as I did. First up, a little info on my setup:</p>
<p><b>Model:</b> IBM T42 (note, not the T42p, which is awesome, the crappier model)<br />
<b>OS:</b> Kubuntu 6.10<br />
<b>Wireless NIC:</b>  Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)<br />
<b>Wireless Driver:</b> ipw2100 1.3</p>
<h2>Wireless</h2>
<p>There are a lot of choices for network setup, and since I use WPA2 with PSK, I&#8217;m going to document that.</p>
<p>in /etc/network/interfaces:<br />
<code> auto eth1<br />
 iface eth1 inet dhcp<br />
 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf.local<br />
</code><br />
in /etc/wpa_supplicant/wpa_supplicant.conf.local<br />
<code> ctrl_interface=/var/run/wpa_supplicant<br />
 ctrl_interface_group=0<br />
 eapol_version=1<br />
 ap_scan=1<br />
 fast_reauth=1<br />
 #For WPA-PSK network<br />
 network={<br />
        ssid="myssid"<br />
        key_mgmt=WPA-PSK<br />
        proto=WPA2<br />
        pairwise=TKIP<br />
        group=TKIP<br />
        psk="my big secure passphrase"<br />
 }<br />
</code><br />
/etc/modprobe.d/ipw2100.modprobe<br />
<code> options ipw2100 disable=0<br />
</code><br />
and that was it- I spent time tinkering with all sorts of things, but I think this was all there was. If I get brave and re-do it next weekend, I&#8217;ll make sure to fully document the process.</p>
<h2>Hibernate</h2>
<p>While trying to get wireless working, I noticed that hibernation stopped working- I&#8217;m not sure what I did, but I&#8217;m pretty sure it&#8217;s my fault- it WAS working originally.</p>
<p><b>UPDATE</b><br />
DOH, it helps if the swap partition is mounted so hibernation has someplace to store the data! it&#8217;s all working good now.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2006/12/16/177/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
