<?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>pixelchaos.net</title>
	<atom:link href="http://www.pixelchaos.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelchaos.net</link>
	<description>random bits for your terminal</description>
	<lastBuildDate>Tue, 18 Jan 2011 16:25:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Bacula 3.0.1 for Mac OS X</title>
		<link>http://www.pixelchaos.net/2009/07/14/bacula-3-0-1-for-mac-os-x/</link>
		<comments>http://www.pixelchaos.net/2009/07/14/bacula-3-0-1-for-mac-os-x/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 12:56:55 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Bacula]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=168</guid>
		<description><![CDATA[I wont be doing a build of Bacula for Mac OS X again any time soon, if at all, for a number of reasons; I no longer have access to Mac OS X 10.4 running on an Intel chip I am actively transitioning to BackupPC Below youll find the method I have been using to [...]]]></description>
			<content:encoded><![CDATA[<p>I wont be doing a build of Bacula for Mac OS X again any time soon, if at all, for a number of reasons;</p>
<ol>
<li>I no longer have access to Mac OS X 10.4 running on an Intel chip</li>
<li>I am actively transitioning to BackupPC</li>
</ol>
<p>Below youll find the method I have been using to construct all the .pkg installers youll find on this site. If you have any questions about the process please post them in the comments.</p>
<p><span id="more-168"></span></p>
<p>You will need at least three installations of Mac OS X &#8211; one 10.4 on PPC, one 10.4 on Intel, and one 10.5 on any architecture. On each 10.4 installation, download the bacula source code, decompress it, and run the following command to compile it in a way that plays nice with the rest of Mac OS X</p>
<pre class="brush: plain; title: ; notranslate">
./configure --prefix=/usr/local --sysconfdir=/usr/local/etc \
--mandir=/usr/local/share/man --enable-client-only \
--with-openssl --with-tcp-wrappers --disable-dependency-tracking \
--with-working-dir=/var/bacula/working
make
</pre>
<p>With that done, copy the compiled binaries from each architecture to your Mac OS X 10.5 installation to build the pkg installer. The files in question are;</p>
<ul>
<li>src/filed/bacula-fd</li>
<li>src/filed/bacula-fd.conf</li>
<li>src/console/bconsole</li>
<li>src/console/bconsole.conf</li>
</ul>
<p>I use the architecture type to give them unique names&#8230; bacula-fd-ppc and bacula-fd-intel for example. After thats done, use lipo to combine the two binaries into one fat multi-arch binary</p>
<pre class="brush: plain; title: ; notranslate">
lipo -create bacula-fd-intel bacula-fd-ppc -output bacula-fd
</pre>
<p>Now do the same for bconsole</p>
<pre class="brush: plain; title: ; notranslate">
lipo -create bconsole-intel bconsole-ppc -output bconsole
</pre>
<p>Having done that you now need to set up a mock directory structure to place the binaries into. You can then use PackageMaker on Mac OS X to build the pkg installer from that mock directory. My directory looks like this;</p>
<pre class="brush: plain; title: ; notranslate">
Library
Library/LaunchDaemons
Library/LaunchDaemons/bacula-fd.plist
usr
usr/local
usr/local/bin
usr/local/bin/bconsole
usr/local/etc
usr/local/etc/bacula-fd.conf
usr/local/etc/bconsole.conf
usr/local/sbin
usr/local/sbin/bacula-fd
usr/local/share
usr/local/share/man
usr/local/share/man/man8
usr/local/share/man/man8/bacula-fd.8.gz
usr/local/share/man/man8/bconsole.8.gz
var
var/bacula
var/bacula/working
</pre>
<p>You can see where I&#8217;ve placed bacula-fd and bconsole as well as their conf files. There are some gzipped man pages in there too, which you can grab out of the compiled source tree and gzip manually. Finally there is a .plist file which is required to make auto startup/shutdown of bacula-fd happen on Mac OS X.</p>
<p>The last important bit to note is that I use some modified .conf files which have special placeholders for host names. I then use pre-inst and post-inst scripts in PackageMaker to look for previous versions of packages, insert the current hostname into the .conf files, etc. I have included my source tree and PackageMaker files and scripts below for the last version I released (2.4.4) for your reference.</p>
<p>After all the above is done and the directory structure is all set up you should be able to just fire up PackageMaker, change a few variables in it (set permissions, set version numbers, make sure proper pre and post-inst scripts are being used, etc.) and then build the pkg installer.</p>
<p>Enjoy :)</p>
<p><a href='http://www.pixelchaos.net/wp-content/uploads/2009/07/bacula_244_macosx_source.zip' >bacula_244_macosx_source.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/07/14/bacula-3-0-1-for-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>list all files with resource forks on Mac OS X</title>
		<link>http://www.pixelchaos.net/2009/06/06/list-all-files-with-resource-forks-on-mac-os-x/</link>
		<comments>http://www.pixelchaos.net/2009/06/06/list-all-files-with-resource-forks-on-mac-os-x/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 11:01:53 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=166</guid>
		<description><![CDATA[This is mostly just a note to myself. If you ever have the need to find all files that contain HFS resource forks on Mac OS X, just use this bit of find magic:]]></description>
			<content:encoded><![CDATA[<p>This is mostly just a note to myself. If you ever have the need to find all files that contain HFS resource forks on Mac OS X, just use this bit of find magic:</p>
<pre class="brush: bash; title: ; notranslate">find . -type f -exec test -s {}/..namedfork/rsrc \; -print</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/06/06/list-all-files-with-resource-forks-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>working with initrd.img files</title>
		<link>http://www.pixelchaos.net/2009/05/28/working-with-initrdimg-files/</link>
		<comments>http://www.pixelchaos.net/2009/05/28/working-with-initrdimg-files/#comments</comments>
		<pubDate>Thu, 28 May 2009 13:41:56 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=104</guid>
		<description><![CDATA[You may have occasion to edit the contents of an initrd.img file. If so, here is how: Extract the contents of the image Now make your edits and then repackage the initrd]]></description>
			<content:encoded><![CDATA[<p>You may have occasion to edit the contents of an initrd.img file. If so, here is how:</p>
<p>Extract the contents of the image</p>
<pre class="brush: plain; title: ; notranslate">gunzip &lt; your-initrd.img | cpio -i --make-directories</pre>
<p>Now make your edits and then repackage the initrd</p>
<pre class="brush: plain; title: ; notranslate">find . | cpio -o -H newc | gzip -9 &gt; your-new-initrd.img</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/05/28/working-with-initrdimg-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install debian directly onto an AoE root filesystem</title>
		<link>http://www.pixelchaos.net/2009/05/25/install-debian-directly-onto-an-aoe-root-filesystem/</link>
		<comments>http://www.pixelchaos.net/2009/05/25/install-debian-directly-onto-an-aoe-root-filesystem/#comments</comments>
		<pubDate>Tue, 26 May 2009 02:23:16 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[AoE]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=131</guid>
		<description><![CDATA[Something that just about no one out there seems to be doing (yet) is trying to install Debian directly onto network block devices. The Debian installer doesnt support it (yet), grub doesnt support it (usually), and its just generally not an easy thing to do. Now, there are quite a few ways around this problem. [...]]]></description>
			<content:encoded><![CDATA[<p>Something that just about no one out there seems to be doing (yet) is trying to install Debian directly onto network block devices. The Debian installer doesnt support it (yet), grub doesnt support it (usually), and its just generally not an easy thing to do.</p>
<p>Now, there are quite a few ways around this problem. You can install to a &#8216;real&#8217; computer and migrate the installation to a network block device. You can use debootstrap in place of the actual Debian installation system. You can use a combination of these two methods, NFS root filesystems, TFTP hacks, etc. All of these solutions are lacking in my opinion. I want to run the &#8216;real&#8217; debian installer against a network block device and boot my physical hardware using only the built in PXE booting capability of the BIOS.</p>
<p>Taking all these issues as a personal challenge, I&#8217;ve outlined below how to go about using the regular old Debian Lenny installer directly against an AoE block device.<br />
<span id="more-131"></span></p>
<p>First of all, youll need the full installer disc 1 for Lenny. We need one of the .deb&#8217;s thats on that CD. The netinst or businesscard installers will not work with the steps below. (NOTE: If you want to be really creative, I suppose you could download the .deb from within the installer system via wget or even get it before hand and put it on a thumb drive or something&#8230;)</p>
<p>1. Boot the lenny install cd just to the point that /cdrom is mounted. For me, that was the &#8220;Configure the network&#8221; prompt.</p>
<p>2. Switch to a virtual terminal by hitting alt-f2.</p>
<p>3. Unpack the .deb that contains the aoe kernel module</p>
<pre class="brush: plain; title: ; notranslate">udpkg --unpack /cdrom/pool/main/l/linux-2.6/linux-image-2.6.26-2-486_2.6.26-15_i386.deb</pre>
<p>4. Now load the kernel module we just unpacked</p>
<pre class="brush: plain; title: ; notranslate">insmod /lib/modules/2.6.26-2-486/kernel/drivers/block/aoe/aoe.ko</pre>
<p>5. Now we create a symlink to the AoE block device. Its important that we use a symlink at this point in the process since it will cause the installer to set up a lot of paths in the correct fashion.</p>
<pre class="brush: plain; title: ; notranslate">ln -s /dev/etherd/eX.X /dev/sda</pre>
<p>6. Hit alt-f1 and continue with installation until the point that grub fails to install, then switch back to terminal 2.</p>
<p>7. Now chroot into the mostly installed system</p>
<pre class="brush: plain; title: ; notranslate">chroot /target</pre>
<p>8. Install the aoetools package</p>
<pre class="brush: plain; title: ; notranslate">apt-get -y install aoetools</pre>
<p>9. Listed below are two scripts that youll need to get into your chroot environment. They are used to build a new custom initrd image. I find it easiest to put them on a webserver somewhere and wget them.</p>
<pre class="brush: plain; title: ; notranslate">wget http://www.pixelchaos.net/stuff/aoe/hooks/aoetools -O /etc/initramfs-tools/hooks/aoetools
chmod 755 /etc/initramfs-tools/hooks/aoetools
wget http://www.pixelchaos.net/stuff/aoe/scripts/local-top/aoetools -O /etc/initramfs-tools/scripts/local-top/aoetools
chmod 755 /etc/initramfs-tools/scripts/local-top/aoetools</pre>
<p>10. Now we regenerate the initrd image</p>
<pre class="brush: plain; title: ; notranslate">update-initramfs -u -k all</pre>
<p>11. Now that all the above is done, we can manually install grub &#8211; which the debian installer was unable to do.</p>
<pre class="brush: plain; title: ; notranslate">apt-get -y install grub
mkdir /boot/grub
cp -r /usr/lib/grub/i386-pc/. /boot/grub</pre>
<p>12. Now we can remove our old symlink and create some hard links instead. This is required to allow grub to modify the MBR of our block device.</p>
<pre class="brush: plain; title: ; notranslate">rm /dev/sda
ln /dev/etherd/eX.X /dev/sda
ln /dev/etherd/eX.Xp1 /dev/sda1
ln /dev/etherd/eX.Xp5 /dev/sda5</pre>
<p>13. Now update grubs device.map</p>
<pre class="brush: plain; title: ; notranslate">echo &quot;(hd0) /dev/sda&quot; &gt; /boot/grub/device.map</pre>
<p>14. Now run &#8220;grub&#8221; and issue the following commands</p>
<pre class="brush: plain; title: ; notranslate">device (hd0) /dev/sda
root (hd0,0)
setup (hd0)</pre>
<p>15. Now issue the &#8220;update-grub&#8221; command which will generate /boot/grub/menu.lst for the first time</p>
<p>16. Remember that grub has been using the hard link to /dev/sda this whole time. Change the root=/dev/sda1 line in /boot/grub/menu.lst to root=/dev/etherd/eX.Xp1, then issue the &#8220;update-grub&#8221; command again to commit the change to the boot stanzas.</p>
<p>17. For the sake of completeness, lets change grubs device.map back to its original contents.</p>
<pre class="brush: plain; title: ; notranslate">echo &quot;(hd0) /dev/etherd/eX.X&quot; &gt; /boot/grub/device.map</pre>
<p>18. Get out of the chroot environment by issuing the &#8220;exit&#8221; command.</p>
<p>19. Go back to installer and choose &#8220;Continue without boot loader&#8221; to finish the installation and reboot the computer.</p>
<p>Thats it! Assuming you have properly set up a gPXE boot environment everything should &#8220;just work&#8221;. Setting up gPXE is outside the scope of this document but some good notes are available on the etherboot web site (see the links below).</p>
<p>Please note that there is one caveat to this whole process. Grub does not support installation onto AoE block devices. There very well may be some issues the next time you try to upgrade your kernel if some post-inst script calls grub-install against your root device. Keep that in mind.</p>
<p><strong>aoe-hooks script</strong></p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

set  -e

PREREQ=&quot;&quot;

prereqs()
{
echo &quot;$PREREQ&quot;
}

case $1 in
prereqs)
prereqs
exit 0
;;
esac

. /usr/share/initramfs-tools/hook-functions

[ -x /sbin/aoe-discover ] &amp;&amp; copy_exec /sbin/aoe-discover /sbin
manual_add_modules aoe
</pre>
<p><strong>aoe-local-top script</strong></p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

set -e

PREREQ=&quot;udev&quot;

prereqs()
{
echo &quot;$PREREQ&quot;
}

case $1 in
prereqs)
prereqs
exit 0
;;
esac

case $ROOT in
/dev/etherd/e*)
INTERFACES=`sed -ne '/eth.*:/{s/:.*$//;p;}' &lt; /proc/net/dev`
for i in $INTERFACES; do
echo Bringing up interface $i for AoE
ifconfig $i up
done
# Make sure udev has processed all events from adding the NIC
# modules before loading aoe
[ -x /sbin/udevsettle ] &amp;&amp; /sbin/udevsettle --timeout=30
modprobe aoe
# Wait until aoe device files have been generated.
[ -x /sbin/udevsettle ] &amp;&amp; /sbin/udevsettle --timeout=30
aoe-discover
;;
esac
</pre>
<p><strong>references</strong><br />
<a href="http://maht0x0r.blogspot.com/2009/03/installing-debian-5-for-migration-to.html" target="_blank">http://maht0x0r.blogspot.com/2009/03/installing-debian-5-for-migration-to.html</a><br />
<a href="http://www.etherboot.org/wiki/sanboot/debian_and_ubuntu" target="_blank">http://www.etherboot.org/wiki/sanboot/debian_and_ubuntu</a><br />
<a href="http://mike.neir.org/wiki/articles/AoE_Root_Fedora" target="_blank">http://mike.neir.org/wiki/articles/AoE_Root_Fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/05/25/install-debian-directly-onto-an-aoe-root-filesystem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>openais: an alternative to clvm with cman</title>
		<link>http://www.pixelchaos.net/2009/04/23/openais-an-alternative-to-clvm-with-cman/</link>
		<comments>http://www.pixelchaos.net/2009/04/23/openais-an-alternative-to-clvm-with-cman/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 17:24:29 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=106</guid>
		<description><![CDATA[I&#8217;ve been battling lately with a lot of problems with cman, part of Red Hat Cluster Suite. Specifically, the fencing tool (fenced) is pretty much junk when you try to start using it with Xen dom0&#8242;s. After much searching and gnashing of teeth I happened upon this mailing list post. The promise there is that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been battling lately with a lot of problems with cman, part of Red Hat Cluster Suite. Specifically, the fencing tool (fenced) is pretty much junk when you try to start using it with Xen dom0&#8242;s. After much searching and gnashing of teeth I happened upon <a href="http://xen.markmail.org/message/xrrvmcl7bq6p4pvk?q=clvm+openais">this</a> mailing list post. The promise there is that you could take clvm and compile it against openais and get a cluster aware LVM which doesnt require the rest of Red Hat Cluster Suite (and its crappy documentation, crappy fencing, and general all around crappiness). A little more searching turned up <a href="http://h2o.glou.fr/post/2009/04/20/clvm-openais-on-Debian/Lenny">this</a> web site from Olivier Le Cam which pretty much did 90% of the work for me.</p>
<p>After some testing I&#8217;m happy to say it appears to work smashingly. What follows is a somewhat more complete version of how to achieve the same results on Debian Lenny. Enjoy :)</p>
<p><span id="more-106"></span><br />
The first thing that needs to be done is to get the debian sources for clvm and modify then to use openais. After that we will recompile new packages from that source, then set up openais on our cluster nodes.</p>
<p>Install all the dependencies we need to compile clvm</p>
<pre class="brush: plain; title: ; notranslate">
root@host:~# apt-get build-dep clvm
root@host:~# apt-get install libopenais-dev
</pre>
<p>Now download the source files and cd into our working directory</p>
<pre class="brush: plain; title: ; notranslate">
root@host:~# cd /usr/src/
root@host:/usr/src# apt-get source clvm
root@host:/usr/src# cd lvm2-2.02.39
</pre>
<p>Now we&#8217;ll modify a few files in the source:</p>
<ul>
<li> The first is debian/clvm.init. You&#8217;ll need to remove any references to cman or cluster.conf. You can download an already edited version <a href='http://www.pixelchaos.net/wp-content/uploads/2009/04/clvm.init'>here</a>.</li>
<li>The next is debian/control. Modify the dependies (lvm2 without the version number, openais in place of cman) and modify the comments accordingly. A pre-edited version is <a href='http://www.pixelchaos.net/wp-content/uploads/2009/04/control'>here</a>.</li>
<li> The last file is debian/rules. Replace cman by openais in the configure options, and add the PATH where to find the openais libs. Again, a pre-made version is <a href='http://www.pixelchaos.net/wp-content/uploads/2009/04/rules'>here</a>.</li>
</ul>
<p>For clarities sake, here is the actual code block from debian/rules:</p>
<pre class="brush: plain; title: ; notranslate">
$(STAMPS_DIR)/setup-deb: SOURCE_DIR = $(BUILD_DIR)/source
$(STAMPS_DIR)/setup-deb: DIR = $(BUILD_DIR)/build-deb
$(STAMPS_DIR)/setup-deb: $(STAMPS_DIR)/source
        rm -rf $(DIR)
        cp -al $(SOURCE_DIR) $(DIR)
        cd $(DIR); \
        ./configure CFLAGS=&quot;$(CFLAGS)&quot; \
		LDFLAGS=&quot;-L/usr/lib/openais&quot; \
                $(CONFIGURE_FLAGS) \
                --with-optimisation=&quot;&quot; \
                --with-clvmd=openais \
                --enable-readline
        touch $@
</pre>
<p>The last thing to do is update the internal version number of the clvm package and add some comments to the changelog:</p>
<pre class="brush: plain; title: ; notranslate">
root@host:/usr/src/lm2-2.02.39# dch -i
</pre>
<p>Now go ahead and compile the package:</p>
<pre class="brush: plain; title: ; notranslate">
root@host:/usr/src/lm2-2.02.39# dpkg-buildpackage -rfakeroot -uc -b
</pre>
<p>After the compliation completes you should have some shiny new .deb files in /usr/src. The one we are interested in is clvm_2.02.39-7.1_i386.deb (the actual version of yours may vary depending on what you put in the debian changelog in the previous step).</p>
<p>So now that weve got our custom version of clvm compiled, its time to move on the cluster nodes. On each node in the cluster, do the following&#8230;</p>
<p>Install openais and add a user for it:</p>
<pre class="brush: plain; title: ; notranslate">
root@node:~# apt-get install openais
root@node:~# mkdir -p /etc/ais
root@node:~# adduser --no-create-home --disabled-password --disabled-login --gecos openAIS ais
</pre>
<p>Now create the following config in /etc/ais/openais.conf. This is the most basic config you can have. All you need to do is set 192.168.1.0 to be your actual network address.</p>
<pre class="brush: plain; title: ; notranslate">
totem {
        version: 2
        secauth: off
        threads: 0
        interface {
                ringnumber: 0
                bindnetaddr: 192.168.1.0
                mcastaddr: 226.94.1.1
                mcastport: 5405
        }
}
</pre>
<p>openais does not include a proper debian init sript so you can download one <a href="http://www.pixelchaos.net/wp-content/uploads/2009/04/openais.init">here</a> and save it as /etc/init.d/openais. After that is done, add it to the proper runlevels by issuing:</p>
<pre class="brush: plain; title: ; notranslate">
root@node:~# update-rc.d openais start 62 S . start 50 0 6 .
</pre>
<p>Now we can install our custom deb and turn on LVM clustering</p>
<pre class="brush: plain; title: ; notranslate">
root@node:~# dpkg -i clvm_2.02.39-7.1_i386.deb
root@node:~# sed -i 's/^    locking_type = 1$/    locking_type = 3/' /etc/lvm/lvm.conf
</pre>
<p>Thats it! Reboot your cluster nodes and they should all be cluster aware now :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/04/23/openais-an-alternative-to-clvm-with-cman/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>sata_mv timeouts fixed</title>
		<link>http://www.pixelchaos.net/2009/04/08/sata_mv-timeouts-fixed/</link>
		<comments>http://www.pixelchaos.net/2009/04/08/sata_mv-timeouts-fixed/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 14:33:32 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=101</guid>
		<description><![CDATA[Well isnt this a happy day for owners of the Supermicro 8-Port SATA Card AOC-SAT2-MV8. It appears a long standing issue with port timeouts has been fixed. See the lkml.org mailing list post here &#8230; and the townspeople rejoiced :)]]></description>
			<content:encoded><![CDATA[<p>Well isnt this a happy day for owners of the Supermicro 8-Port SATA Card AOC-SAT2-MV8. It appears a long standing issue with port timeouts has been fixed.</p>
<p>See the lkml.org mailing list post <a href="http://lkml.org/lkml/2009/1/30/462">here</a></p>
<p>&#8230; and the townspeople rejoiced :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/04/08/sata_mv-timeouts-fixed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>diskless booting with PXE and NFS</title>
		<link>http://www.pixelchaos.net/2009/02/15/diskless-booting-with-pxe-and-nfs/</link>
		<comments>http://www.pixelchaos.net/2009/02/15/diskless-booting-with-pxe-and-nfs/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 15:10:42 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=89</guid>
		<description><![CDATA[For a long time now I&#8217;ve wanted to set up all my mythfrontends to be diskless nodes that boot via PXE using an NFS share as their root filesystem. I finally got around to doing this. I was even able to just migrate my existing installations directly into the PXE boot environment. Here is how [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time now I&#8217;ve wanted to set up all my mythfrontends to be diskless nodes that boot via PXE using an NFS share as their root filesystem. I finally got around to doing this. I was even able to just migrate my existing installations directly into the PXE boot environment. Here is how I accomplished it&#8230;</p>
<p><span id="more-89"></span></p>
<p>The first thing youll need is a TFTP server. This will serve out the kernel and initrd images to clients on the network.</p>
<pre class="brush: plain; title: ; notranslate">
root@pxe:~$ apt-get install tftpd-hpa
</pre>
<p>That will install a good tftp server daemon and create the tftp root for you in /var/lib/tftpboot. Some HOWTO&#8217;s on the Internet suggest installing the syslinux package as well which provides a needed file (pxelinux.0). I prefer to download the entire netboot environment for debian since this will also provide a network bootable installer for Debian on top of the other goodness we are creating today.</p>
<pre class="brush: plain; title: ; notranslate">
root@pxe:~$ cd /var/lib/tftpboot
root@pxe:~$ wget http://ftp.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz
root@pxe:~$ tar xzvf netboot.tar.gz
</pre>
<p>The kernel and initrd you are going to use to boot the mythbox must reside on the TFTP server. Furthermore, the initrd must be updated to support NFS root. On the mythbox I was migrating to the NFS root, it looked like this:</p>
<pre class="brush: plain; title: ; notranslate">
root@mythbox:~$ sed -i 's/BOOT=local/BOOT=nfs/'  /etc/initramfs-tools/initramfs.conf
root@mythbox:~$ /usr/sbin/mkinitramfs -o /boot/initrd.img-2.6.26-1-686_netboot
</pre>
<p>Now just copy the /boot/vmlinuz-2.6.26-1-686 and /boot/initrd.img-2.6.26-1-686_netboot to /var/lib/tftpboot/ on the TFTP server.</p>
<p>Last step for the TFTP server is to create a config file for our mythbox. If you dont create one specifically for it, it will instead boot the network installer as mentioned above. Create the file /var/lib/tftpboot/pxelinux.cfg/01-$(hardware ethernet address). Including the hardware address in the file name binds that config to the particular workstation we are working on today. In my case, the file name is 01-00-19-db-4a-6a-0e.</p>
<pre class="brush: plain; title: ; notranslate">
LABEL linux
KERNEL vmlinuz-2.6.26-1-686
APPEND root=/dev/nfs initrd=initrd.img-2.6.26-1-686_netboot nfsroot=192.168.1.108:/srv/nfs/mythbox.pixelchaos.net ip=dhcp rw
</pre>
<p>Now that our TFTP server is up and running we will next need to configure a DHCP server to provide IP addresses to netboot clients, as well as point them to the TFTP server to continue the boot process.</p>
<pre class="brush: plain; title: ; notranslate">
root@dhcp:~$ apt-get install dhcp3-server
</pre>
<p>That will install the DHCP service for you. Now we just need to add one little section to /etc/dhcp3/dhcpd.conf for the workstation we are going to netboot.</p>
<pre class="brush: plain; title: ; notranslate">
host mythbox {
hardware ethernet 00:19:db:4a:6a:0e;
fixed-address mythbox.pixelchaos.net;
filename &quot;pxelinux.0&quot;;
next-server 192.168.1.115;
}
</pre>
<p>host mythbox: mythbox is just the descriptive name for this configuration block .You can use any name you like.<br />
hardware ethernet 00:19:db:4a:6a:0e: This is the hardware ethernet address of the workstation we are netbooting.<br />
fixed-address mythbox.pixelchaos.net: This tells the DHCP server what address to assign the mythbox. You can use a FQDN (if its resolvable!) or an IP address.<br />
filename &#8220;pxelinux.0&#8243;: This is the PXE boot loader file that we installed onto our TFTP server earlier.<br />
next-server 192.168.1.115: This is the IP address of our TFTP server. It tells the mythbox where the &#8220;next server&#8221; is after it gets its IP address from the DHCP server. The &#8220;next server&#8221; can be any machine on the network. It can even be the same one running DHCP.</p>
<p>Once all that is done, restart your DHCP server.</p>
<pre class="brush: plain; title: ; notranslate">
root@dhcp:~$ /etc/init.d/dhcp3-server restart
</pre>
<p>Now for the third piece of the puzzle, our NFS root filesystem. You&#8217;ll first need to create a directory to share.</p>
<pre class="brush: plain; title: ; notranslate">
root@nfs:~$ mkdir /srv/nfs/mythbox.pixelchaos.net
</pre>
<p>Now add that directory to /etc/exports so that it gets shared via NFS with this line:</p>
<pre class="brush: plain; title: ; notranslate">
/srv/nfs/mythbox.pixelchaos.net mythbox(rw,async,no_root_squash)
</pre>
<p>The rw, async, and no_root_squash options are important. Dont omit them. At this point we can reload all our NFS exports to active this new share point.</p>
<pre class="brush: plain; title: ; notranslate">
root@nfs:~$ exportfs -rv
</pre>
<p>At this point the entire TFTP, DHCP, and NFS parts of the environment are ready to go. Now we will migrate our existing installation of Linux from the mythbox onto its new nfsroot. First we make a directory to mount the NFS share on and then mount it.</p>
<pre class="brush: plain; title: ; notranslate">
root@mythbox:~$ mkdir /mnt/nfs
root@mythbox:~$ mount -t nfs -o nolock 192.168.1.108:/srv/nfs/mythbox.pixelchaos.net /mnt/nfs
</pre>
<p>Now we run a cp command on every locally mounted partition, as well as /dev. On my mythbox it looked like this:</p>
<pre class="brush: plain; title: ; notranslate">
root@mythbox:~$ cp -axv /. /mnt/nfs/.
root@mythbox:~$ cp -axv /boot/. /mnt/nfs/boot/.
root@mythbox:~$ cp -axv /home/. /mnt/nfs/home/.
root@mythbox:~$ cp -axv /dev/. /mnt/nfs/dev/.
</pre>
<p>The last thing to do is edit two files that we copied up to /mnt/nfs. The first is /mnt/nfs/etc/network/interfaces. You&#8217;ll need to remove any lines that bring the interface up automatically. You want to remove anything like &#8220;allow-hotplug eth0&#8243; and just leave a single line like &#8220;iface eth0 inet dhcp&#8221;. The network interface will have already been brought up by netboot normally and leaving in any &#8220;hotplug&#8221; or &#8220;auto&#8221; lines will bring it up again, which has the effect of destroying it.</p>
<p>Now we remove all the old filesystems from /mnt/nfs/etc/fstab so that it looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
# /etc/fstab: static file system information.
#
# &lt;file system&gt; 		&lt;mount point&gt;   	&lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;
/dev/nfs        /               nfs     defaults 0 0
none            /tmp            tmpfs   defaults 0 0
none            /var/run        tmpfs   defaults 0 0
none            /var/lock       tmpfs   defaults 0 0
none            /var/tmp        tmpfs   defaults 0 0
none            /media          tmpfs   defaults 0 0
</pre>
<p>That should be it. Now just set the mythbox to use network booting in its BIOS and reboot.</p>
<p>Cool, huh? :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/02/15/diskless-booting-with-pxe-and-nfs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bacula 2.4.4 for Mac OS X</title>
		<link>http://www.pixelchaos.net/2009/01/20/bacula-244-for-mac-os-x/</link>
		<comments>http://www.pixelchaos.net/2009/01/20/bacula-244-for-mac-os-x/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 16:15:11 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Bacula]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=83</guid>
		<description><![CDATA[Another update to the bacula client and bconsole for Mac OS X. This should install and run properly on (at least) Mac OS X 10.4 and 10.5 for both Intel and PowerPC. Upgrades from old versions are handled in an intelligent fashion as well. Enjoy! bacula-client-244-1]]></description>
			<content:encoded><![CDATA[<p>Another update to the bacula client and bconsole for Mac OS X. This should install and run properly on (at least) Mac OS X 10.4 and 10.5 for both Intel and PowerPC. Upgrades from old versions are handled in an intelligent fashion as well.</p>
<p>Enjoy!<br />
<a href='http://www.pixelchaos.net/wp-content/uploads/2009/01/bacula-client-244-1.zip'>bacula-client-244-1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2009/01/20/bacula-244-for-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Bacula 2.4.3 for Mac OS X</title>
		<link>http://www.pixelchaos.net/2008/11/25/bacula-243-for-mac-os-x/</link>
		<comments>http://www.pixelchaos.net/2008/11/25/bacula-243-for-mac-os-x/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 15:39:28 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Bacula]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=74</guid>
		<description><![CDATA[Another update to the bacula client and bconsole for Mac OS X. This should install and run properly on (at least) Mac OS X 10.4 and 10.5. Upgrades from old versions are handled in an intelligent fashion as well. Enjoy! bacula-client-243-1]]></description>
			<content:encoded><![CDATA[<p>Another update to the bacula client and bconsole for Mac OS X. This should install and run properly on (at least) Mac OS X 10.4 and 10.5. Upgrades from old versions are handled in an intelligent fashion as well.</p>
<p>Enjoy!<br />
<a href='http://www.pixelchaos.net/wp-content/uploads/2008/11/bacula-client-243-1.zip'>bacula-client-243-1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2008/11/25/bacula-243-for-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prune old mythtv channels</title>
		<link>http://www.pixelchaos.net/2008/10/12/prune-old-mythtv-channels/</link>
		<comments>http://www.pixelchaos.net/2008/10/12/prune-old-mythtv-channels/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 00:19:05 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=73</guid>
		<description><![CDATA[Looking for a way to bulk remove channels that I&#8217;ve delselected in my channel lineup at Schedules Direct, I happened upon this blog post. Seems to work great :) For the impatient, the important bit is this: DELETE channel,program FROM channel NATURAL LEFT JOIN program WHERE program.title IS NULL;]]></description>
			<content:encoded><![CDATA[<p>Looking for a way to bulk remove channels that I&#8217;ve delselected in my channel lineup at Schedules Direct, I happened upon <a title="this blog post" href="http://www.ilikelinux.com/tips-and-howtos/tips-for-using-mysql-with-mythtv/trackback" target="_blank">this blog post</a>. Seems to work great :)</p>
<p>For the impatient, the important bit is this:</p>
<p><code>DELETE channel,program FROM channel NATURAL LEFT JOIN program WHERE program.title IS NULL;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2008/10/12/prune-old-mythtv-channels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

