<?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"
	>

<channel>
	<title>Rudd-O.com &#187; Ubuntu</title>
	<atom:link href="http://rudd-o.com/archives/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://rudd-o.com</link>
	<description>We only do fun stuff.</description>
	<pubDate>Thu, 24 Jul 2008 20:34:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>The document-centric and application-centric paradigms vs. streams</title>
		<link>http://rudd-o.com/archives/2008/06/24/the-document-centric-and-application-centric-paradigms-vs-streams/</link>
		<comments>http://rudd-o.com/archives/2008/06/24/the-document-centric-and-application-centric-paradigms-vs-streams/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 03:17:19 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/06/24/the-document-centric-and-application-centric-paradigms-vs-streams/</guid>
		<description><![CDATA[I’d like to see the following ideas studied and implemented.  And you’re welcome to contribute to them (it’s on a wiki, after all).
]]></description>
			<content:encoded><![CDATA[<p>I’d like to see <a href="http://software-libre.rudd-o.com/Streams_vs._documents">the following ideas studied and implemented</a>.  And you’re welcome to contribute to them (it’s on a wiki, after all).</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/06/24/the-document-centric-and-application-centric-paradigms-vs-streams/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ZFS on Linux: my story and HOWTO you can have it too</title>
		<link>http://rudd-o.com/archives/2008/06/24/zfs-on-linux-my-story-and-howto-you-can-have-it-too/</link>
		<comments>http://rudd-o.com/archives/2008/06/24/zfs-on-linux-my-story-and-howto-you-can-have-it-too/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 14:45:42 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/06/24/zfs-on-linux-my-story-and-howto-you-can-have-it-too/</guid>
		<description><![CDATA[Have you heard about ZFS?  It’s a generation-defining stable high-performance high-end filesystems, created by Jeff Bonwick at Sun, and ported over to Mac OS X and the BSD family.  Oh, and for Linux, using the FUSE (Filesystem in userspace) kernel abstraction.  Here’s my ZFS story.



I’m using Kubuntu Hardy, and my computer has [...]]]></description>
			<content:encoded><![CDATA[<p>Have you heard about ZFS?  <a href="http://opensolaris.org/os/community/zfs/docs/zfs_last.pdf">It&#8217;s a generation-defining stable high-performance high-end filesystems</a>, created by Jeff Bonwick at Sun, and ported over to Mac OS X and the BSD family.  <a href="http://zfs-on-fuse.blogspot.com/">Oh, and for Linux, using the FUSE</a> (Filesystem in userspace) kernel abstraction.  Here&#8217;s my ZFS story.</p>

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

<p>I&#8217;m using Kubuntu Hardy, and my computer has two 400 GB SATA hard disks.  Yes, that&#8217;s all the storage I have at hand; as of three days ago, it was RAIDed using the multipath devices (<code>md</code>) kernel module, split in two LVM volumes: <code>/</code>and <code>/home</code>.  Oh, and two same-size byte-aligned swap partitions, one on each disk, <code>swapon</code>&#8216;ed <code>pri=0</code>.</p>

<p>I had been salivating over the thought of using ZFS in my workstation because of several killer features:</p>

<ul>
<li>The first one that comes to mind is end-to-end data integrity thanks to checksumming &#8212; I&#8217;ve already had many disks go bad on me, while others corrupted my data silently (which is, believe it or not, the most insidious thing ever, because after you&#8217;ve noticed it, backups won&#8217;t help you with that &#8212; you&#8217;ve probably already papered over your backups with new, bad data).</li>
<li>The second one is compression.  Together with tightly packed data, compression promises to increase performance and reduce disk utilization.</li>
<li>The third one is the advanced transactional algorithm that yields an always-consistent disk structure.  Unlike log-based filesystems, ZFS does copy-on-write and ripples the changes up through the filesystem tree; before the topmost node is updated, the changes don&#8217;t affect consistency; when the topmost node is updated, the disk is consistent as well.  Never <code>fsck</code> again!</li>
</ul>

<p>&#8220;Damn, gotta get me some of that, I thought&#8221;</p>

<p>Getting ZFS was actually a piece of cake:  <a href="http://www.wizy.org/wiki/ZFS_on_FUSE#head-228bbb4377ef0d3a01c17e3267f6f7a56cf7aaef">I went to the Mercurial repository for the project</a>, selected the tip view, and downloaded a nice tarball.  I then installed a couple of dependencies according to the README, and hit <code>scons</code> in a terminal window.  Five commands were built:</p>

<ul>
<li><code>zfs-fuse</code>, the daemon that serves FUSE requests.  The FUSE module is an odd beast: applications futzing with a FUSE-mounted filesystem talk to the kernel VFS, which talks to FUSE, which talks to the daemon backing that particular mount.  This userspace-kernelspace-userspace-kernelspace&#8211;userspace overhead, you will see, is a big deal.</li>
<li><code>zfs</code> and <code>zpool</code>, the main management commands that use IPC to talk to <code>zfs-fuse</code>.</li>
<li>two others that you won&#8217;t care and I won&#8217;t care either.</li>
</ul>

<p>A cursory inspection with such important system binaries was in order, so I <code>ldd</code> the daemon and the commands.  <code>zfs-fuse</code> links to <code>/usr/lib/libz*.so*</code>.  Not good, chicken and egg problem, linking to a library in a filesystem that will not be available before <code>zfs-fuse is running</code>?  I rebuild it using a modified <code>SConstruct</code> file so it statically links that library in.</p>

<p>I had decided that my filesystem layout would be:</p>

<ul>
<li>1 GB swap partition on each disk</li>
<li>1 GB <code>/</code> filesystem, composed of two RAID1 partitions (one on each disk), formatted with ext3 (in case of catastrophe, it&#8217;s nice to have something the kernel can boot without initial RAM disks)</li>
<li>398 GB ZFS volume, where I planned to drop <code>/usr</code>, <code>/home</code> and <code>/var</code></li>
</ul>

<p>But I didn&#8217;t have extra hard disks to make the switch.  No problem, <em>croupier</em>, everything I have on red please &#8212; and spin that wheel!  I installed ZFS directly on my running system.  How did I do it?  Well, if you must know:</p>

<ul>
<li>I offlined the second disk with <code>mdadm</code>.</li>
<li>I <code>swapoff</code>&#8216;ed its swap partition.  At this point the disk is no longer busy.</li>
<li>I repartitioned the disk (if the disk is non-busy, the kernel rereads the partition table just fine).</li>
<li>Then I relied on the first all the time.</li>
</ul>

<p>Yes, realtime no-boot filesystem switchover &#8212; or at least I thought it would be that easy (I was very wrong).</p>

<p>Then I <code>mkfs.ext3</code>ed the new 1 GB root filesystem, and <code>mkswap</code>&#8216;ed the swap one.  A couple of <code>rsyncs</code> later (which I scripted for consistency and repeatability), I had a new, working <code>/</code>.  I mounted it and went in it, to remove <code>mdadm.conf</code> and <code>lvm.conf</code> lines that could prove problematic on next boot.  At this point I was panicking because it was superstitiously conceivable that, after a reboot, <code>md</code> would want to rebuild the arrays and destroy the second disk.</p>

<p>I then copied the ZFS binaries in <code>/sbin</code> and ran it.  A cursory <code>lsof</code> inspection told me that the ZFS socket was on <code>/etc/zfs/zfs_socket</code>.  <code>zpool create</code> quickly gave me the 392 GB of disk space that were previously empty in the second disk, in which I created subvolumes, with adjusted mount points to end up under a temporary tree structure under <code>/newfs</code>.  Curiously, after creating a subvolume, it&#8217;s not mounted, but a <code>zfs mount -a</code> works as you probably would expect.</p>

<p>I enabled compression in the root volume (subvolumes inherit attributes) and started rsyncing <code>/var</code>, <code>/usr</code> and <code>/home</code> into each subvolume.  Cue the movie 32 hours later to have an idea of how slow it was.  It was unbelievably slow &#8212; un-frigging-believable, with both CPUs nearly pegged and regularly hovering at 150% combined user+system.  The worst part is, I was seeing disk throughput in the 2-3 MB/s range, using <code>iostat 1</code> and <code>zpool iostat 1</code>.  Keep in mind that performance (high write throughput, low responsiveness/latency during massive reads) is marketed as a ZFS selling point &#8212; and I don&#8217;t doubt the Sun guys&#8230; on Solaris, not Linux!</p>

<p>During that lengthy process I started finding out several things that would prove crucial later on:</p>

<ul>
<li>FUSE does not support <code>mmap</code> in the Linux kernel that my distribution uses.  Many, many applications rely on that feature to work.</li>
<li>There was no initscript for ZFS.  I would have to write an initscript from scratch.  On Kubuntu, where initscripts are being (1) phased out and (2) completely different to my beloved RPM distros.</li>
</ul>

<p>At this point I was a bit nervous, if you&#8217;ll allow me to understate.  But I wrote the initscript anyway:</p>

<p><pre>#! /bin/sh</pre></p>

<h3>BEGIN INIT INFO</h3>

<h1>Provides:          zfs</h1>

<h1>Required-Start:    mountall</h1>

<h1>Required-Stop:     sendsigs</h1>

<h1>Should-Start:</h1>

<h1>Should-Stop:</h1>

<h1>Default-Start:</h1>

<h1>Default-Stop:</h1>

<h1>Short-Description: Enable/disable the ZFS-FUSE subsystem</h1>

<h1>Description: Control ZFS-FUSE subsystem</h1>

<h3>END INIT INFO</h3>

<p>PIDFILE=/var/run/zfs-fuse.pid
LOCKFILE=/var/lock/zfs/zfs_lock</p>

<p>. /lib/init/vars.sh</p>

<p>. /lib/lsb/init-functions
. /lib/init/mount-functions.sh</p>

<p>export PATH=/sbin:/bin
unset LANG
ulimit -v unlimited</p>

<p>do_start() {
    test -x /sbin/zfs-fuse || exit 0
    PID=<code>cat "$PIDFILE" 2&amp;gt; /dev/null</code>
    if [ "$PID" != "" ]
    then
        if kill -0 $PID 2&gt; /dev/null
        then
            echo "ZFS-FUSE is already running"
            exit 3
        else
            # pid file is stale, we clean up shit
            log_action_begin_msg "Cleaning up stale ZFS-FUSE PID files"
            rm -f /var/run/sendsigs.omit.d/zfs-fuse "$PIDFILE"
            log_action_end_msg 0
        fi
    fi</p>

<pre><code>pre_mountall

log_action_begin_msg "Starting ZFS-FUSE process"
zfs-fuse -p "$PIDFILE"
ES_TO_REPORT=$?
if [ 0 = "$ES_TO_REPORT" ]
then
    true
else
    log_action_end_msg 1 "code $ES_TO_REPORT"
    post_mountall
    exit 3
fi

for a in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
do
    PID=`cat "$PIDFILE"`
     [ "$PID" != "" ] &amp;amp;&amp;amp; break
    sleep 1
done

if [ "$PID" = "" ]
then
    log_action_end_msg 1 "ZFS-FUSE did not start or create $PIDFILE"
    post_mountall
    exit 3
else
    log_action_end_msg 0
fi

log_action_begin_msg "Immunizing ZFS-FUSE against OOM kills and sendsigs signals"
mkdir -p /var/run/sendsigs.omit.d
cp "$PIDFILE" /var/run/sendsigs.omit.d/zfs-fuse
echo -17 &amp;gt; "/proc/$PID/oom_adj"
ES_TO_REPORT=$?
if [ 0 = "$ES_TO_REPORT" ]
then
    log_action_end_msg 0
else
    log_action_end_msg 1 "code $ES_TO_REPORT"
    post_mountall
    exit 3
fi

log_action_begin_msg "Mounting ZFS filesystems"

zfs mount -a
ES_TO_REPORT=$?
if [ 0 = "$ES_TO_REPORT" ]
then
    log_action_end_msg 0
else
    log_action_end_msg 1 "code $ES_TO_REPORT"
    post_mountall
    exit 3
fi

if [ -x /usr/bin/renice ] ; then
    log_action_begin_msg "Increasing ZFS-FUSE priority"
    /usr/bin/renice -15 -g $PID &amp;gt; /dev/null
    ES_TO_REPORT=$?
    if [ 0 = "$ES_TO_REPORT" ]
    then
        log_action_end_msg 0
    else
        log_action_end_msg 1 "code $ES_TO_REPORT"
        post_mountall
        exit 3
    fi
    true
fi

post_mountall
</code></pre>

<p>}</p>

<p>do_stop () {
    test -x /sbin/zfs-fuse || exit 0
    PID=<code>cat "$PIDFILE" 2&amp;gt; /dev/null</code>
    if [ "$PID" = "" ] ; then
        # no pid file, we exit
        exit 0
    elif kill -0 $PID 2&gt; /dev/null; then
        # pid file and killable, we continue
        true
    else
        # pid file is stale, we clean up shit
        log_action_begin_msg &#8220;Cleaning up stale ZFS-FUSE PID files&#8221;
        rm -f /var/run/sendsigs.omit.d/zfs-fuse &#8220;$PIDFILE&#8221;
        log_action_end_msg 0
        exit 0
    fi</p>

<pre><code>pre_mountall

log_action_begin_msg "Syncing disks"
sync
log_action_end_msg 0

log_action_begin_msg "Unmounting ZFS filesystems"
zfs unmount -a
ES_TO_REPORT=$?
if [ 0 = "$ES_TO_REPORT" ]
then
    log_action_end_msg 0
else
    log_action_end_msg 1 "code $ES_TO_REPORT"
    post_mountall
    exit 3
fi

post_mountall # restore /var/lock and /var/run to their right places

log_action_begin_msg "Terminating ZFS-FUSE process gracefully"
kill -TERM $PID

for a in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
do
    kill -0 $PID 2&amp;gt; /dev/null
    [ "$?" != "0" ] &amp;amp;&amp;amp; break
    sleep 1
done

if kill -0 $PID 2&amp;gt; /dev/null
then
    log_action_end_msg 1 "ZFS-FUSE refused to die after 15 seconds"
    post_mountall
    exit 3
else
    rm -f /var/run/sendsigs.omit.d/zfs-fuse "$PIDFILE"
    log_action_end_msg 0
fi

log_action_begin_msg "Syncing disks again"
sync
log_action_end_msg 0
</code></pre>

<p>}</p>

<p>case &#8220;$1&#8243; in
  start)
    do_start
    ;;
  stop)
    do_stop
    ;;
  status)
    PID=<code>cat "$PIDFILE" 2&amp;gt; /dev/null</code>
    if [ "$PID" = "" ] ; then
        echo &#8220;ZFS-FUSE is not running&#8221;
        exit 3
    else
        if kill -0 $PID
        then
            echo &#8220;ZFS-FUSE is running, pid $PID&#8221;
            zpool status
            exit 0
        else
            echo &#8220;ZFS-FUSE died, PID files stale&#8221;
            exit 3
        fi
    fi
    ;;
  restart|reload|force-reload)
    echo &#8220;Error: argument &#8216;$1&#8242; not supported&#8221; &gt;&amp;2
    exit 3
    ;;
  *)
    echo &#8220;Usage: $0 start|stop|status&#8221; &gt;&amp;2
    exit 3
    ;;
esac</p>

<p>:</p>

<p>The script should explain itself.</p>

<p>There were two problems, though.  I derived my script from the NFS one and, in the process, I discovered that NFS was symlinked to be started at slot 31 in level 6 and 0.  This means that the initscripts subsystem would call that script with a <code>start</code> argument when in reality, the action was in the <code>stop</code> block.  Since I couldn&#8217;t figure out what kind of magic the Upstart initscripts compatibility subsystem does to get a <code>stop</code> block to run when a <code>start</code> block is requested by its configuration, I just created two glue scripts: one to start ZFS no matter what, and one to stop ZFS no matter what:</p>

<p><pre>-rwxr-xr-x 1 root root 481 2008-06-18 04:09 /etc/init.d/mountzfs
-rwxr-xr-x 1 root root 488 2008-06-18 04:09 /etc/init.d/umountzfs</pre></p>

<p>Then I studied the Kubuntu boot sequence very carefully, and used some elbow grease (<code>update-rc.d</code>) to symlink them to get the results I wanted:</p>

<p><pre>lrwxrwxrwx 1 root root 19 2008-06-18 03:52 /etc/rc0.d/S35umountzfs -&gt; ../init.d/umountzfs
lrwxrwxrwx 1 root root 19 2008-06-18 03:52 /etc/rc6.d/S35umountzfs -&gt; ../init.d/umountzfs
lrwxrwxrwx 1 root root 18 2008-06-18 03:52 /etc/rcS.d/S36mountzfs -&gt; ../init.d/mountzfs</pre></p>

<p>Trust me, writing the script was the easy part &#8212; figuring out how it interacts with the rest of the system was much harder.</p>

<p>Finally, I rebooted to my new root filesystem on the second disk.  If you thought that my system booted correctly, you would be very, very wrong indeed.  Eighty percent of the boot sequence were red <code>[ fail ]</code>s and <code>sh: command not found</code> errors.  At the end, the system dropped me into a recovery console, where I could finally switch the ZFS mount points to their final destinations.  Then, just to try out: <code>zfs mount -a</code>.</p>

<p><code>/home</code>mounted.  <code>/var</code> couldn&#8217;t be mounted, because the boot process graciously created incredibly important missing directories in it.  And then, deadlock.</p>

<p>Crap, what was wrong?</p>

<p><code>Alt+SysRq+R</code>.  Boot again.  What&#8217;s wrong?  No idea.  Try <code>strace</code>.  The friggin&#8217; command is in <code>/usr</code>.  Hypotheses ran through my head for two hours.  With me in front of a very, very broken system.  I tried everything under the Sun that I could get my hands on &#8212; which is not much when you don&#8217;t have a CD-ROM drive, mind you.</p>

<p>And (summarizing two hours) then, I tried this: <code>zfs set mountpoint=/tmp/usr vault/usr ; mkdir -p /tmp/usr ; zfs mount vault/usr</code>.</p>

<p>Miracle of miracles, it worked.  I copied the entire cast of characters of Linux Debugging: The Movie into the very tightly packed <code>/</code>.  I <code>strace --ff</code>ed the hell out of <code>zfs-fuse</code> and I found the problem.  The moronic <code>mount.fuse</code> subcommand, that actually connects the kernel and user endpoints, tries to read <code>/usr/lib/locale/locale-archive</code> right in the middle of mounting the filesystem!  Instant deadlock that you can only get out of by using the SysRq OOM key (yes, <code>zfs-fuse</code> is actually a great OOM candidate &#8212; 1.5 GB VM size on this 1.0 GB RAM computer; yes, I discovered that on my own before I wrote the OOM immunization code in the initscript).</p>

<p>I then discovered two things: <code>zfs-fuse</code> didn&#8217;t deadlock when started from the recovery command, but it did lockup when starting it from the initscript.  What you can&#8217;t see is that the version of the initscript that I initially wrote was sourcing the <code>LANG</code> variable from a configuration script in <code>/etc</code>.  OK, so how do you solve locale problems?  Instant fixup: <code>unset LANG</code> before running the command.</p>

<p>OK, so do I have a booting system now, or what?  Wrong again.  Some processes get started before the actual mounting of filesystems, and the ZFS subsystem can&#8217;t actually be started earlier in the boot process without creating an <code>initramfs</code> dependency or another, different, chicken-and-egg problem.  So I moved what I could move from the ZFS volume&#8217;s <code>/var</code> into the <code>/var</code> directory of the <code>/</code> filesystem.  I ended up with this structure backed up by ZFS (and the rest, you can safely assume, in a very tightly crammed <code>ext3</code> filesystem):</p>

<p><pre>zfs list
NAME              USED  AVAIL  REFER  MOUNTPOINT
vault             294G  69,8G    18K  none
vault/home        290G  69,8G   290G  /home
vault/usr        3,36G  69,8G  3,36G  /usr
vault/var         842M  69,8G    18K  none
vault/var/cache   515M  69,8G   515M  /var/cache
vault/var/lib     282M  69,8G   282M  /var/lib
vault/var/tmp    44,5M  69,8G  44,5M  /var/tmp</pre></p>

<p>Boot again.  Oh, yeah, I&#8217;m enjoying the 3-minute boot time on this formerly-a-screamer machine.  D-Bus fails to start.  D-Bus is actually very required for many things in Kubuntu, but I manage to start a GUI session up, if only to Google up what was wrong with it.  That was probably not the best moment to find out that just starting the KDE 3.5 session took over ten minutes.  All of this with less than 1 MB/s from the disk, according to <code>iostat</code> and 160% CPU usage, according to <code>top</code>.</p>

<p>Then I discovered the <a href="http://groups.google.com/group/zfs-fuse">zfs-fuse Google group</a>.  It&#8217;s a fantastic place where everyone (including Ricardo Correia) received me very well and had lots of tips.  Only there did I find out what was wrong with D-Bus &#8212; <a href="https://bugs.launchpad.net/dbus/+bug/241619">a bug that manifests itself only with FUSE filesystems</a>, <a href="https://bugs.freedesktop.org/show_bug.cgi?id=15922">for which a patch exists</a> and works.</p>

<p>At this point I&#8217;m extremely exhausted from this marathon session, so I basically just try to backport the patch into the <code>dbus</code> source package for my distribution.  You&#8217;ve probably heard that Debian (and, by extension, Ubuntu) has a fantastic build system &#8212; it failed on me.  Not only was <code>apt</code> not working (remember the <code>mmap</code> issue?), but <a href="https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/241633"><code>dpkg-source</code> also failed while trying to apply the patches for the source package</a>.  Oh, yes, I manage to solve this problem by learning, on-the-spot, how the <code>apt</code> build &#8220;system&#8221; actually works, and manually replicating the entire process that should be automated.  Many thanks to the gents at #debian in Freenode for their kind responses to my questions.</p>

<p>Bam, built <a href="content:projects/files/dbus/">dbus (it&#8217;s yours if you want it</a>).  Installed it.  Started it.  And the chain of daemons that were depending on it just start up and take life.  Neat trick, Upstart!</p>

<p>Back to performance questions and ZFS.  Do you know what the real performance killer is?  You&#8217;ll never guess it&#8230;</p>

<p>&#8230;icons!  While GTK+ applications take marginally more time to start under a ZFS regime, KDE applications take an order of magnitude more.  Before, on a warm working set, a KDE application took about 2 seconds to start.  Today, Kmail takes in excess of five minutes to start.  Why?  <a href="post:linux-filesystems-and-fecal-encephalopathy-why-oh-why-cant-it-be-better">Here&#8217;s why</a> &#8212; multiply that by fifty thousand and you&#8217;ll get the idea.  Each icon that the application requests results in thousands and thousands of <code>access()</code> and <code>stat()</code> calls.  FUSE doesn&#8217;t use a kernel cache by default (there are several reasons for that), so the only cache that backs those requests up is the ARC cache, which is an impressive caching regime and technical achievement but, in this case, it&#8217;s very much like caching your car keys somewhere in Europe, because of the transatlantic userspace-kernelspace-userspace-kernelspace-userspace barrier.  Per-call.  When this is taking place, the CPUs remain pegged at 190%, eaten by ZFS alive, and the 12 case fans jump to 11.000 RPM.</p>

<p>The zfs-fuse Google groups guys came up with a couple of suggestions (all documented in the list, which I&#8217;m too lazy to link to again).  These all are compile-time options, so a ZFS rebuild is in order for every one of them:</p>

<ul>
<li><code>scons debug=0</code>.  A very slight CPU usage decrease.</li>
<li>Increasing the ARC cache.  I doubled it from 128 to 256 MB.  Turns out it&#8217;s not a caching problem and it doesn&#8217;t help at all.</li>
<li>Mount option <code>big_writes</code> for FUSE filesystems.  Here&#8217;s what I did about that:</li>
</ul>

<p>Recompiled ZFS, this time enabling a FUSE mount option named <code>big_writes</code> that I&#8217;ve read about in the Google group.  Yes, the daemon needs to be recompiled, and it&#8217;s not fast.  No, I&#8217;m not actually jumping to the part where I actually compiled ZFS with <code>big_writes</code> first, then booted, only to find out that I needed a new kernel.  Oh, wait, I just did.  Fortunately, I did back <code>zfs-fuse</code> up.</p>

<p>Next up?  Latest 2.6.26-rc6 kernel, because of:</p>

<ul>
<li>Hey, writable <code>mmap</code> is there for FUSE filesystems!  Yeah!  Now I can have <code>apt-get</code> back!</li>
<li><code>big_writes</code>.</li>
</ul>

<p>When was the last time a kernel compile took four hours for you?  Mine was yesterday.  But it&#8217;s actually fun &#8212; the process hasn&#8217;t changed that much from 1998, and the distro already comes with a nice <code>.config</code> that you can reuse with  <code>make oldconfig</code>.  And, this time, you get to do out-of-tree kernel builds!  Yay!</p>

<p>Well, I ticked the wrong option in <code>make menuconfig</code> anyway, because my kernel modules don&#8217;t fit my puny <code>/</code>, now at 400 MB free.  Jeez, four hours.  Google some more.  Turns out I turned a debugging option on.</p>

<p>After this, FUSE userspace itself was due for a recompile.  <a href="content:projects/files/fuse/">Another odyssey, whose fruits you can reap here</a> (warning: CVS checkout).</p>

<p>OK, redo the initial RAM disk, adjust GRUB configuration, reboot with the latest kernel.  It&#8217;s all good.  More surprisingly,  I&#8217;m actually getting some of my performance back.  Some of it.  As in &#8220;Kmail no longer takes five minutes to start &#8212; only three&#8221;.</p>

<p>And, most importantly, applications that depend on <code>mmap</code> now work correctly.  My boot process isn&#8217;t an epic <code>[ fail ]</code> anymore &#8212; and that&#8217;s incredibly reassuring.</p>

<p>This is the point where my journey turns into smooth sailing.  I <code>zpool scrub</code>ed my new baby.  After five hours, with the solid guarantee that my data was OK and nothing&#8217;d been lost or corrupted during the <code>rsync</code>, I nuked my first disk, replicated the new partition structure on it.  A nice RAID1 array for the final <code>/</code>.  A short <code>rsync</code> for the <code>/</code> filesystem.  A quick <code>mkswap</code> for the new swap partition.  A fast adjustment in <code>/etc/fstab</code> and another one in <code>mdadm.conf</code> for the new array.  Reinstall and reconfigure GRUB on the first disk.  And, finally, I leave the best for the latest:</p>

<p><code>zpool attach vault /dev/by-id/second-disk-huge-partition /dev/by-id/first-disk-huge-partition</code></p>

<p>Man, that rocked.  It was unbelievably fast &#8212; like, disk-platter fast, around 40 to 50 MB per second, and the system didn&#8217;t get that much more slow when it was resilvering the first disk.  Which kind of makes lots of sense, because <code>zfs-fuse</code> is now crossing the userspace-kernelspace barrier just once per operation.  How do I know this?  Well, <code>strace</code>: I know that what <code>zfs-fuse</code> does is, it opens the disk partition in direct I/O mode and then manages it for itself, responding to FUSE requests &#8212; but the resilvering process doesn&#8217;t involve FUSE at all, it&#8217;s just the two disks practically chatting with each other through <code>zfs-fuse</code>.  Now I know for sure that ZFS will give me platter speeds.  It&#8217;s just a matter of time (and maybe me pestering Ricardo Correia to collaborate with me on this same issue).</p>

<p>Questions that I haven&#8217;t solved yet?  Sure, there are a lot.  Two that haunt me:</p>

<ul>
<li>No root filesystem on ZFS.  Others on the Google group have managed it.  Me?  I didn&#8217;t want to mess with /etc/zfs inside the <code>initramfs</code>, thank you very much.</li>
<li>I know this for sure: the only active cache now is the userspace ARC cache from ZFS; I read the FUSE kernel code, and it clearly flushes files from the cache when programs <code>open()</code> them.  Honestly, if I could wish for something to just become true overnight, I&#8217;d wish for the ARC to be moved into the kernel and to have it replace the page cache, but that won&#8217;t happen anytime soon.  There&#8217;s a FUSE <code>kernel_cache</code> option, but I&#8217;m wary of enabling it.  When I have been sufficiently reassured that the option won&#8217;t corrupt my precious data, I will enable it.  That will be a couple of hours of reading someone else&#8217;s code, so I&#8217;m inclined to defer it for a few days.  But, in theory, this should give me platter speeds instead of giving my 12 case fans &#8217;speed&#8217;.  At the hefty cost of RAM for two redundant caches.</li>
<li>Do filesystem readahead and Linux disk scheduler algorithms mess up in some way with ZFS&#8217; control of the platter?  The data integrity question is closed, because the writes are submitted with barriers, but I&#8217;m worried that the Linux I/O scheduler is second-guessing the decisions of ZFS&#8217; one.</li>
<li>The <code>/etc/init.d/sendsigs</code> <code>omit.d</code> protocol I&#8217;m using on the initscript <a href="https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/151580">plain fails</a>.  I had to shunt the script with an <code>exit 0</code> right before the <code>killall5</code> in <code>sendsigs</code> because <code>killall5</code> plain hung instead of ignoring ZFS as it should have done &#8212; and it needs to ignore ZFS because ZFS is unmounted later.  <a href="http://blogs.sun.com/bonwick/en_US/entry/casablanca">This won&#8217;t be a problem once we get our own kernelspace ZFS implementation</a>.</li>
</ul>

<p>OK, that was my journey.  I&#8217;m on ZFS now, my machine&#8217;s rock-solid (if a bit CPU-tired) and my data&#8217;s never been so safe.  I also got compression, which saved me about 6 GB.  Furthermore, I&#8217;ve given you the initscript, the steps and <a href="content:projects/files/dbus/">the</a> <a href="content:projects/files/dbus/">software</a> (except ZFS, but you can compile that yourself).</p>

<p>Go wild.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/06/24/zfs-on-linux-my-story-and-howto-you-can-have-it-too/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Filesystems vs. fecal encephalopathy in Linux applications &#8212; why, oh why, can&#8217;t it be better?</title>
		<link>http://rudd-o.com/archives/2008/06/19/linux-filesystems-and-fecal-encephalopathy-why-oh-why-cant-it-be-better/</link>
		<comments>http://rudd-o.com/archives/2008/06/19/linux-filesystems-and-fecal-encephalopathy-why-oh-why-cant-it-be-better/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 13:24:59 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Sucks!]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/06/19/linux-filesystems-and-fecal-encephalopathy-why-oh-why-cant-it-be-better/</guid>
		<description><![CDATA[Look, I’m a fan of Linux.  But nothing can excuse the stupid behavior of KDE applications under Kubuntu:



What you’re about to see is just a twenty-line snippet representing standard pathological behavior of a widely used KDE application that comes with Kubuntu.  I’m at a loss of words, because what you’re about to see [...]]]></description>
			<content:encoded><![CDATA[<p>Look, I’m a fan of Linux.  But <strong>nothing</strong> can excuse the stupid behavior of KDE applications under Kubuntu:</p>

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

<p>What you’re about to see is just a twenty-line snippet representing standard pathological behavior of a widely used KDE application that comes with Kubuntu.  I’m at a loss of words, because what you’re about to see repeats itself (I kid you not) <strong>at least a twenty thousand times</strong>:</p>

<p><pre>access("/usr/share/icons/crystalproject/24x24/devices/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/24x24/filesystems/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/24x24/filesystems/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/24x24/mimetypes/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/24x24/mimetypes/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/actions/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/actions/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/apps/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/apps/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/devices/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/devices/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/filesystems/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/filesystems/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/icons/crystalproject/32x32/mimetypes/mail_todo.xpm", R_OK) = -1 ENOENT (No such file or directory)</pre></p>

<p>Now, let me ask you: <strong>what kind of engineering is this?</strong>  <q>Oh, I’ll just look for the icon named mail_todo of types XPM, SVG, SVGZ, PNG, JPG across thousands of directories and if I can’t find it, I just won’t draw it</q>.</p>

<p>Modern desktop environments package all that shit up in a single icon cache and use <code>mmap</code> to quickly find it.  Well, <em>guess again, loser who invented that band-aid</em>.  I’m using a filesystem that doesn’t support <code>mmap</code>.  Now my filesystem has to consume inordinate amounts of CPU to find each one of those two hundred icons your application uses, because you couldn’t find a better algorithm to find the motherfucking icon.</p>

<p>Oh, by the way, every time I delete an e-mail from KMail’s listing, the entire process is repeated again.  I guess I can safely omit the part where Kicker (the panel) and Kopete all do the same things for each icon that they display.  Woops, I didn’t omit it.</p>

<p>Just another tale of living in the bleeding edge of Linux computing.</p>

<p><em>In the interest of full disclosure: I’m using the CPU-heavy <a href="http://groups.google.com/group/zfs-fuse/">ZFS</a> filesystem from <a href="http://www.sun.com/">Sun</a>.  I’m testing it because it offers <a href="http://opensolaris.org/os/community/zfs/docs/zfs_last.pdf">unsurpassed reliability</a>.  Yes, it’s CPU-heavy.  Yes, it runs through FUSE.  But that’s not the point — the point is that this wouldn’t matter if KDE apps (and, I’m sure, many others as well) wouldn’t suck so much to find a motherfucking icon.  After the latest <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git">torvalds kernel recompile</a> and another ZFS recompile for performance (which failed), I have gained quite a lot of performance: now KMail doesn’t take 10 minutes to launch — it only takes four.  On a dual-core Xeon, with 1 GB RAM and 7200 RPM dual platters.  Four motherfucking minutes.  I now fully agree with Cox when he said userspace does stupid things.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/06/19/linux-filesystems-and-fecal-encephalopathy-why-oh-why-cant-it-be-better/feed/</wfw:commentRss>
		</item>
		<item>
		<title>dpkg is braindead.  Jason, you&#8217;re wrong.</title>
		<link>http://rudd-o.com/archives/2008/04/13/dpkg-is-braindead-jason-youre-wrong/</link>
		<comments>http://rudd-o.com/archives/2008/04/13/dpkg-is-braindead-jason-youre-wrong/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 03:45:30 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Sucks!]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/04/13/dpkg-is-braindead-jason-youre-wrong/</guid>
		<description><![CDATA[Jason, you said in your post something that left me thinking:



Proposed solution: make PackageKit do exactly what synaptic has been doing for the past three years: when a package install process blocks on file descriptor 0, unhide a hidden VTE widget. As it stands now, none of the publicly facing Ubuntu or Debian PacketKit pages [...]]]></description>
			<content:encoded><![CDATA[<p>Jason, <a href="http://jasondclinton.livejournal.com/65533.html">you said in your post something that left me thinking</a>:</p>

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

<blockquote>Proposed solution: make PackageKit do exactly what synaptic has been doing for the past three years: when a package install process blocks on file descriptor 0, unhide a hidden VTE widget. As it stands now, none of the publicly facing Ubuntu or Debian PacketKit pages have proposed any other solution to the problem, and it appears there’s no other proposed solution on the mailing list. (Take care to note that this has nothing to do with debconf.)</blockquote>

<p>I absolutely disagree with you.&nbsp; This goddamned practice of letting packages interrupt the upgrade process willy-nilly on the packager’s whim is idiotic and should have dealt with years ago (preferably with death by fire).&nbsp; Don’t tell me that the Debian project had a breakthrough invention when they “invented” the “hey, let’s interrupt package installation to ask the user a dpkg-configure question or to run a postinstall script”.  That is not a breakthrough; it’s a practice that should have long been abandoned.</p>

<p>The reason why dpkg has this brain damage is pretty clear: the installation/upgrade process and the post-install configuration process aren’t clearly separated.  It boils down to a single question: it’s fine by me if you want to include a package that needs extra user input for configuration — so, why don’t you ask me for the configuration at first-run time, and ship a package with sane defaults?</p>

<p>The RPM take on this issue has a huge advantage: by limiting user interaction during upgrades/installations, it forces packagers to distribute sanely preconfigured packages.  That’s the reason you can install Dovecot, Postfix, and SquirrelMail on Fedora, and have a working mail server right out of the box — save, perhaps, for changing the listening interface setting on the Postfix configuration file.</p>

<p>The Debian way, on the other hand, creates a moral incentive for the packager to punt configuration questions to the user.  Honestly, you can’t expect end-users to interact with a shell.  The minute I show my dad a Synaptic VTE question, is the minute my dad stops using Linux.</p>

<p>This is one of the things that suck big time in dpkg.  RPM-based distros don’t have this problem.  On Fedora, I can make an unattended upgrade and it will work 100% of the time, knowing that the configuration files won’t be replaced but I will have a way to diff those configuration files.  Not so with Ubuntu.  Not so with Debian.  I’m being candid here: I’ve had to answer tens of questions after a Debian dist-upgrade.  I’ve never had to answer a single question after a <code>smart upgrade</code>.  Yes, I know I could tell dpkg-configure not to ask me questions, but I wonder when Debian will default to that behavior.</p>

<p>What’s more, the RPM way has a fantastic consequence: upgrades are fully transactional.  You can’t make a transactional upgrade if you’re interrupting the upgrade process by opening <code>stdin</code> to ask bullshit questions or other hackery.  Honest, the need to run <code>apt-get -f install</code> bullshit is something I’ve never, ever in my life experienced with Fedora’s or Red Hat’s RPM.  And it’s a weekly fucking occurrence in Ubuntu!</p>

<p>Just now, I had temporarily turned Nagios2 off with <code>/etc/init.d/nagios2 stop</code>, and the goddamned <code>apt-get -f install</code> won’t finish because it insists on dpkg-configuring Nagios2, and the dpkg-configure process fails because it attempts to shut down Nagios2 and that fails, leaving my system in a circle-jerk of partial configuredness, that I wouldn’t know how to fix if I didn’t have ten years of Linux experience.</p>

<p>Oh, and for the record, the other reasons are:</p>

<ol>
<li>You can’t have two versions of the package with the same name installed in the system (I have visited this argument before).  Not very used in the RPM world either, but I have put that use into practice.</li>
<li>You can’t do an <code>rpm -Va</code>, and have dpkg check for permissions, dates, times, and file sizes/sums.  What the hell were the dpkg developers thinking?  This is practically the first thing I use to audit a server right before I take it under my wing, just to get a clear idea of what the people before me did with it.</li>
<li>When you remove a package with dpkg, the configuration files remain unless you purge it.  Why can’t dpkg do like RPM — erasing configuration files unless they were modified by the user?  Two different remove operations are one too many.</li>
<li><a href="http://rudd-o.com/archives/2008/01/04/a-short-rant-on-ubuntu-and-dpkg-fuck-you-dpkg/" title="A short rant on Ubuntu and dpkg: fuck you, dpkg">dpkg happily lets you destroy your system</a>.</li>
</ol>

<p>And, quoting you:</p>

<blockquote>This has the added benefit of making it possible for any user on any distro. to unhide the VTE window when something goes wrong–and we all know that something goes wrong with package managers all the time.</blockquote>

<p>I dunno about your experiences with Red Hat or Fedora, but when I use a GUI package manager on Fedora, and something goes wrong, what I’m interested in is the output of <code>stderr</code>.  All GUI package managers neatly show these messages nowadays.  And I rarely see any error dialog box with <code>stderr</code> contents.  So don’t start with the “something goes wrong with package managers all the time” bullshit.</p>

<p>So, let’s amend your last paragraph: let’s make PackageKit redirect <code>/dev/null</code> into the dpkg subprocess.  That should take care of things neatly, and screw all braindead packages out there.  What’s more, if the package somehow refuses to continue installing, let’s send dpkg a SIGKILL after a while, then prompt the user to change to a non-braindead distribution.  So PackageKit doesn’t support your favorite brain damaged behavior?  Sucks to be you.</p>

<p>Jeez, how much more of this obsolescent crap and stupid policy do we have to swallow, just because it’s the policy of the most widely used distro?  I thought open source and free software were about meritocracy, not the tyranny of the majority.  And I wish that the portion of the brain of the developer that conceived this “installation is interruptible” brain damage would just necrotize thanks to an aneurysm.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/04/13/dpkg-is-braindead-jason-youre-wrong/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The latest PulseAudio on Ubuntu</title>
		<link>http://rudd-o.com/archives/2008/01/05/the-latest-pulseaudio-on-ubuntu/</link>
		<comments>http://rudd-o.com/archives/2008/01/05/the-latest-pulseaudio-on-ubuntu/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 16:56:40 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Software bacán]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/01/05/the-latest-pulseaudio-on-ubuntu/</guid>
		<description><![CDATA[If you want to install the latest and greatest PulseAudio (now on version 0.9.8) on Ubuntu — a worthwhile thing to do, because of the fixes in the latest version — here are some packages you can use.



These packages are built from the source code of the next release of Ubuntu, Hardy.  They work [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to install the latest and greatest <a href="http://pulseaudio.org/">PulseAudio</a> (now on version 0.9.8) on Ubuntu — a worthwhile thing to do, because of the fixes in the latest version — here are some packages you can use.</p>

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

<p>These packages are built from the source code of the next release of Ubuntu, Hardy.  They work flawlessly on my home machines (yes, plural).  I built these packages myself for my usage:</p>

<ul>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/libpulse-browse0_0.9.8-1ubuntu3_i386.deb">libpulse-browse0_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/libpulse-mainloop-glib0_0.9.8-1ubuntu3_i386.deb">libpulse-mainloop-glib0_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/libpulse0_0.9.8-1ubuntu3_i386.deb">libpulse0_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/libpulsecore5_0.9.8-1ubuntu3_i386.deb">libpulsecore5_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-esound-compat_0.9.8-1ubuntu3_i386.deb">pulseaudio-esound-compat_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-module-gconf_0.9.8-1ubuntu3_i386.deb">pulseaudio-module-gconf_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-module-hal_0.9.8-1ubuntu3_i386.deb">pulseaudio-module-hal_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-module-lirc_0.9.8-1ubuntu3_i386.deb">pulseaudio-module-lirc_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-module-x11_0.9.8-1ubuntu3_i386.deb">pulseaudio-module-x11_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-module-zeroconf_0.9.8-1ubuntu3_i386.deb">pulseaudio-module-zeroconf_0.9.8-1ubuntu3_i386.deb</a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio-utils_0.9.8-1ubuntu3_i386.deb ">pulseaudio-utils_0.9.8-1ubuntu3_i386.deb </a></li>
<li><a href="http://rudd-o.com/wp-content/uploads/pulseaudio-0.9.8/pulseaudio_0.9.8-1ubuntu3_i386.deb">pulseaudio_0.9.8-1ubuntu3_i386.deb</a></li>
</ul>

<p>Download them all in a folder, then just open a terminal window there and type:</p>

<p><pre>sudo dpkg -i *deb</pre></p>

<p>That should upgrade you to the latest PulseAudio.  I was gonna write a tutorial, but then you would have had to download hundreds of megabytes of development packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/01/05/the-latest-pulseaudio-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hola a Planeta Ubuntu.ec</title>
		<link>http://rudd-o.com/archives/2008/01/05/hola-a-planeta-ubuntuec/</link>
		<comments>http://rudd-o.com/archives/2008/01/05/hola-a-planeta-ubuntuec/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 16:46:48 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Mi weblog]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[Yo]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/01/05/hola-a-planeta-ubuntuec/</guid>
		<description><![CDATA[Muy aparte de que estoy muy contento por el crecimiento de Ubuntu en nuestra comunidad, también estoy orgulloso de aparecer en planeta.Ubuntu.ec.  Hola con todos aquí!  Mi nombre es Manuel Amador, y escribo sobre tecnología — particularmente, sobre Linux.  Espero mis artículos los entretengan — visítenme y subscríbanse!
]]></description>
			<content:encoded><![CDATA[<p>Muy aparte de que estoy muy contento por el crecimiento de Ubuntu en nuestra comunidad, también estoy orgulloso de aparecer en <a href="http://planeta.ubuntu.ec/">planeta.Ubuntu.ec</a>.  Hola con todos aquí!  Mi nombre es Manuel Amador, y escribo sobre tecnología — particularmente, sobre Linux.  Espero mis artículos los entretengan — <a href="http://rudd-o.com/">visítenme</a> y subscríbanse!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/01/05/hola-a-planeta-ubuntuec/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A short rant on Ubuntu and dpkg: fuck you, dpkg</title>
		<link>http://rudd-o.com/archives/2008/01/04/a-short-rant-on-ubuntu-and-dpkg-fuck-you-dpkg/</link>
		<comments>http://rudd-o.com/archives/2008/01/04/a-short-rant-on-ubuntu-and-dpkg-fuck-you-dpkg/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 23:04:10 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Fedora]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[RPM]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/01/04/a-short-rant-on-ubuntu-and-dpkg-fuck-you-dpkg/</guid>
		<description><![CDATA[A long long time ago, in a gal… in an older computer, I had Fedora.  RPM — the packaging system in Fedora — was amazing in several aspects.  And the aspect that continually amazed me was the transactionality of software installs: a set of packages either gets installed, or it doesn’t.  No [...]]]></description>
			<content:encoded><![CDATA[<p>A long long time ago, in a gal… in an older computer, I had Fedora.  RPM — the packaging system in Fedora — was amazing in several aspects.  And the aspect that continually amazed me was the transactionality of software installs: a set of packages either gets installed, or it doesn’t.  No halfway installs, no broken shit.  Ever.</p>

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

<p>Fast-forward to my contemporary Kubuntu system. I just installed (using <code>dpkg -i</code>) a series of packages, and dpkg happily unpacked them all on my filesystem, only to nonchalantly tell me — when the files were already replaced on my (now very broken) computer — that it could not configure these packages, because the version of my C library is too old.</p>

<p><strong>With the new files are already on my system!  A tad too late to blow up on my face, isn’t it?</strong>  Now I have a badly broken system, and I can’t back out without resorting to manually downloading and installing old packages.</p>

<p>Question to the dpkg developers: <em>If the version of my C library is too fucking old — and dpkg knows this fact — why the fuck does dpkg proceed with file installation, only to barf in the middle of the installation process, leaving me with a broken computer?</em>  <strong>If the dependencies don’t fucking fit, don’t fucking let me install the packages in the first place!</strong></p>

<p>It’s not like transactional package installation is rocket science to get right, is it?  Otherwise, how did the RPM guys figure this out so well?</p>

<p>In b4 “dpkg is not like RPM” comments:</p>

<ol>
<li>Software installation transactionality is an elementary requirement of contemporary systems, so get your damn act together and make dpkg like RPM with regards to this issue.</li>
<li>Even better: ask yourselves the following question: in what universe is this dpkg behavior (namely, enabling users to badly break their systems) a good thing?</li>
</ol>

<p>And, please, let me rant some more, this time on the topic of package dependencies.  Why does a simple 100 KB program from Hardy require me to upgrade my <em>system C library</em> (hence, my entire operating system) to Hardy?  I thought glibc hadn’t changed in years!  I hardly doubt that 100 KB program would have any trouble running if I unpacked the binary directly!  So why does the package builder automatically require the latest version of the library — forcing me to download gigabytes of packages — when an old one would work just as well?</p>

<p>I’m a sysadmin, for fuck’s sake, I want my computer to be easily manageable, not harder to manage.  What are you waiting for?</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/01/04/a-short-rant-on-ubuntu-and-dpkg-fuck-you-dpkg/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Upgrade from Ubuntu Feisty to Gutsy: the one-liner version</title>
		<link>http://rudd-o.com/archives/2007/11/02/upgrade-from-ubuntu-feisty-to-gutsy-the-one-liner-version/</link>
		<comments>http://rudd-o.com/archives/2007/11/02/upgrade-from-ubuntu-feisty-to-gutsy-the-one-liner-version/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 13:42:35 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/11/02/upgrade-from-ubuntu-feisty-to-gutsy-the-one-liner-version/</guid>
		<description><![CDATA[Here’s the one-liner version of the Feisty (7.04) to Gutsy (7.10) upgrade (in case the distribution upgrade tool fails — it failed in my computer=.  Copy and paste this on an open console window, and you’re very probably set:



sudo sed -i 's/feisty/gutsy/g' /etc/apt/sources.list &amp;&amp; sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade

If at some point [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s the one-liner version of the Feisty (7.04) to Gutsy (7.10) upgrade (in case the distribution upgrade tool fails — it failed in my computer=.  Copy and paste this on an open console window, and you’re very probably set:</p>

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

<p><pre>sudo sed -i 's/feisty/gutsy/g' /etc/apt/sources.list &amp;&amp; sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade</pre></p>

<p>If at some point any of those processes fail, you will be returned back to the console.  <code>dist-upgrade</code> will require your confirmation, so don’t just take off before the confirmation question.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/11/02/upgrade-from-ubuntu-feisty-to-gutsy-the-one-liner-version/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to automate torrent downloads using TorrentFlux-b4rt, cron and rsync</title>
		<link>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/</link>
		<comments>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 12:40:52 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Server management]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/</guid>
		<description><![CDATA[TorrentFlux-b4rt is an awesome masterpiece of engineering.  You install it on your Web server, and then you can start downloading BitTorrent torrents right away.  The catch is that those torrents are saved in your Web server until you actually download them to your PC.  And having to schedule downloads separately is a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tf-b4rt.berlios.de/">TorrentFlux-b4rt</a> is an awesome masterpiece of engineering.  You install it on your Web server, and then you can start downloading BitTorrent torrents right away.  The catch is that those torrents are saved in your Web server until you actually download them to your PC.  And having to schedule downloads separately is a pain.  Well, no more.</p>

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

<h2>Awesome awesomeness: start your downloads minutes after TorrentFlux finishes them</h2>

<p>I&#8217;ve created a very, very complicated and interwoven (translation: awesome and straightforward) script that you may use and modify on your home computer.  It works like this:</p>

<ul>
    <li>Using SSH, it queries your TorrentFlux server&#8217;s transfer list, asking which torrents are completely downloaded.</li>
    <li>For each of the completed torrents, it grabs the file name of the downloaded file.</li>
    <li>Then, it uses rsync to incrementally transfer the downloaded file to your PC.</li>
    <li>Again using rsync, it removes the file from your TorrentFlux server, freeing disk space.</li>
</ul>

<h3>What you need to do before using the script</h3>

<p>For you to use it, you will need to do the following:</p>

<ul>
    <li>Enable SSH access to your (soon-to-be) TorrentFlux server.</li>
    <li>Set up public key (passwordless) authentication so that your home computer&#8217;s user account can freely log in to your server without asking for a password.</li>
    <li>Install TorrentFlux-b4rt and set it up so that your SSH user has read/write access to the torrents and downloads folders/files.  Umask/permissions, you know the drill.</li>
    <li>Enable <code>fluxcli</code> usage on your TorrentFlux setup.</li>
    <li>Install <code>rsync</code> on both your server and your home computer.</li>
    <li>Install the BitTorrent package that contains the program named <code>torrentinfo-console</code> on your server.</li>
    <li>Create a destination directory on your home computer.</li>
    <li>Install a mail program such as <code>mailx</code> on your home computer.</li>
    <li>Install <code>cron</code> on your home computer.</li>
    <li>Configure the script altering the variables at the top.</li>
</ul>

<p>Yeah, it&#8217;s a lot of work.  Go bitch somewhere else, we&#8217;re here for the fun.</p>

<h3>Installing the script</h3>

<p>Put the script somewhere in your <code>PATH</code>.  Make it executable.  Set up a cron job for the purpose:
<pre># m h  dom mon dow   command
0,10,20,30,40,50 * * * * /home/rudd-o/bin/torrentleecher -q</pre>
Make sure the cron job line ends with a line ending (carriage return) &#8212; otherwise it doesn&#8217;t run.</p>

<h3>The script itself</h3>

<p>It&#8217;s a stunning, hackish example of subprocessing, SSH remoting, pipeline integration, text processing, POSIX daemonizing and file locking, and samizdat logging.  It gets almost all of them wrong, and yet it manages to stay standing.  If you&#8217;re interested in reading <a href="post:how-to-divide-and-conquer-a-problem-the-unix-way">a complete account of how this script grew out of nothing, well, click here</a>.</p>

<p>It&#8217;s a miracle:
<pre>#!/usr/bin/env python</pre></p>

<p>from subprocess import Popen,PIPE,STDOUT,call
import fcntl
import re
import os
import sys
import signal</p>

<h1>FIXME: this script doesn't deal with multifile torrents</h1>

<h1>vars!</h1>

<h1>wherever they are used, it's MOST LIKELY they need quoting</h1>

<h1>FIXME whatever calls SSH remoting needs to protect/quote the commands for spaces or else this might turn out to be a bitch</h1>

<p>torrentflux_base_dir = "/var/www/html/torrents/torrents"
torrentflux_download_dir = "/var/www/html/torrents/torrents/incoming"
torrentflux_server = "yourserver.com"
torrentleecher_destdir = "/home/rudd-o/download/"
fluxcli = "fluxcli"
torrentinfo = "torrentinfo-console"
email_address = "rudd-o@awesome.com"</p>

<p>def getstdout(cmdline):
        p = Popen(cmdline,stdout=PIPE)
        output = p.communicate()[0]
        if p.returncode != 0: raise Exception, "Command %s return code %s"%(cmdline,p.returncode)
        return output
def getstdoutstderr(cmdline,inp=None): # return stoud and stderr in a single string object
        p = Popen(cmdline,stdin=PIPE,stdout=PIPE,stderr=STDOUT)
        output = p.communicate(inp)[0]
        if p.returncode != 0: raise Exception, "Command %s return code %s"%(cmdline,p.returncode)
        return output
def passthru(cmdline): return call(cmdline) # return status code, pass the outputs thru
def getssh(cmd): return getstdout(["ssh","-o","BatchMode yes","-o","ForwardX11 no",torrentflux_server] + [cmd]) # return stdout of ssh.  doesn't return stderr
def sshpassthru(cmd): return call(["ssh","-o","BatchMode yes","-o","ForwardX11 no",torrentflux_server] + [cmd]) # return status code from a command executed using ssh
def mail(subject,text): return getstdoutstderr(["mail","-s",subject,email_address],text)</p>

<p>def get_finished_torrents():
        stdout = getssh("%s transfers"%fluxcli)
        stdout = stdout.splitlines()[2:-5]
        stdout = [ re.match("^- (.+) - [0123456789.]+ MB - (Seeding|Done)",line) for line in stdout ]
        return [ match.group(1) for match in stdout if match ]</p>

<p>def get_file_name(torrentname):
        cmd = "LANG=C %s %s/.transfers/%s"%(torrentinfo,torrentflux_base_dir,torrentname)
        stdout = getssh(cmd).splitlines()
        filenames = [ l[22:] for l in stdout if l.startswith("file name...........: ") ]
        assert len(filenames) is 1
        return filenames[0]</p>

<p>def dorsync(filename):
        cmdline = ["rsync","-avzP","--remove-source-files",
                "%s:%s/%s"%(torrentflux_server,torrentflux_download_dir,filename),"."]
        return passthru(cmdline)</p>

<p>def exists_on_server(filename):
        cmd = "test -f %s/%s"%(torrentflux_download_dir,filename)
        returncode = sshpassthru(cmd)
        if returncode == 1: return False
        elif returncode == 0: return True
        else: assert False # Not reached</p>

<p>def get_files_to_download():
        torrents = get_finished_torrents()
        for t in torrents:
                yield (t,get_file_name(t))</p>

<p>def lock():
        global f
        try:
                fcntl.lockf(f.fileno(),fcntl.LOCK_UN)
                f.close()
        except: pass
        try:
                f=open(os.path.join(torrentleecher_destdir,".torrentleecher.lock"), 'w')
                fcntl.lockf(f.fileno(),fcntl.LOCK_EX | fcntl.LOCK_NB)
        except IOError,e:
                if e.errno == 11: return False
                else: raise
        return True</p>

<p>def daemonize():
        """Detach a process from the controlling terminal and run it in the
        background as a daemon.
        """
        try: pid = os.fork()
        except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno)</p>

<pre><code>    if (pid == 0):           # The first child.
            os.setsid()
            try: pid = os.fork()              # Fork a second child.
            except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno)

            if (pid == 0):   # The second child.
                    os.chdir("/")
            else:
                    # exit() or _exit()?  See below.
                    os._exit(0)      # Exit parent (the first child) of the second child.
    else: os._exit(0)                # Exit parent of the first child.

    import resource                           # Resource usage information.
    maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
    if (maxfd == resource.RLIM_INFINITY):
            maxfd = 1024

    # Iterate through and close all file descriptors.
    for f in [ sys.stderr, sys.stdout, sys.stdin ]:
            try: f.flush()
            except: pass

    for fd in range(0, 2):
            try: os.close(fd)
            except OSError: pass

    for f in [ sys.stderr, sys.stdout, sys.stdin ]:
            try: f.close()
            except: pass

    sys.stdin = file("/dev/null", "r")
    sys.stdout = file(os.path.join(torrentleecher_destdir,".torrentleecher.log"), "a",0)
    sys.stderr = file(os.path.join(torrentleecher_destdir,".torrentleecher.log"), "a",0)
    os.dup2(1, 2)

    return(0)
</code></pre>

<p>sighandled = False
def sighandler(signum,frame):
        global sighandled
        if not sighandled:
                print &#8220;Received signal %s&#8221;%signum
                # temporarily immunize from signals
                oldhandler = signal.signal(signum,signal.SIG_IGN)
                os.killpg(0,signum)
                signal.signal(signum,oldhandler)
                sighandled = True</p>

<p>def report_file_failed(filename):
        try: os.symlink(os.path.join(torrentleecher_destdir,&#8221;.torrentleecher.log&#8221;),&#8221;%s.log&#8221;%filename)
        except OSError,e:
                if e.errno != 17: raise #file exists should be ignored of course
        sys.stdout.flush()
        sys.stderr.flush()
        errortext = &#8220;&#8221;"Please take a look at the log files in
%s&#8221;"&#8221;%torrentleecher_destdir
        mail(&#8221;Leecher: error &#8212; %s&#8221;%filename,errortext)</p>

<p>def report_file_done(filename):
        try: file(&#8221;%s is done&#8221;%filename,&#8221;w&#8221;).write(&#8221;Done&#8221;)
        except OSError,e:
                if e.errno != 17: raise #file exists should be ignored of course
        mail(&#8221;Leecher: done &#8212; %s&#8221;%filename,&#8221;The file is at %s&#8221;%torrentleecher_destdir)</p>

<p>def main():
        if not ( len(sys.argv) &gt; 1 and &#8220;-D&#8221; in sys.argv[1:] ): daemonize()
        os.chdir(torrentleecher_destdir)
        if not lock(): # we need to lock the file after the daemonization
                if not ( len(sys.argv) &gt; 1 and &#8220;-q&#8221; in sys.argv[1:] ):
                        print &#8220;Other process is downloading the file &#8212; add -q argument to command line to squelch this message&#8221;
                sys.exit(0)
        signal.signal(signal.SIGTERM,sighandler)
        signal.signal(signal.SIGINT,sighandler)</p>

<pre><code>    print "Starting download of finished torrents"

    try:

            for torrent,filename in get_files_to_download():
                    # no point in doing anything if the file was removed, right?
                    # so we continue if the file doesn't exist
                    if not exists_on_server(filename): continue
                    print "Downloading %s from torrent %s"%(filename,torrent)
                    retvalue = dorsync(filename)
                    if retvalue == 0:
                            report_file_done(filename)
                            print "Download of %s complete"%filename
                            # TODO: make use of fluxcli to kill the torrent out of TF
                    else:
                            if retvalue == 20:
                                    print "Download of %s stopped -- rsync process interrupted"%(filename)
                                    print "Finishing by user request"
                                    sys.exit(2)
                            elif retvalue &amp;lt; 0:
                                    report_file_failed(filename)
                                    print "Download of %s failed -- rsync process killed with signal %s"%(filename,-retvalue)
                                    print "Aborting"
                                    sys.exit(1)
                            else:
                                    report_file_failed(filename)
                                    print "Download of %s failed -- rsync process exited with return status %s"%(filename,retvalue)
                                    print "Aborting"
                                    sys.exit(1)

            print "Download of finished torrents complete"

    except Exception,e:
            report_file_failed("00 - General error")
            raise
</code></pre>

<p>if <strong>name</strong> == &#8220;<strong>main</strong>&#8220;: main()</p>

<p>If you want to learn the process of <a href="post:how-to-divide-and-conquer-a-problem-the-unix-way">how this script grew out of nothing, here&#8217;s the story</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The great Dell Linux scam</title>
		<link>http://rudd-o.com/archives/2007/07/11/dell-paying-lip-service-only-to-linux/</link>
		<comments>http://rudd-o.com/archives/2007/07/11/dell-paying-lip-service-only-to-linux/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 19:52:56 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Sucks!]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/07/11/dell-paying-lip-service-only-to-linux/</guid>
		<description><![CDATA[In theory, a Dell machine with Linux is $50 cheaper… but the free RAM/HDD upgrade (a $275 value) is only for Windows customers.  But wait, there’s more!



This is only the latest development in a story that’s been chock full with disappointment:

An anonymous reader writes “One week ago this community discussed the apparent price advantage [...]]]></description>
			<content:encoded><![CDATA[<p>In theory, a Dell machine with Linux is $50 cheaper… but the free RAM/HDD upgrade (a $275 value) is only for Windows customers.  But wait, there’s more!</p>

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

<p><a href="http://rss.slashdot.org/~r/Slashdot/slashdot/~3/132619247/article.pl">This is only the latest development</a> in a story that’s been chock full with disappointment:</p>

<blockquote>An anonymous reader writes “One week ago this community discussed the apparent price advantage of Ubuntu Dell over Vista. The article linked to a Dell IdeaStorm page with the status: ‘Implemented.’ Today the status has changed on that page to ‘Reneged: Ubuntu Dell is $225 More Than Windows Dell.’ The full price of a Ubuntu Inspiron 1420N is indeed $50 cheaper than the identical hardware configuration with Vista — except that a $275 free upgrade to 2GB memory and a 160-GB hard drive is available for Windows only.”</blockquote>

<p>OK, let’s see the entire story in perspective (almost six months of events in six bullet points, so excuse me if the list’s a bit superficial):</p>

<ol>
<li>Dell gets pummeled in its own very IdeaStorm: “we want Linux”, the customers say.</li>
<li>Dell balks at proposal.  Users angry.  Digg uproar.<br />Dell recants.  Users happy.</li>
<li>Dell “starts shipping” the machines, except there are no machines to buy.  Users furious.  Digg uproar.<br />Dell corrects the stocking issue.  Users happy.</li>
<li>Select Dell warranty offerings not available for Ubuntu-based machines.  Users angry.  Digg uproar.<br />Dell warranty offerings equalized.  Users not so happy this time, but, meh.</li>
<li>Linux Dell machines more expensive than Windows machines.  Users angry.<br />Dell corrects pricing mistakes, now Linux machines are $50 less.  Users happy again.</li>
<li>A free hard disk / RAM upgrade (with a market value of $275) is now not available with Linux machines.  Effectively, the Linux machines are more expensive than the Windows machines again.</li>
</ol>

<p>Dell: do you really think we’re idiots?  We can clearly see that a hard disk, a RAM memory module, and a hardware warranty plan have nothing to do with Windows — it’s <em>obvious</em> you’re doing this to steer people away from buying Linux machines.</p>

<p>Yes, we know Microsoft is inches away from dumping you as a partner.  We’d rather you admit it to us than have you continually find new ways to cheat on us customers.</p>

<p>Come on, you morons, haven’t you figured out already that every single move you make is under the scrutiny of millions of Linux users with above-average intelligence?</p>

<p>This is the perfect example of how a company completely loses customer loyalty.</p>

<p><em>Update:</em> since this topic has generated quite the stir lately (even though it’s old) you should know that whenever I’ve had people (mostly close ones) ask me to recommend a laptop, I’ve always ended up recommending Dell ones; they do make good hardware.  Not only that, but (to all the sufferers out there), I actually have a Dell PowerEdge 1521 as my workstation, so shut up already with the insults already.</p>

<p>The catch?   Right after the purchase, I personally install Kubuntu Linux (unlike Windows, Ubuntu’s the gift that keeps on booting) on them, and hand an original Kubuntu LiveCD to the laptop’s owner;  I’m betting many people do the same, so if Dell sees low Linux sales figures, now you know why.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/07/11/dell-paying-lip-service-only-to-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE and automounting USB drives in KUbuntu Linux</title>
		<link>http://rudd-o.com/archives/2007/06/10/kde-and-automounting-usb-drives-in-kubuntu-linux/</link>
		<comments>http://rudd-o.com/archives/2007/06/10/kde-and-automounting-usb-drives-in-kubuntu-linux/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 00:04:25 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/06/10/kde-and-automounting-usb-drives-in-kubuntu-linux/</guid>
		<description><![CDATA[Oh, dear and holy Lazyweb, help!  My pen drive mounts automatically — I don’t want that.  I temporarily disabled the media manager service in the KDE Control Center service manager; but  I want to keep it on, with automounting off (in GNOME this is the default).  How do I do that?
]]></description>
			<content:encoded><![CDATA[<p>Oh, dear and holy Lazyweb, help!  My pen drive mounts automatically — I don’t want that.  I temporarily disabled the media manager service in the KDE Control Center service manager; but  I want to keep it on, with automounting off (in GNOME this is the default).  How do I do that?</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/06/10/kde-and-automounting-usb-drives-in-kubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dell laptops with Ubuntu are shipping&#8230;</title>
		<link>http://rudd-o.com/archives/2007/06/06/dell-laptops-with-ubuntu-are-shipping/</link>
		<comments>http://rudd-o.com/archives/2007/06/06/dell-laptops-with-ubuntu-are-shipping/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 06:05:34 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/06/06/dell-laptops-with-ubuntu-are-shipping/</guid>
		<description><![CDATA[…and you can see pictures of them here!  Fantastic!
]]></description>
			<content:encoded><![CDATA[<p>…and you can <a href="http://www.bryceharrington.org/Photos/DellUbuntu/">see pictures of them here</a>!  Fantastic!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/06/06/dell-laptops-with-ubuntu-are-shipping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu on Dell</title>
		<link>http://rudd-o.com/archives/2007/05/28/ubuntu-on-dell/</link>
		<comments>http://rudd-o.com/archives/2007/05/28/ubuntu-on-dell/#comments</comments>
		<pubDate>Mon, 28 May 2007 23:23:02 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/28/ubuntu-on-dell/</guid>
		<description><![CDATA[In case you missed it, Dell is selling computers with Ubuntu preloaded.  Fantastic news!
]]></description>
			<content:encoded><![CDATA[<p>In case you missed it, Dell is selling <a href="http://www.dell.com/open">computers with Ubuntu preloaded</a>.  Fantastic news!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/28/ubuntu-on-dell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bug #1</title>
		<link>http://rudd-o.com/archives/2007/05/15/bug-1/</link>
		<comments>http://rudd-o.com/archives/2007/05/15/bug-1/#comments</comments>
		<pubDate>Tue, 15 May 2007 12:29:55 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Haha!]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/15/bug-1/</guid>
		<description><![CDATA[Need to start the day with a smile?  See the first bugs in Ubuntu’s and OLPC’s bug trackers.
]]></description>
			<content:encoded><![CDATA[<p>Need to start the day with a smile?  See the <a href="https://bugs.launchpad.net/ubuntu/+bug/1">first bugs in Ubuntu</a>’s and <a href="http://dev.laptop.org/ticket/1">OLPC’s bug trackers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/15/bug-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MoLa: Should I use open source apps before diving into Linux?</title>
		<link>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/</link>
		<comments>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/#comments</comments>
		<pubDate>Sun, 13 May 2007 03:18:14 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[The month of Linux answers]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/</guid>
		<description><![CDATA[Better late than never!  The first question I’m answering in the Month of Linux answers series is: Would it be best for people considering moving to linux to start using open source software on their Windows computers first?



My answer: yes, categorically.

The open source advantage: why you should be using open source applications

Well, there are [...]]]></description>
			<content:encoded><![CDATA[<p>Better late than never!  The first question I’m answering in <a href="http://rudd-o.com/archives/category/the-month-of-linux-answers/">the Month of Linux answers series</a> is: <em>Would it be best for people considering moving to linux to start using open source software on their Windows computers first?</em></p>

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

<p>My answer: <strong>yes, categorically</strong>.</p>

<h2>The open source advantage: why you should be using open source applications</h2>

<p>Well, there are at least two reasons:</p>

<ol>
<li><em>Open source applications tend to be higher-quality</em>.  I don’t want to generalize, because I’ve test-driven tons of immature open source applications, but a great portion of them are very high-quality, and tend to improve with time, since everyone can “pitch in” and help develop applications further.</li>
<li><em>They’re (usually) free</em>.  Why pay money to “the man”, when you can save money and do better?</li>
<li><em>They respect standards better</em>.  You can easily move to Linux or other operating systems, because they respect standards and save their information in easy-to-use, easy-to-backup, easy-to-move file formats.</li>
</ol>

<h2>So, which applications?</h2>

<p>Open source applications for Microsoft Windows number in the thousands.  The most widely used have gotten great amounts of press coverage, are mature, stable and well-known:</p>

<ul>
<li><a href="http://www.openoffice.org/">OpenOffice.org</a>: this Microsoft Office killer has nearly everything to be the next king in office-suite land.</li>
<li><a href="http://www.getfirefox.com/">Mozilla Firefox</a>: unless you’ve lived under a rock for the past 5 years, it’s hard to believe you haven’t heard about it.  Plainly said, it’s the best Web browser, ever.</li>
<li><a href="http://www.videolan.org/vlc/">The VideoLAN client</a>: it’s a straightforward, no-frills, fast media player.  The amazing thing about VLC is that it supports lots and lots of video and audio formats — you can even play Flash videos with it(for example, downloaded from YouTube with the <a href="http://javimoya.com/blog/youtube_en.php">VideoDownloader Firefox plugin</a>).</li>
<li><a href="http://azureus.sourceforge.net/">Azureus</a>: downloading torrents in your computer?  Azureus is the best there is for Windows.</li>
</ul>

<p>Chances are, you’re already using open source applications in your computer.  Note I said <em>applications</em> — some portions of Microsoft Windows are direct descendants of other open source operating systems (such as FreeBSD).  But the short list doesn’t stop there.</p>

<h2>Where do I get them?</h2>

<p>Three distinct projects aim to bring lots of originally-Linux open source applications to Windows:</p>

<ol>
<li><a href="http://www.opensourcewindows.org/">Open Source Windows</a>.  Billed as <em>This is the best Windows software that we know of.
No adware, no spyware, just good software.</em>, it’s absolutely on the spot.</li>
<li><a href="http://www.theopencd.org/">TheOpenCD</a>.  Instead of having to download each application, you can simply download the CD and start test driving them.  Obviously, you can copy the CD as many times as you like, and give it to acquaintances, friends and family.</li>
<li><a href="http://portableapps.com/">PortableApps</a>.  If you have an USB thumb drive, you’ll find immense value in this project; if you’re on the road, you no longer need to install and configure each application on the computer you’re about to use — just install them once in your thumb druve, then plug it on any Windows computer.</li>
</ol>

<h3>And the march to Windows continues!</h3>

<p>KDE on Windows!  Replace your Windows Explorer with a much more powerful desktop environment!</p>

<p>Actually, what gets me even more excited is the fact that Amarok, the best music player/manager ever to see the light, <a href="http://amarok.kde.org/blog/archives/374-Amarok2-builds-on-Windows.html">is going to be available on Windows as well</a>.  Amarok cleanly blows iTunes, Windows Media Player and Winamp out of the water.</p>

<h2>I’ve open sourced my applications… what next?</h2>

<p>Run them for a couple of days, maybe two weeks, and avoid running the applications they replaced (Internet Explorer, Outlook Express, and so forth).</p>

<p>Get comfortable with them.  Most likely, you’ll be using them in Linux too.  Take this opportunity to learn, effortlessly, more about computing.  No one ever complained when they saw a résumé and noticed extra computing experience, right?</p>

<p>Finally, install Linux.  <a href="http://rudd-o.com/archives/2007/05/12/i-changed-to-kubuntu-feisty-fawn/" title="I changed to KUbuntu Feisty Fawn">I recommend KUbuntu</a>, because it’s more similar to Windows than regular Ubuntu.  <a href="http://www.kubuntu.org/download.php">Download the live CD</a>, burn it to a CD, then boot from the CD.  Run it for a while, see if you like it, install it — once you’ve installed it to your computer, you can use Adept (included in KUbuntu) to install your beloved open source applications.</p>

<p>Did I mention installing applications on KUbuntu is much easier than on Windows?</p>

<h2>More Linux questions?</h2>

<p><em>Have a Linux question?  Why don’t you drop by <a href="http://rudd-o.com/archives/2007/04/25/introducing-the-month-of-linux-answers/#respond" title="Private: Introducing: The Month of Linux Answers">our Month of Linux Answers</a> and leave your question as a comment?  I’ll get to it right away :-).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
