<?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>Vitriol and Routing Tables &#187; Unix/Linux</title>
	<atom:link href="http://www.raptorized.com/tags/english/work/unixlinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raptorized.com</link>
	<description>Tales from the OSI layer 3</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:34:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I&#8217;m weak</title>
		<link>http://www.raptorized.com/2008/07/23/im-weak/</link>
		<comments>http://www.raptorized.com/2008/07/23/im-weak/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 15:38:48 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=159</guid>
		<description><![CDATA[I really am. I got an iPhone 3G. Mitigating factors are that the camera is really awesome, and also that I got root on it, voiding my warranty a mere fifteen minutes after unboxing it.]]></description>
			<content:encoded><![CDATA[<p>I really am. I got an iPhone 3G.</p>

<p>Mitigating factors are that the camera is really awesome, and also that I got root on it, voiding my warranty a mere fifteen minutes after unboxing it.</p>

<p><a href='http://www.raptorized.com/wp-content/uploads/2008/07/img_0025.jpg'><img src="http://www.raptorized.com/wp-content/uploads/2008/07/img_0025-150x150.jpg" alt="My hat, laptop and sad office space desk" title="hat_and_desk" width="150" height="150" class="aligncenter size-thumbnail wp-image-160" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2008/07/23/im-weak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting LVM Volumes inside a VMWare Disk Image</title>
		<link>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/</link>
		<comments>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 17:18:52 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[cleverhack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[madshellskills]]></category>
		<category><![CDATA[stupidty]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=138</guid>
		<description><![CDATA[So, the situation is this. I&#8217;m sitting remotely at a client site, and suddendly, due to some sleep-deprived slip-up, ended up erasing part of the configuration for their local server. Being the kind of guy to plan things through before taking action (usually), I had previously made a test set-up with all the configs in [...]]]></description>
			<content:encoded><![CDATA[<p>So, the situation is this. I&#8217;m sitting remotely at a client site, and suddendly, due to some sleep-deprived slip-up, ended up erasing part of the configuration for their local server.</p>

<p>Being the kind of guy to plan things through before taking action (usually), I had previously made a test set-up with all the configs in vmware on my local workstation at home, before heading over and installing them. So I pop open my laptop, fire up the Cisco VPN Client, connect over there, leapfrog some routers in between and land on my workstation. Turns out I hadn&#8217;t left the vm running, so I can&#8217;t access it from the shell by SSH&#8217;ing in.</p>

<p>&#8220;Hey, no problem!&#8221; I thought. &#8220;I&#8217;ll just mount the disk images with vmware-mount.pl, fetch the configuration files, send them over with a convulted mess of ssh-within-ssh-within-ssh and unix pipes to my laptop! Piece of cake!&#8221;</p>

<p>But then something hits me. The Virtual Disk Image (vmdk) file had LVM Volumes as partitions. Which I can&#8217;t directly mount from my Ubuntu workstation. Usually, you can get away with issuing the following:</p>

<p><code>$ sudo /opt/vmware/bin/vmware-mount.pl /path/to/disk-image.vmdk patition_number -t ext3 /mnt/mountpoint</code></p>

<p>But to much of my dismay, partition 2 on this particular disk image is an LVM Volume, so it can&#8217;t be directly mounted. I has to be mapped and a bunch things has to be done before I can get to the data. I&#8217;m not even sure I have LVM support on the Ubuntu machine at the moment.</p>

<p>Curses. Unless I fuck around with it to make it work. Which I did. Read on for the details.</p>

<p><span id="more-138"></span></p>

<p>So, I light up a cigarette and get to work. I first issue the command described above, regardless of the outcome. vmware-mount.pl works by firing up part of vmware, accessing the disk, and then feeds the data through a Network Block Device (/dev/nb0), which, in turn, is then mounted wherever you specify.</p>

<p>The output is optimistic.</p>

<blockquote>
<pre>
--------------------------------------------
VMware for Linux - Virtual Hard Disk Mounter
Version: 1.0 build-45731
Copyright 1998 VMware, Inc.  All rights reserved. -- VMware Confidential
--------------------------------------------

It has been reported that this program does not work correctly with 2.4+ Linux 
kernels in some cases, and you are currently running such a kernel. Do you 
really want to continue? [N] y

No Network Block Device detected.

There is no Network Block Device defined on this machine. This script is about 
to create the /dev/nb0 Network Block Device. Continue? [Y] 

Creating the /dev/nb0 Network Block Device

No Network Block Device driver detected.

Trying to load the Network Block Device driver kernel module... Success.

Client: The partition is now mapped on the /dev/nb0 Network Block Device.
mount: unknown filesystem type 'LVM2_member'

If you know the filesystem of the partition you want to mount, you can provide 
it using the -t command line option. Since you haven't done so, this script is 
going to try to determine the filesystem of the partition based on the partition
type and id.

Unable to retrieve the filesystem of the partition (the partition type is BIOS 
and the partition Id is 8E). Please file an incident with VMware at 
http://www.vmware.com/forms/Incident_Login.cfm by copying this error message.
</pre>
</blockquote>

<p>So here I think, &#8220;I&#8217;m pretty fucked. I&#8217;ll have to hack vmware-mount.pl, and god knows vmware&#8217;s Perl scripts are complex.&#8221;</p>

<p>So, out of the blue, I try again. But then I notice the vmware disk image is locked. And /dev/nb0 is <strong>still present.</strong> So my vmware Disk Image is still attached to the network block device! Great!</p>

<p>So, I ignore the error messages, and install LVM support on my ubuntu box.</p>

<p><code>
$ sudo apt-get install lvm2
</code><code></code></p>

<p>Note: On Ubuntu Feisty, according to bug <a href="https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/96802">#96802</a>, the lvm package has some packaging errors. You'll end up getting the error message "no program found for your current version of LVM" if you try to issue any of the LVM management commands. Long story short, issue the following to fix it:</p>

<blockquote>
$ sudo ln -s /lib/lvm-200 /lib/lvm-0
</blockquote>

<p>Next step, detect and mount the LVM volume you just added <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>Step 1: Load LVM kernel modules:</p>

<p><code>$ sudo modprobe dm-mod</code></p>

<p>Step 2: Detect new LVM Physical Volumes</p>

<p><code>$ sudo vgscan</code></p>

<p><em>It should appear as /dev/nb0. You may safely ignore errors about other devices.
The last line should be: <strong>Found volume group "VolGroup00" using metadata type lvm2</strong>, or something similar.</em></p>

<p>Step 3: Activate the newly found vgroup</p>

<p><code>$ sudo vgchange -ay VolGroup00</code></p>

<p>(Substitute "VolGroup00" appropriately if you named your Volume Group differently)</p>

<p>Step 4: Display available volumes and mount them as necessary</p>

<p><code>$ sudo lvdisplay</code></p>

<p>Step 5: Mount logical Volume needed:</p>

<p><code>$ sudo mount -t ext3 /dev/VolGroup00/LogVol00 /mnt/lvm1 -o ro</code></p>

<p>Step 6: SUCCESS! (Profit)</p>

<p>I can now access my RHEL5 Disk from my Ubuntu machine. Now, time to go back to the convulted mess of ssh-within-ssh-within-ssh-and-unix-pipes, but that's a story for another day.</p>

<p>Also, an important note, I have no idea how to unmount that volume. Well, I know how to unmount the LVM volume, but I have no idea how to get rid of /dev/nb0 without a reboot. Also, do note that this may make your machine majorly unstable. I had to call a friend to walk over to my place and reboot my workstation because it hung while reading files. But in the end, it worked.</p>

<p>I hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Courier imap and vpopmail on Debian</title>
		<link>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/</link>
		<comments>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/#comments</comments>
		<pubDate>Mon, 21 May 2007 03:30:06 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[epenis]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[madshellskills]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=112</guid>
		<description><![CDATA[Hi everyone. Sorry for the lack of updates, I&#8217;ve been fairly busy &#8212; I&#8217;m migrating all of my servers to a single, brand new Dell Poweredge 2900 server. I have a couple of great tutorials regarding Xen coming up soon, I&#8217;m sure at least someone will find them useful &#8212; I found the Xen documentation [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone. Sorry for the lack of updates, I&#8217;ve been fairly busy &#8212; I&#8217;m migrating all of my servers to a single, brand new Dell Poweredge 2900 server. I have a couple of great tutorials regarding Xen coming up soon, I&#8217;m sure at least someone will find them useful &#8212; I found the Xen documentation to be really scarce.</p>

<p>So, right now, I&#8217;m migrating my qmail, vpopmail, courier, clamav and friends set-up from Gentoo to Debian, on a new virtual machine. I followed the basic steps from here:</p>

<p><a href="http://wiki.debian.iuculano.it/quick_howto">http://wiki.debian.iuculano.it/quick_howto</a></p>

<p>This gent was nice enough to provide the required qmail packages and patches. Only problem came when I tried to make courier work with vpopmail &#8212; turns out the official debian courier-imap packages don&#8217;t support vchkpw, which is the authentication mechanism for vpopmail. Fortunately, I managed to hack it in an almost clean way, that doesn&#8217;t involve building it yourself from tarball. </p>

<p>Read on for the jazz.</p>

<p><span id="more-112"></span></p>

<p>So, first of all, fetch the courier-authlib source. You should first make sure that your <em>/etc/apt/sources.list</em> file contains the &#8220;deb-src&#8221; lines for everything. <em>apt-get update</em> if necessary.</p>

<p>So, step one, create a folder to hold the sources and debian packages, and cd into it.</p>

<pre><code>mkdir -p /usr/src/deb-source; cd  /usr/src/deb-source</code></pre>

<p>Step two, fetch the sources.</p>

<pre><code>apt-get source courier-authlib</code></pre>

<p>Once that is done, you must install the tools and libraries courier might need to be built. This sounds scary, but is actually a breeze under Debian.</p>

<pre><code>apt-get build-dep courier-authlib</code></pre>

<p>This should bring in a few things like build-essential, if you don&#8217;t have a compiler on the machine yet.</p>

<p>Next, cd&#8217; into the source folder, and into the debian package files.</p>

<pre><code>cd courier-authlib-0.58/debian</code></pre>

<p>Now you&#8217;re sitting where all the package specifications are configured, and the sweet thing is, you can hack them to your heart&#8217;s content. First of all, we need to edit the file named <strong>control</strong>.</p>

<pre><code>vi control</code></pre>

<p>Add the following at the end of the file to create a description for vchkpw.</p>

<pre><code>
Package: courier-authlib-vchkpw
Architecture: any
Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP})
Description: External authentication support for Vpopmail.
 This package contains vpopmail support for courier-authlib.
</code></pre>

<p>Next, we must create a list of files for the package.</p>

<pre><code>echo "/usr/lib/courier-authlib/libauthvchkpw.so*" > courier-authlib-vchkpw.files</code></pre>

<p>Failure to do this could lead to the following message during build:</p>

<blockquote>
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so.0.0.0
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so.0
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so
File(s) found not belonging to any package, please contact maintainer
make: *** [install] Error 1
</blockquote>

<p>Next step, altering the build parameters to include vpopmail support. That&#8217;s fairly easy. Just edit the file <strong>rules</strong>.</p>

<pre><code>
vi rules
</code></pre>

<p>Scroll down to the part where COMMON_CONFOPTS is defined, near line 35. Change the line where it says:</p>

<blockquote>
&#8211;without-authvchkpw \
</blockquote>

<p>so that it now reads:</p>

<blockquote>
&#8211;with-authvchkpw \
</blockquote>

<p>Once that is done, save the file, and you&#8217;re now ready to build the new and improved package:</p>

<pre><code>
# cd ..
# dpkg-buildpackage
</code></pre>
And go fetch some coffee. The courier builds are always pretty nasty, and configure can take a while. During compilation, I spotted this with my hawk eyes:

<pre><code>
Compiling authvchkpw.c
authvchkpw.c: In function 'callback_vchkpw':
authvchkpw.c:46: warning: value computed is not used
authvchkpw.c: In function 'auth_vchkpw_changepass':
authvchkpw.c:142: warning: passing argument 1 of 'parse_email' discards qualifiers from pointer target type
Compiling authvchkpwlib.c
</code></pre>

<p>This confirmed that support was indeed being included this time.</p>

<p>Once the build is done, simply install the required package.</p>

<pre><code>
# cd ..
# ls -lah *.deb
courier-authdaemon_0.58-4_amd64.deb     courier-authlib-pipe_0.58-4_amd64.deb
courier-authlib_0.58-4_amd64.deb        courier-authlib-postgresql_0.58-4_amd64.deb
courier-authlib-dev_0.58-4_amd64.deb    courier-authlib-userdb_0.58-4_amd64.deb
courier-authlib-ldap_0.58-4_amd64.deb   courier-authlib-vchkpw_0.58-4_amd64.deb
courier-authlib-mysql_0.58-4_amd64.deb
# dpkg -i courier-authlib-vchkpw_0.58-4_amd64.deb
Selecting previously deselected package courier-authlib-vchkpw.
(Reading database ...
27234 files and directories currently installed.)
Unpacking courier-authlib-vchkpw (from courier-authlib-vchkpw_0.58-4_amd64.deb) ...
Setting up courier-authlib-vchkpw (0.58-4) ...
#
</code></pre>

<p>And we're done.</p>

<p>Now all that is left is just to edit /etc/courier/authdaemonrc where it specifies the authentication modules to include our newly created one:</p>

<p><code>authmodulelist="authvchkpw"</code></p>

<p>And voilà. That wasn't so hard, was it?</p>

<p>I hope someone finds the following guide useful <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Update on the Apache-Hangs-On-Digest-Generation topic</title>
		<link>http://www.raptorized.com/2007/02/14/update-on-the-apache-hangs-on-digest-generation-topic/</link>
		<comments>http://www.raptorized.com/2007/02/14/update-on-the-apache-hangs-on-digest-generation-topic/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 04:39:54 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=109</guid>
		<description><![CDATA[Just to let everyone know I&#8217;ve poked my head in the Apache2 hanging on digest generation problem again, and figured out a better solution than relying on rng-utils. Check it out.]]></description>
			<content:encoded><![CDATA[<p>Just to let everyone know I&#8217;ve poked my head in the Apache2 hanging on digest generation problem again, and figured out a better solution than relying on rng-utils.</p>

<p><a href="http://www.raptorized.com/?p=70">Check it out.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2007/02/14/update-on-the-apache-hangs-on-digest-generation-topic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Scott, Apple</title>
		<link>http://www.raptorized.com/2006/09/14/great-scott-apple/</link>
		<comments>http://www.raptorized.com/2006/09/14/great-scott-apple/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 19:24:35 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=87</guid>
		<description><![CDATA[By Sithis, where is my gcc 3 for x86? /usr/libexec/gcc/darwin/ppc/3.3/cc1plus /usr/libexec/gcc/darwin/ppc/3.3-fast/cc1plus /usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1plus /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1plus That explains why there&#8217;s a crapload of things I can&#8217;t build on my intel Mac. C compiler cannot create executables, yeah well, that makes sense. I guess I could possibly cross compile, but that&#8217;s too much hassle. I&#8217;ll just have to wait [...]]]></description>
			<content:encoded><![CDATA[<p>By Sithis, where is my gcc 3 for x86?</p>

<pre>
<code>
/usr/libexec/gcc/darwin/ppc/3.3/cc1plus
/usr/libexec/gcc/darwin/ppc/3.3-fast/cc1plus
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1plus
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1plus
</code>
</pre>

<p>That explains why there&#8217;s a crapload of things I can&#8217;t build on my intel Mac.</p>

<p><i>C compiler cannot create executables</i>, yeah well, that makes sense. I guess I could possibly cross compile, but that&#8217;s too much hassle. I&#8217;ll just have to wait for someone to update the ports.</p>

<p>So if you&#8217;re wondering why that occurs to you, it&#8217;s because there&#8217;s no gcc 3.3 for x86 on OS X 10.4. You <em>have</em> to use gcc 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/09/14/great-scott-apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo can be annoying, sometimes</title>
		<link>http://www.raptorized.com/2006/08/20/gentoo-can-be-annoying-sometimes/</link>
		<comments>http://www.raptorized.com/2006/08/20/gentoo-can-be-annoying-sometimes/#comments</comments>
		<pubDate>Sun, 20 Aug 2006 20:15:26 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[Vitriolic Diatribes]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=83</guid>
		<description><![CDATA[The next best thing to getting ran over by an 18th wheeler would be having a gentoo baselayout update breaking havoc over your mail server. I have no idea why, but Courier, which is the mail server suite I use, in conjunction with DJ Bernstein&#8217;s qmail and vpopmail, all this lovely stuff keeps breaking all [...]]]></description>
			<content:encoded><![CDATA[<p>The next best thing to getting ran over by an 18th wheeler would be having a gentoo baselayout update breaking havoc over your mail server.</p>

<p><img id="image84" src="http://www.raptorized.com/wp-content/uploads/2006/08/graph-1.gif" alt="Metric Units of Fun" /></p>

<p>I have no idea why, but <a href="http://www.courier-mta.org/imap/">Courier</a>, which is the mail server suite I use, in conjunction with <a href="http://www.qmail.org/top.html">DJ Bernstein&#8217;s qmail</a> and <a href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a>, all this lovely stuff keeps breaking all the time on Gentoo. I&#8217;ve had courier hand mask&#8217;ed since they kept screwing up.</p>

<p>Now, the lastest baselayout prevents authdaemond from starting, and leaves no evidence in the logs. The Gentoo bugzilla is confusing, they say it&#8217;s Courier&#8217;s fault, and that they need maintainers, and that uh.. I don&#8217;t know, I&#8217;m not sure. They sound like they expect the problem to fix itself, or that it will magically occur at some time.</p>

<p>Gentoo is definitely not something you should run on a production server, sometimes.</p>

<p><strong>Update:</strong> Well, updating to the lastest courier and removing /etc/init.d/authdaemond seems to have fixed it. The ones who are having problems are actually those who are running the &#8220;unstable&#8221; courier, with ~x86 flags. I wish you guys luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/08/20/gentoo-can-be-annoying-sometimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to the Future Part 1</title>
		<link>http://www.raptorized.com/2006/08/16/back-to-the-future-part-1/</link>
		<comments>http://www.raptorized.com/2006/08/16/back-to-the-future-part-1/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 04:06:01 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=71</guid>
		<description><![CDATA[My quad Xeon&#8217;s clock keeps drifting. It was now two days in the future. I ntp&#8217;ed it: nailhead # ntpdate time.apple.com 15 Aug 23:54:57 ntpdate[22961]: step time server 17.254.0.27 offset -131984.081641 sec 131984.081641 seconds in the future, huh? Guess the flux capacitor still has hiccups there. I&#8217;m working on a fix, but all I can [...]]]></description>
			<content:encoded><![CDATA[<p>My quad Xeon&#8217;s clock keeps drifting. It was now two days in the future.</p>

<p>I ntp&#8217;ed it:</p>

<pre>
nailhead # ntpdate time.apple.com
15 Aug 23:54:57 ntpdate[22961]: step time server 17.254.0.27 offset -131984.081641 sec
</pre>

<p>131984.081641 seconds in the future, huh? Guess the flux capacitor still has hiccups there. I&#8217;m working on a fix, but all I can think of requires a reboot, which I&#8217;m not going to do <em>right now</em>. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/08/16/back-to-the-future-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache hangs on Digest Secret generation</title>
		<link>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/</link>
		<comments>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/#comments</comments>
		<pubDate>Fri, 11 Aug 2006 15:24:47 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=70</guid>
		<description><![CDATA[I have a machine on my network that is very special. It&#8217;s a rather old Quad Xeon, an HP LH4 that I scavenged out of the proverbial dumpster of a buisness that didn&#8217;t want it anymore. In fact, they were about to trash six of them. I decided it was a crime to shitcan such [...]]]></description>
			<content:encoded><![CDATA[<p>I have a machine on my network that is very special. It&#8217;s a rather old Quad Xeon, an HP LH4 that I scavenged out of the proverbial dumpster of a buisness that didn&#8217;t want it anymore. In fact, they were about to trash <strong>six of them.</strong></p>

<p>I decided it was a crime to shitcan such beautiful machines, so with the help of my friend Mike <em>&#8220;I mangle french words&#8221;</em> Le Blanc, we drove there, armed with a large truck and patience. Carrying them down the three stories with no elevator was an interesting experience. I scavenged lots and lots of interesting hardware there.</p>

<p>But i&#8217;m getting ahead of myself here. The point is, lots of screwy things start occuring when you have a Quad SMP machine, such a timers and clock drift. I started having a lot of problems with Apache recently&#8230; once in a blue moon, on restart, it would spawn a single process with no PID file, and hang there. Checking out error_log pointed out that apache would apparently hang while generating the Secret seed for Digest authentication (mod_digest). Disabling mod_digest would have worked, but sadly, I use it. This could be found in error_log:</p>

<pre>
<code>
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[notice] Apache configured -- resuming normal operations
[notice] caught SIGTERM, shutting down
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[notice] Digest: generating secret for digest authentication ...
</code>
</pre>

<p>Fortunately, I cobbled up a fix. <strong>Updated! Read on for a more elegant fix.</strong>
<span id="more-70"></span></p>

<p>So it hangs while generating the secret for digest authentication. My gut feeling was that it had to do with the system running out of entropy (random data, that is). Probably waits for <em>apr_generate_random_bytes()</em> to complete but that never happens. I immediatly checked out the kernel for available entropy from /dev/random and friends.</p>

<pre>
<code>
# cat /proc/sys/kernel/random/entropy_avail
16
</code>
</pre>

<p>Now, I have no clue why, but entropy ran out (not quite, but close). Probably another whacky quad SMP issue. I&#8217;m starting to drive the Gentoo devs and maintainers crazy with my strange hardware.</p>

<p><strong>Note: Before proceeding, please read the updated section below.</strong></p>

<p>So, to remedy it, I fetched and installed <strong>rngd</strong> from the <strong>rng-tools</strong> package in Gentoo Portage. Check out your distro&#8217;s package repository for it or something similar. This tool allegedy gathers random data from I/O transactions and hardware stuff around. I compiled it, installed it and launched it. The Gentoo way:</p>

<pre><code>
# emerge -va rng-tools
# rc-update add rngd default &#038;&#038; /etc/init.d/rngd start
</code></pre>

<p>Once that was taken care of, I checked the available entropy by querying the kernel once again.</p>

<pre><code>
# cat /proc/sys/kernel/random/entropy_avail
6854
</code></pre>

<p>That&#8217;s much better. To my surpise, Apache finished loading instantly the split second rngd started up. Schweet.
Sounds like that fixes the problem. <strike>I have no idea why it occurs right now, but this works around it elegantly.</strike></p>

<p><strong>UPDATE!</strong>
I figured out what the greasy poop was going on. Installing rngd will gather entropy using /dev/urandom if no hardware RNG is found by default. I didn&#8217;t pay much attention to that detail at the time. However, you will notice that when installing the Apache Portable Runtime on Gentoo (dev-libs/apr) the use flag <em>urandom</em> is available. Using <em>euse</em> (from gentoolkit) to get info about it returns the following:</p>

<pre><code>
valkyrie ~ # euse -i urandom
global use flags (searching: urandom)
************************************************************
no matching entries found

local use flags (searching: urandom)
************************************************************
[-    ] urandom (dev-libs/apr):
Use /dev/urandom instead of /dev/random
</code></pre>

<p>This will make apache fetch randomness from /dev/urandom directly, therefore giving the same result as rng-tools. The proper solution would be to <strong>just re-emerge <em>dev-libs/apr</em> with the <em>urandom</em> use flag enabled.</strong></p>

<p>I tried it and it works beautifully, and looks a lot more elegant to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Gentoo is fun when it&#8217;s not.</title>
		<link>http://www.raptorized.com/2006/02/14/easiest-gentoo-emerge-ever/</link>
		<comments>http://www.raptorized.com/2006/02/14/easiest-gentoo-emerge-ever/#comments</comments>
		<pubDate>Tue, 14 Feb 2006 16:20:50 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=60</guid>
		<description><![CDATA[I have never been so releived to see only simple things like this in my daily &#8220;emerge -uvaD world&#8221; output on my mail server. [ebuild N ] virtual/perl-Test-Simple-0.62 0 kB [ebuild N ] virtual/perl-MIME-Base64-3.05 0 kB [ebuild N ] virtual/perl-digest-base-1.13 0 kB [ebuild N ] virtual/perl-Storable-2.15 0 kB [ebuild N ] virtual/perl-net-ping-2.31 0 kB [ebuild [...]]]></description>
			<content:encoded><![CDATA[<p>I have never been so releived to see only simple things like this in my daily &#8220;emerge -uvaD world&#8221; output on my mail server.</p>

<pre>
<code>
[ebuild  N    ] virtual/perl-Test-Simple-0.62  0 kB
[ebuild  N    ] virtual/perl-MIME-Base64-3.05  0 kB
[ebuild  N    ] virtual/perl-digest-base-1.13  0 kB
[ebuild  N    ] virtual/perl-Storable-2.15  0 kB
[ebuild  N    ] virtual/perl-net-ping-2.31  0 kB
[ebuild  N    ] virtual/perl-Digest-MD5-2.33  0 kB
[ebuild  N    ] virtual/perl-libnet-1.19  0 kB
[ebuild  N    ] virtual/perl-PodParser-1.30  0 kB
[ebuild  N    ] virtual/perl-Test-Harness-2.42  0 kB
[ebuild  N    ] virtual/perl-DB_File-1.814  0 kB
[ebuild  N    ] virtual/perl-Time-Local-1.11  0 kB 
</code>
</pre>

<p>Yeah. Virtuals, which means nothing is emerged at all, my world file is just changed. This is a refreshing change from the many baselayout updates during the past weeks which caused me to overwrite part of my customized /etc/profile on the server out of lazyness, and read diffs until ocular bleeding occured.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/02/14/easiest-gentoo-emerge-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo, dev-php and dev-lang switch, pear packages, oh my!</title>
		<link>http://www.raptorized.com/2006/01/31/gentoo-dev-php-and-dev-lang-switch-pear-packages-oh-my/</link>
		<comments>http://www.raptorized.com/2006/01/31/gentoo-dev-php-and-dev-lang-switch-pear-packages-oh-my/#comments</comments>
		<pubDate>Tue, 31 Jan 2006 18:53:01 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=59</guid>
		<description><![CDATA[Well, I&#8217;m at home right now. Took another day off due to the fact that I am ill. Oh, and it&#8217;s not the cool &#8220;nose dribbling while playing Half-Life&#8221; but rather the most detestable &#8220;spending most of the day on the toilet&#8221; one. So amidst all of these happenings, I took the time to upgrade [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;m at home right now. Took another day off due to the fact that I am ill. Oh, and it&#8217;s not the cool &#8220;<em>nose dribbling while playing Half-Life</em>&#8221; but rather the most detestable &#8220;<em>spending most of the day on the toilet</em>&#8221; one.</p>

<p>So amidst all of these happenings, I took the time to upgrade my web servers to reflect the <a href="http://www.gentoo.org/proj/en/php/php-upgrading.xml">recent PHP portage changes</a> happening in Gentoo lately. It all went well, until I had to re-merge the 30 or so PEAR packages. One of them wanted to pull back the old dev-php/php-4* packages, creating a blocker.</p>

<p>Turns out three PEAR packages are now depreciated, according to the php managers for Gentoo.</p>

<pre>
<blockquote><strong>CHTEKK</strong>: just emerge the new PEAR-PEAR, it includes XML_RPC, 
Archive_Tar and Console_Getopt PEAR packages
<strong>jakub</strong>: we should mention it in the guide
<strong>CHTEKK</strong>: yeah
<em>mr_daemon</em>: Okay... I have something like 30 PEAR packages... 
how could I find out which are depreciated?
<strong>CHTEKK</strong>: only those three
<strong>CHTEKK</strong>: all the others remained, and some (very few) changed category 
and are now in dev-php4/ or dev-php5/
</blockquote>
</pre>

<p>So basically, the guide should be updated to reflect this fact. If you&#8217;re having problems, just discards PEAR-XML_RPC, PEAR-Archive_Tar and PEAR-Console_Getopt. They are all included in PEAR-PEAR.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/01/31/gentoo-dev-php-and-dev-lang-switch-pear-packages-oh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
