<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet href="/s9y/templates/default/atom.css" type="text/css" ?>
<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    
    <link href="http://www.nerdbynature.de/s9y/feeds/atom.xml" rel="self" title="s9y testdrive" type="application/atom+xml" />
    <link href="http://nerdbynature.de/s9y/"                        rel="alternate"    title="s9y testdrive" type="text/html" />
    <link href="http://nerdbynature.de/s9y/rss.php?version=2.0"     rel="alternate"    title="s9y testdrive" type="application/rss+xml" />
    <title type="html">s9y testdrive</title>
    <subtitle type="html">(who took the 'we' out of weblog?)</subtitle>
    
    <id>http://nerdbynature.de/s9y/</id>
    <updated>2012-02-03T21:16:20Z</updated>
    <generator uri="http://www.s9y.org/" version="1.7-alpha1">Serendipity 1.7-alpha1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://nerdbynature.de/s9y/?289" rel="alternate" title="openSUSE dependency madness" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-02-03T20:38:05Z</published>
        <updated>2012-02-03T21:16:20Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=289</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=289</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?289</id>
        <title type="html">openSUSE dependency madness</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                No, I'm not bored - just curious what the <a href="http://distrowatch.com/" title="distrowatch.com">other camps</a> are up to. This time: <a href="http://software.opensuse.org/121" title="openSUSE 12.1">openSUSE 12.1</a>. Of course, after a minimal installation a few things are missing. <a href="http://software.opensuse.org/search?q="man"&baseproject=openSUSE%3A12.1" title="openSUSE Package Search">Manpages</a>, for example. But what the hell is this:

<pre>
   $ zypper install man
   The following NEW packages are going to be installed:
     cups-libs fontconfig ghostscript-fonts-other ghostscript-fonts-std 
     ghostscript-library groff groff-devx lcms libfreetype6 libgimpprint
     libjpeg62 liblcms1 libpng14-14 libtiff3 man 

   The following recommended packages were automatically selected:
     ghostscript-fonts-other ghostscript-library 

   15 new packages to install.
   Overall download size: 14.9 MiB. After the operation, additional 67.8 MiB will be used.
</pre>

15 new packages, almost 70 MB for a bunch of text files. And why would I need <code>cups-libs</code> or <code>libjpeg62</code>? Luckily, <code>zypper</code> too can be tought not to install <i>recommended</i> packages:

<pre>
   $ zypper install <font color="blue">--no-recommends</font> man
   The following NEW packages are going to be installed:
     groff man 

   2 new packages to install.
   Overall download size: 2.4 MiB. After the operation, additional 10.0 MiB will be used.
</pre>

Much better :-)

There's an <code>installRecommends</code> switch in <code>/etc/zypp/zypper.conf</code>, but this was not honored by <code>zypper 1.6.18</code> :-\ <br/><br/>

Sadly, this does not help with all packages:

<pre>
   $ zypper install --no-recommends nginx
   The following NEW packages are going to be installed:
     fontconfig gd libfreetype6 libGeoIP1 libjpeg62 libpng14-14 libxslt1 nginx-1.0 
     xorg-x11-libICE xorg-x11-libSM xorg-x11-libX11 xorg-x11-libXau 
     xorg-x11-libxcb xorg-x11-libXext xorg-x11-libXpm xorg-x11-libXt 

   16 new packages to install.
   Overall download size: 3.0 MiB. After the operation, additional 11.8 MiB will be used.
</pre>

<a href="http://nerdbynature.de/s9y/uploads/orly.jpg">Really?</a> openSUSE has <a href="https://bugzilla.novell.com/show_bug.cgi?id=684588" title="Bug 684588 - nginx package dependencies includes apache and xorg libs">bundled</a> a <i>webserver</i> with <a href="http://www.x.org/">Xorg</a> libraries? Sigh... I can already smell the b0rkage when the next update is due and <a href="http://en.opensuse.org/Portal:Zypper">zypper</a> is trying to untangle all the dependencies for every friggin' package ever installed because of insane dependencies like this. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?287" rel="alternate" title="XCode: You have updates available for other accounts" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-01-22T19:47:26Z</published>
        <updated>2012-01-22T19:47:26Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=287</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=287</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?287</id>
        <title type="html">XCode: You have updates available for other accounts</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Logged in to my <a href="https://www.apple.com/mac/app-store/">Mac App Store</a> account today, the <i>"Purchases"</i> tab greeted me with an update for <a href="https://developer.apple.com/xcode/" title="Xcode">Xcode</a>. However, <i>clicking</i> on it only resulted in the following:

<pre>
  You have updates available for other accounts.
  Sign into the account you used to purchase it.
</pre>

Huh? I don't have any other accounts. One Apple account is more than enough :-\ <br/>

So, what's the deal here? Luckily, <a href="http://mettadore.com/analysis/xcode-you-have-updates-available-for-other-accounts/" title="XCode: You have updates available for other accounts">others</a> had similar <a href="http://www.ngpixel.com/2011/06/25/mac-app-store-you-have-updates-available-for-the-other-accounts-bug/" title="Mac App Store – You have updates available for other accounts bug">issues</a> and a <a href="https://discussions.apple.com/thread/2795748" title="Xcode 4.0.1 in App Store; how do I update from Xcode 4.0?">solution</a> as well. Either one should do:

<ul>
<li>Delete or move <code>/Applications/Install Xcode.app</code> resp. <code>Install XCode.dmg</code>, usually found in <code>/Applications</code> as well. Then try again to update <code>Xcode</code>.</li>
<li>Refresh your <i>Spotlight</i> index. I.e. add/remove your system disk to the index, then try again to update.</li>
</li> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?286" rel="alternate" title="MacOS X automount" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-01-22T02:44:43Z</published>
        <updated>2012-01-22T19:12:12Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=286</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=286</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?286</id>
        <title type="html">MacOS X automount</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Sure, <code>Disk Utility.app</code> can be used to <a href="http://hints.macworld.com/article.php?story=20090830073912179" title="10.6: Add NFS Mounts using Disk Utility">set up NFS mounts</a>. But as long as <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/automount.8.html" title="automount(8)">automount(8)</a> is supported in MacOS X, let's use this for a more general approach:<br/><br/>

Create the mount points first, both for SMB and NFS:

<pre>
  $ mkdir /mnt/{nfs,smb}/{a,b}
</pre>

Then we create automount ''maps'' for each protocol:

<pre>
 $ cat /etc/auto_nfs 
 /mnt/nfs/a -fstype=nfs,rw,resvport 10.0.0.10:/export/foo
 /mnt/nfs/b -fstype=nfs,ro,resvport 10.0.0.10:/export/bar
 
 $ cat /etc/auto_smb 
 /mnt/smb/a -fstype=smbfs,rw ://10.0.0.10/foo
 /mnt/smb/b -fstype=smbfs,ro ://10.0.0.10/bar
</pre>

With that in place, we have to include both files in <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/auto_master.5.html#//apple_ref/doc/man/5/auto_master" title="auto_master(5)">auto_master(5)</a>

<pre>
 $ grep -v ^# /etc/auto_master
 +auto_master            # Use directory service
 /-                      auto_smb
 /-                      auto_nfs
</pre>

Tell <tt>automountd(8)</tt> to flush any cached information:

<pre>
 $ automount -v -c
</pre>

Sometimes it's necessary to restart <tt>automountd</tt>:

<pre>
 $ launchctl stop  com.apple.automountd
 $ launchctl start com.apple.automountd
</pre>

Now the shares should be mounted automatically upon access. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?285" rel="alternate" title="January 18: Internet-Wide Protests Against the Blacklist Legislation" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-01-18T00:00:00Z</published>
        <updated>2012-01-19T20:38:10Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=285</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=285</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/4-Land-of-the-free" label="Land of the free" term="Land of the free" />
    
        <id>http://nerdbynature.de/s9y/?285</id>
        <title type="html">January 18: Internet-Wide Protests Against the Blacklist Legislation</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="https://blacklist.eff.org/"><img src="http://nerdbynature.de/s9y/uploads/blacklist-2b.png"></a>

<br/><br/>
<small>Whooha, auch der <a href="https://www.ccc.de/">CCC macht mit!</a></small>

<br/><br/>
Update: <a href="http://theoatmeal.com/">theoatmeal.com</a> had a good <a href="http://americancensorship.org/infographic.html">explanation</a> why <a href="http://gizmodo.com/5877000/what-is-sopa">SOPA/PIPA</a> is not a good idea:<br/><br/>

<center>
<a href="http://theoatmeal.com/sopa"><img src="http://nerdbynature.de/s9y/uploads/sopa.gif" title="theoatmeal.com/sopa" alt="theoatmeal.com/sopa"/></a>
</center> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?284" rel="alternate" title="Ignoring unknown extended header keyword `SCHILY.dev'" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-01-17T23:42:00Z</published>
        <updated>2012-01-17T23:42:00Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=284</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=284</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?284</id>
        <title type="html">Ignoring unknown extended header keyword `SCHILY.dev'</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                While extracting a tarball, <a href="http://www.gnu.org/s/tar/">GNU/tar</a> told me:

<pre>
Ignoring unknown extended header keyword `SCHILY.dev'
Ignoring unknown extended header keyword `SCHILY.ino'
Ignoring unknown extended header keyword `SCHILY.nlink'
</pre>

Hm, what does that remind me of? Ah, <a href="http://cdrecord.berlios.de/old/private/star.html">star</a>! Digging in the <a href="ftp://ftp.berlios.de/pub/star/">bits</a> still left on <a href="http://developer.berlios.de/forum/forum.php?forum_id=37533" title="BerliOS continues - non-profit association is founded">BerliOS</a>, there seems to be something what looks like a POSIX proposal:

<pre>
$ cat star/README.posix-2001
[...]
        Star supports the following fields in the extended header:
[...]
        Vendor unique:
        "SCHILY.devmajor" "SCHILY.devminor"     (create/extract)

        In -dump mode (a preparation for incremental dumps) star archives:

        "SCHILY.dev"            The field stat.st_dev   - the filesys indicator
        "SCHILY.ino"            The field stat.st_ino   - the file ID #
        "SCHILY.nlink"          The field stat.st_nlink - the hard link count
        "SCHILY.filetype"       The real file type      - this allows e.g.
                                                              socket/door
</pre>

Wow. Alas, these headers remain unrecognized in GNU/<code>tar</code>, hence the (benign) warnings. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?82" rel="alternate" title="unable to set superblock flags" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2009-03-11T21:28:49Z</published>
        <updated>2012-01-17T18:33:20Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=82</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=82</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?82</id>
        <title type="html">unable to set superblock flags</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                An <a href="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html">ext3</a> filesystem would not mount today :(<br/>
Running <code>e2fsck</code> (under MacOS 10.4/ppc) only gave:

<pre>
$ e2fsck -fv /dev/rdisk0s4
fsck.ext3: unable to set superblock flags on /dev/rdisk0s4
</pre>

Then I <a href="http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/" title="HOWTO: Repair a broken Ext4 Superblock in Ubuntu">remembered to try with a dfferent superblock</a>, and it worked perfectly: 

<pre>
$ mkfs.ext3 <font color="red">-n</font> /dev/disk0s4 
[...]
Superblock backups stored on blocks: 
        <font color="green">32768</font>, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
</pre>

Note: Don't forget the <font color="red">-n</font> option, otherwise <code>mkfs.ext3</code> will <i>really</i> format the partition!
<pre> 
$ e2fsck -b <font color="green">32768</font> -fv /dev/rdisk0s4 
[...]
$ mount_ext2 /dev/disk0s4 /Volumes/disk0s4/
</pre>
Now mounting succeeds again. Yeah, ext3 ;-)
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?122" rel="alternate" title="cc: seems to be a cross-compiler" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2009-10-06T16:12:13Z</published>
        <updated>2012-01-17T17:47:47Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=122</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=122</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?122</id>
        <title type="html">cc: seems to be a cross-compiler</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Since FreeBSD still ships with <a href="http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/">csh</a> as its default shell, I tried to compile <a href="http://www.research.att.com/~gsf/download/gen/ast-open.html#ksh93">ksh93</a> on <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.0-RC1/">FreeBSD 8.0-RC1</a> and this happened:

<pre>
# cd /usr/ports/shells/ksh93
# make install
[...]
===>  Building for ksh93-20090505
package: update /usr/ports/shells/ksh93/work/bin/execrate
package: cc: seems to be a cross-compiler
package: set HOSTTYPE to something other than the native freebsd8.amd64
*** Error code 1
</pre>

This seems to happen <a href="http://lists.freebsd.org/pipermail/freebsd-amd64/2007-July/010165.html">every now</a> and <a href="http://nerdbynature.de/s9y/index.php?/archives/86-cannot-run-C-compiled-programs.html">then</a>, but I had to go to <a href="http://bugs.gentoo.org/123297">another bugtracker</a> to find the solution: apparently, <code>"make install"</code> compiles a small test-program and tries to execute it in <code>/tmp</code>. However, <code>/tmp</code> is mounted <a href="http://www.freebsd.org/cgi/man.cgi?query=mount&sektion=8">noexec</a> and so the test-program fails to execute and in turn the build fails as well. The solution was to mount <code>/tmp</code> with the <code>exec</code> flag:

<pre>
$ grep /tmp /etc/fstab 
tmpfs   /tmp   tmpfs   rw,nosuid,<font color="red">exec</font>,mode=1777,size=134217728 0 0
</pre>

Unfortunately, FreeBSD's <a href="http://www.freebsd.org/cgi/man.cgi?query=tmpfs">tmpfs</a> won't allow a <i>remount</i> - we have to <i>umount</i> and the <i>mount</i> again:

<pre>
$ mount -u -o exec /tmp 
mount: tmpfs : Operation not supported

$ umount /tmp
$ mount -o exec /tmp
$ mount | grep /tmp
tmpfs on /tmp (tmpfs, local, nosuid)
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?283" rel="alternate" title="test -w" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2012-01-02T18:09:50Z</published>
        <updated>2012-01-02T18:40:08Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=283</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=283</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?283</id>
        <title type="html">test -w</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Learn something new every day: I'm trying to <a href="http://pubs.opengroup.org/onlinepubs/009604499/utilities/test.html">test</a> if a directory on a different filesystem is writable. Instead of <i>really</i> writing to it (e.g. by using <code>touch(1)</code>), I wanted to <i>test</i> with <code>-w</code>:

<pre>
$ ls -ld /mnt/usb/foo
drwx------ 13 root root 4096 Jan  1 15:38 /mnt/usb/foo

$ [ -w /mnt/usb/foo ]; echo $?
<font color="red">1</font>
</pre>

OK, <code>/mnt/usb/foo</code> is <i>not</i> writable, because <code>/mnt/usb</code> was mounted read-only at this point. But look what <a href="http://gondor.apana.org.au/~herbert/dash/">dash(1)</a> thinks of this:

<pre>
$ [ -w /mnt/usb/foo ]; echo $?
<font color="red">0</font>
</pre>

Huh? But the <a href="http://linux.die.net/man/1/dash">manpage</a> explains:

<pre>
-w file  True if file exists and is writable. True indicates only that the write flag is on.
         The file is not writable on a read-only file system even if this test indicates true.
</pre>

...whereas <a href="http://linux.die.net/man/1/bash">bash(1)</a> only states:

<pre>
-w file  True if file exists and is writable.
</pre>

<a href="http://www.zsh.org/">Zsh</a> and <a href="http://www.kornshell.com/doc/ksh93.html">ksh93</a> behave just as <code>bash</code> - that is returning <font color="red">1</font> when the file is not writable, even though its <i>permissions</i> would allow for writes. Note that <code><a href="https://www.gnu.org/software/coreutils/">/usr/bin/test</a></code> is shell-specific as well! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?32" rel="alternate" title="ksh vs. bash" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2008-03-08T04:18:00Z</published>
        <updated>2011-12-22T17:03:45Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=32</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=32</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?32</id>
        <title type="html">ksh vs. bash</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                We all know that our shell of choice (c'on, admit it :-)) is "too big and too slow" (quote from its manpage). But I was surprised to see <strong>how</strong> slow it was for this particular operation:<br/><br/>

<b>Update</b>: Thanks to an observing commenter I had to find out that 'expr' is NOT a shell builtin but a simple binary. I always wondered <strong>if</strong> it was a shell builtin and always wondered if scripts with 'expr' would be portable and all but I never got around to do just 'which expr'. Damn. Anyway, here are the updated results now. Thanks again Roland for pointing this out! The gap between bash and ksh is not so big any more, although it's still visible:

<pre>
# cat count.sh
i=1
while [ "$i" -lt 10000000 ]; do
        ((i++))
done

# for i in ksh zsh pdksh mksh bash; do (echo "SHELL: $i"; time $i count.sh); done
SHELL: ksh
real	0m45.196s
user	0m44.676s
sys	0m0.070s

SHELL: zsh
real	1m13.755s
user	1m5.651s
sys	0m7.402s

SHELL: pdksh
real	1m7.300s
user	1m6.013s
sys	0m0.092s

SHELL: mksh
real	1m8.922s
user	1m8.013s
sys	0m0.091s

SHELL: bash
real	3m10.721s
user	3m0.016s
sys	0m6.372s
</pre>

This was done with ksh from AT&T Research (1993-12-28), zsh 4.3.4, PDKSH v5.2.14, MIRBSD KSH R32 and GNU bash 3.2.39(1) on a <a href="http://support.apple.com/specs/#macmini" title="MacMini">MacMini</a>.<br/><br/>
<b>Update #2</b>: as pointed out in the comment section, "(())" should be faster, so let's try again:

<pre>
$ cat count.sh 
i=1
while (( i++ < 10000000 )); do
        :
done
$ for i in ksh zsh pdksh mksh bash; do echo "SHELL: $i"; time $i count.sh; done
SHELL: ksh
real    1m59.642s
user    1m58.340s
sys     0m0.012s

SHELL: zsh
real    3m34.747s
user    3m4.588s
sys     0m25.616s

SHELL: pdksh
real    4m15.224s
user    4m10.056s
sys     0m0.028s

SHELL: mksh
real    4m48.835s
user    4m43.480s
sys     0m0.036s

SHELL: bash
real    10m9.914s
user    9m52.724s
sys     0m4.072s
</pre>

This was done with ksh-93s+ from AT&T Research (2008-01-31), zsh 4.3.10, PDKSH v5.2.14, MIRBSD KSH R39c and GNU bash 4.1.5(1) on a <a href="http://support.apple.com/kb/SP38" title="PowerBook G4 (M9691LL/A)">PowerBook G4 (M9691LL/A)</a> (throttled to 750MHz). 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?212" rel="alternate" title="Cannot unregister the machine 'foo' because it has 1 snapshots" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2010-11-22T20:55:51Z</published>
        <updated>2011-12-14T14:35:41Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=212</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=212</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?212</id>
        <title type="html">Cannot unregister the machine 'foo' because it has 1 snapshots</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, I dabbled with this <a href="http://www.virtualbox.org/">VirtualBox</a> VM a bit but the guest OS was broken anyway so I decided to get rid of the VM:

<pre>
$ VBoxManage unregistervm foo --delete
ERROR: Cannot unregister the machine 'foo' because it has 1 snapshots
Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component 
            Machine, interface IMachine, callee nsISupports
Context: "UnregisterMachine(uuid, machine.asOutParam())" at line 164 
              of file VBoxManageMisc.cpp
</pre>

Oh, right. The VM in question had a snapshop attached to it as well, so let's delete it too:

<pre>
$ VBoxManage showvminfo foo | less
[...]
Snapshots:
   Name: snap1 (UUID: 8e2914fa-de59-4842-9391-3afac42e0125)

$ VBoxManage snapshot foo delete 8e2914fa-de59-4842-9391-3afac42e0125
0%...FAILED
Error: snapshot operation failed. Error message: Hard disk '../deb0.vdi' has 
       more than one child hard disk (2)
</pre>

Hm, I remember now, the <a href="http://forums.virtualbox.org/viewtopic.php?f=1&t=21691#p105250">VM was using another VM's disk</a>. Kinda weird setup, no wonder I wanted to get rid of it :-) So let's find out which VM also uses <code>"deb0.vdi"</code>:

<pre>
$ VBoxManage list hdds
[...]
UUID:        <font color=red>03b1afd9-4ce4-4e42-9347-226b55cba657</font>
Parent UUID: base
Format:      VDI
Location:    ../deb0.vdi
State:       created
Type:        normal
Usage:       foo (UUID: <font color="blue">3c57773a-de6a-4714-9149-407a98f85ae7</font>)
          [snap1 (UUID: 8e2914fa-de59-4842-9391-3afac42e0125)]

UUID:        bc3b45a9-db44-41a4-822d-52987f2734c8
Parent UUID: <font color=red>03b1afd9-4ce4-4e42-9347-226b55cba657</font>
Format:      VDI
Location:    ../foo/Snapshots/{bc3b45a9-db44-41a4-822d-52987f2734c8}.vdi
State:       created
Type:        normal

UUID:        <font color="green">06280b86-8389-40c4-8bfb-3562a3e206df</font>
Parent UUID: <font color=red>03b1afd9-4ce4-4e42-9347-226b55cba657</font>
Format:      VDI
Location:    ../debian/Snapshots/{06280b86-8389-40c4-8bfb-3562a3e206df}.vdi
State:       created
Type:        normal
Usage:       debian (UUID: bdbf5c46-aefe-4004-acea-ac521eaedb2e)
</pre>

So, <code>"deb0.vdi"</code> was used by VM <i>foo</i> and <i>debian</i> an also by a snapshot. Maybe I could just edit <code>VirtualBox.xml</code> manually, but that wouldn't be that much fun, right? So let's detach <font color="green">06280b86-8389-40c4-8bfb-3562a3e206df</font> from <i>debian</i>, then we should be able to delete the snapshot, right?

<pre>
$ VBoxManage showvminfo debian | grep <font color="green">06280b86-8389-40c4-8bfb-3562a3e206df</font>
SATA Controller (1, 0): ../debian/Snapshots/{06280b86-8389-40c4-8bfb-3562a3e206df}.vdi
                                      (UUID: 06280b86-8389-40c4-8bfb-3562a3e206df)

$ VBoxManage storageattach debian --storagectl "SATA Controller" \
                                  --port 1 --device 0 --medium none


$ VBoxManage snapshot foo delete 8e2914fa-de59-4842-9391-3afac42e0125
0%...FAILED
Error: snapshot operation failed. Error message: Hard disk '../deb0.vdi' has
       more than one child hard disk (2)
</pre>

Huh? OK, I say it again: the VM's setup was seriously braindamaged, so maybe VirtualBox got a little confused. A <a href="http://www.virtualbox.org/ticket/2943">somehow related ticket</a> suggested to revert the snapshot to a current state. Did that and went on to detach the disks from the VM but now things got a bit out of hand:

<pre>
$ VBoxManage snapshot <font color="blue">3c57773a-de6a-4714-9149-407a98f85ae7</font> restorecurrent
$ VBoxManage showvminfo foo | grep SCSI

SCSI Controller (0, 0): ../foo/Snapshots/{95000117-e5e0-46dc-bbbd-4929afd9b88c}.vdi 
                                   (UUID: 95000117-e5e0-46dc-bbbd-4929afd9b88c)
SCSI Controller (1, 0): ../foo/Snapshots/{f209322c-b784-4ec3-b0af-e0374444b349}.vdi 
                                   (UUID: f209322c-b784-4ec3-b0af-e0374444b349)

$ VBoxManage storageattach foo --storagectl "SCSI Controller" \
                               --port 0 --device 0 --medium none
$ VBoxManage storageattach foo --storagectl "SCSI Controller" \
                               --port 1 --device 0 --medium none

$ VBoxManage showvminfo foo | grep ^SCSI
SCSI Controller (1, 0): ../foo/Snapshots/{f209322c-b784-4ec3-b0af-e0374444b349}.vdi 
                                   (UUID: f209322c-b784-4ec3-b0af-e0374444b349)
</pre>

Huh? I just detached the disk from the VM, how comes it's still attached? Shortly after, <i>both</i> disks were attached to the SCSI controller again. This did not look right, so I felt like cheating a bit:

<pre>
$ pkill VBoxSVC
$ mv ../Machines/foo/Snapshots/* ~/trash/
</pre>

Meanwhile, I had 4 (!) disks referring to <font color=red>03b1afd9-4ce4-4e42-9347-226b55cba657</font> now, I wonder why:

<pre>
$ VBoxManage list hdds | egrep '^(UUID|Parent)'
[...]
UUID:        03b1afd9-4ce4-4e42-9347-226b55cba657
Parent UUID: base

UUID:        bc3b45a9-db44-41a4-822d-52987f2734c8
Parent UUID: 03b1afd9-4ce4-4e42-9347-226b55cba657

UUID:        06280b86-8389-40c4-8bfb-3562a3e206df
Parent UUID: 03b1afd9-4ce4-4e42-9347-226b55cba657

UUID:        95000117-e5e0-46dc-bbbd-4929afd9b88c
Parent UUID: 03b1afd9-4ce4-4e42-9347-226b55cba657

$ VBoxManage closemedium disk bc3b45a9-db44-41a4-822d-52987f2734c8
$ VBoxManage closemedium disk 06280b86-8389-40c4-8bfb-3562a3e206df
$ VBoxManage closemedium disk 95000117-e5e0-46dc-bbbd-4929afd9b88c
</pre>

Also, I removed all the storage controllers attached to VM <i>foo</i>:

<pre>
$ VBoxManage storagectl foo --name "IDE Controller"  --remove
$ VBoxManage storagectl foo --name "SATA Controller" --remove
$ VBoxManage storagectl foo --name "SCSI Controller" --remove
$ VBoxManage storagectl foo --name "SAS Controller"  --remove
</pre>

This did the trick, apparently:

<pre>
$ VBoxManage snapshot foo delete 8e2914fa-de59-4842-9391-3afac42e0125
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

$ VBoxManage unregistervm foo --delete
</pre>

Re-attaching the disks to the other VM, and we're done:

<pre>
$ VBoxManage storageattach debian --storagectl "SATA Controller" \
                 --port 0 --device 0 --type hdd --medium ../debian/deb0.vdi 
$ VBoxManage storageattach debian --storagectl "SATA Controller" \
                 --port 1 --device 0 --type hdd --medium ../debian/deb1.vdi 
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?282" rel="alternate" title="patchadd: Not enough space in /var/run to copy overlay objects." />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-12-11T01:03:23Z</published>
        <updated>2011-12-11T01:03:23Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=282</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=282</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?282</id>
        <title type="html">patchadd: Not enough space in /var/run to copy overlay objects.</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                When <a href="http://www.par.univie.ac.at/solaris/pca/" title="Patch Check Advanced">pca</a> wanted to install <a href="http://wesunsolve.net/patch/id/144500-19" title="SunOS 5.10: Solaris kernel patch">144500-19</a>, <code>patchadd</code> aborted with:

<pre>
Running patchadd
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
[...]
Checking patches that you specified for installation.

Done!
Unable to install patch. Not enough space in /var/run to copy overlay objects.
 401MB needed, 220MB available.

Failed (exit code 1)
</pre>

Well, this <a href="http://docs.oracle.com/cd/E19088-01/250.srvr/index.html" title="Sun Enterprise 250 Server">Sun Enterprise 250</a> only has 768 MB memory, not too much in these days. Let's <a href="https://forums.oracle.com/forums/thread.jspa?messageID=8160785" title="Solaris 10 11/06 installing 120011-14 kernel patch issue">add</a> some <i>virtual</i> memory then:

<pre>
# mkfile 1g /var/tmp/swap.tmp
# swap -a /var/tmp/swap.tmp
/var/tmp/swap.tmp: Invalid operation for this filesystem type
</pre>

Oh, right - we're on ZFS already. Let's <a href="http://www.unix.com/solaris/123373-how-can-i-increase-size-tmp-directory.html" title="How can I increase size of /tmp directory ">try</a> again:

<pre>
# rm /var/tmp/swap.tmp
# zfs create -V 1gb rpool/tmpswap
# swap -a /dev/zvol/dsk/rpool/tmpswap
# df -h /var/run
Filesystem             size   used  avail capacity  Mounted on
swap                   1.4G   107M   1.3G     8%    /var/run
</pre>

Now we should be good to go :-)<br/><br/>

Oh, and regarding those <i>"overlay objects in /var/run"</i> mentioned above: once <a href="http://docs.oracle.com/cd/E19253-01/816-5166/patchadd-1m/index.html">patchadd(1M)</a> is running, take a look:

<pre>
# df -h | grep -c /var/run
991
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?281" rel="alternate" title="The Holiday Rapist" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-12-04T23:43:29Z</published>
        <updated>2011-12-04T23:53:58Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=281</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=281</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/4-Land-of-the-free" label="Land of the free" term="Land of the free" />
    
        <id>http://nerdbynature.de/s9y/?281</id>
        <title type="html">The Holiday Rapist</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <head>
	<title>Wow! This is video!</title>
	<script src="/flowplayer/example/flowplayer-3.2.6.min.js"></script>
</head>
<body>
Get it right, folks:<br/><br/>
<a 
	href="http://nerdbynature.de/s9y/uploads/209-22.m4v" 
	style="display:block;width:425px;height:300px;" 
	id="player">
</a>

<script language="JavaScript">
	flowplayer("player", "/flowplayer/flowplayer-3.2.7.swf", {
	clip: { autoPlay: false, autoBuffering: true },
});
</script>
<br/>
<small>Oh, yeah...it's all ™ and © by <a href="http://www.fox.com/familyguy/">FOX and its related entities</a>, of course.</small>
</body> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?279" rel="alternate" title="Error: Protected multilib versions" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-12-01T14:24:17Z</published>
        <updated>2011-12-01T18:58:40Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=279</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=279</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?279</id>
        <title type="html">Error: Protected multilib versions</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Did I say that I don't like <a href="https://fedoraproject.org/wiki/Yum">yum</a>? I think I <a href="http://nerdbynature.de/s9y/?247">did</a> and others <a href="https://skvidal.wordpress.com/2008/07/01/got-a-slow-yum-operation">did</a>, too.<br/><br/>

So this <a href="http://yum.baseurl.org"><code>yum upgrade</code></a> failed due to insufficient diskspace and <code>yum</code> exited with:

<small>
<pre>
/usr/sbin/build-locale-archive: cannot add to locale archive: No such file or directory
could not write to ts_done file: [Errno 28] No space left on device
[...]
Error unpacking rpm package imsettings-libs-1.2.6-1.fc16.x86_64
error: gtk2-2.24.8-2.fc16.x86_64: install failed
error: unpacking of archive failed on file \
  /usr/lib64/libimsettings.so.5.2.0;4ed44d97: cpio: write
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yum/rpmtrans.py", line 444, in callback
    self._instCloseFile(  bytes, total, h )
  File "/usr/lib/python2.7/site-packages/yum/rpmtrans.py", line 507, in _instCloseFile
    self._scriptout(txmbr.po)
  File "/usr/lib/python2.7/site-packages/yum/rpmtrans.py", line 246, in _scriptout
    self.base.history.log_scriptlet_output(data, msgs)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 871, in log_scriptlet_output
    self._commit()
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 640, in _commit
    return self._conn.commit()
sqlite3.OperationalError: database or disk is full
error: python callback <bound method RPMTransaction.callback of <yum.rpmtrans.RPMTransaction instance at 0x3efb050>> failed, aborting!
</pre>
</small>

OK, no big deal. Just resized the root partition so that enough space is available now and try again:

<pre>
$ yum upgrade
[...]
There are unfinished transactions remaining. You might consider running \
yum-complete-transaction first to finish them.
[...]
Error: Protected multilib versions: glibc-2.14.90-19.x86_64 != glibc-2.14.90-14.i686
</pre>

This didn't go so well. Let's try <code>yum-complete-transaction</code> then, as suggested:

<pre>
$ yum-complete-transaction
Loaded plugins: langpacks, presto, refresh-packagekit
There are 1 outstanding transactions to complete. Finishing the most recent one
The remaining transaction had 87 elements left to run
Package glibc-common-2.14.90-19.x86_64 already installed and latest version
[...]
--> Processing Dependency: libc.so.6()(64bit) for package: elfutils-0.152-1.fc16.x86_64
--> Processing Dependency: /bin/sh for package: kernel-3.1.2-1.fc16.x86_64
[....]
</pre>

This goes on for quite a while, hours even. I went to bed at this time, only to see the next morning that <code>yum</code> got killed by the <a href="http://linux-mm.org/OOM_Killer">out-of-memory killer</a>:

<pre>
Out of memory: Kill process 1457 (yum-complete-tr) score 782 or sacrifice child
Killed process 1457 (yum-complete-tr) total-vm:1643616kB, anon-rss:830884kB, file-rss:0kB
</pre>

The VM has 1 GB RAM and 512 MB swap - not too much, but certainly enough for doing an upgrade, I assumed. OK, so how to go on from here? With <code>yum-complete-transaction</code> failing, I decided to <i>cleanup</i> any old transactions and start from scratch:

<pre>
$ yum-complete-transaction --cleanup-only
Cleaning up unfinished transaction journals
$ yum-complete-transaction
No unfinished transactions left.
</pre>

But now the upgrade would stop with:

<pre>
$ yum upgrade
[...]
Error: Protected multilib versions: glibc-2.14.90-19.x86_64 != glibc-2.14.90-14.i686
</pre>

Using <code>--setopt=protected_multilib=false</code> (and <code>--skip-broken</code>) brought us only little further:

<pre>
$ yum upgrade --setopt=protected_multilib=false --skip-broken
[...]
Transaction Check Error:
  file /usr/share/doc/glibc-2.14.90/NEWS conflicts between attempted
  installs of glibc-2.14.90-14.i686 and glibc-2.14.90-19.x86_64
</pre>

Moving <code>/usr/share/doc/glibc-2.14.90/NEWS</code> <a href="http://forums.fedoraforum.org/showthread.php?t=262677" title="Fedora Support > Archived > F15 Development: dependencies resolution errors: multilib">out of the way</a> did not help in this case. What <i>did</i> help was to "remove" the conflicting package from the package database. Of course, we could not <i>really</i> delete <code>glibc</code>, since it's needed for pretty much everything:

<pre>
$ rpm --erase --nodeps --noscripts --justdb glibc-2.14.90-14.x86_64
$ yum upgrade --setopt=protected_multilib=false --skip-broken
[...]
</pre>

This went through successfully and the system is now properly updated and even survived a reboot. Just in case that it's still not clear from these notes: I find it unacceptable that <code>yum</code> is having such a hard time finding out how to do the Right Thing<small><sup>TM</sup></small> after a failed transaction. And yes, I've been using <a href="http://wiki.debian.org/Apt">apt-get</a> for <i>years</i> now - never had anything remotely similar to this mess. Incredible, I cannot understand how people can work with that. I mean, <i>really</i> work. I'm using Fedora only for playing around and while I really like some of the approaches Fedora is going for, this <code>yum</code> crap is a major show stopper for me to ever adopt any <a href="http://www.rpm.org/">rpm</a>-based distribution. I'd rather do <a href="http://www.freebsd.org/ports/">ports</a> :-\<br/><br/>

Oh, apparently there's still one thing left to clean up:

<pre>
$ yum check
Loaded plugins: changelog, langpacks, presto, refresh-packagekit
glibc-common-2.14.90-14.x86_64 has missing requires of glibc = ('0', '2.14.90', '14')
glibc-common-2.14.90-19.x86_64 is a duplicate with glibc-common-2.14.90-14.x86_64
</pre>

In my case, <code>"package-cleanup --cleandupes"</code> <a href="http://www.fedoraforum.org/forum/showthread.php?t=268328" title="Fedora Support > General Support: yum update reports duplicates and missing dependencies">solved</a> this one. Sigh... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?280" rel="alternate" title="VirtualBox &amp; SysRq" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-12-01T15:28:30Z</published>
        <updated>2011-12-01T18:40:07Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=280</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=280</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?280</id>
        <title type="html">VirtualBox &amp; SysRq</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Sometimes I need to send <a href="http://www.mjmwired.net/kernel/Documentation/sysrq.txt" title="Documentation/sysrq.txt">sysrq</a> keys to a Linux <a href="https://forums.virtualbox.org/viewtopic.php?f=6&t=10400#p207674" title="Magic sysrq on Linux guest, under a Linux host">virtual machine</a> and I always forget <a href="http://www.halfdog.net/Misc/TipsAndTricks/VirtualBox.html#MagicSysrq" title="VirtualBox: Running, Debugging">how to do this</a>, so here it is:

<pre>
  VBoxManage controlvm &lt;VM&gt; keyboardputscancode <font color="green">1d 38 54</font> &lt;PRESS&gt; &lt;RELEASE&gt; <font color="green">d4 b8 9d</font>
</pre>

The <code>PRESS</code> and <code>RELEASE</code> values are derived from the <a href="http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html#ss1.4" title="Keyboard scancodes: Ordinary scancodes (Andries Brouwer)">scancodes</a>: The <code>PRESS</code> value is the bare scancode, the <code>RELEASE</code> value is the <code>PRESS</code> value <i>plus</i> <code>0x80</code>.<br/><br/>

So, to send a <code>"s"</code> (to <code><i>S</i>ync</code> the filesystems), the scancode would be <code>0x1F</code>. And <code>0x1F + 0x80</code> equals <code>9F</code>, this would be the scancode for releasing the key. Putting this all together, sending <code>sysrq-s</code> to the virtual machine goes like this:

<pre>
  VBoxManage controlvm &lt;VM&gt; keyboardputscancode <font color="green">1D 38 54</font> <font color="blue">1F 9F</font> <font color="green">D4 B8 9D</font>
</pre>

Note: Be sure to set <code>kernel.sysrq = 1</code> in your Linux guest machine, so that sysrq-keycodes are actually honored by the guest.<br/><br/>

<a href="http://www.virtualbox.org/manual/ch08.html" title="VBoxManage: Commands overview">This</a> can also be used to <a href="http://blog.frameos.org/2011/06/08/changing-linux-terminals-in-virtualbox-using-vboxmanage/" title="Switching Linux terminals in VirtualBox using VBoxManage">switch to a different terminal</a> (if you have a VirtualBox console window open):

<pre>
  VBoxManage controlvm &lt;VM&gt; keyboardputscancode 1d 38 <font color="blue">3b</font>
</pre>

This is the equivalent to <code>Ctrl-Alt-F1</code> and would switch to the first terminal. Iterate <code>0x3b</code> up to <code>0x42</code> to switch up to <code>Ctrl-Alt-F8</code>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?77" rel="alternate" title="bash completion: /dev/fd/62: No such file or directory" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2009-02-23T11:57:59Z</published>
        <updated>2011-11-29T09:37:50Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=77</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=77</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?77</id>
        <title type="html">bash completion: /dev/fd/62: No such file or directory</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                No need to cite <a href="http://www.ducea.com/2009/02/18/linux-tips-bash-completion-devfd62-no-such-file-or-directory/">the whole article</a> (thanks!), so here's a short version: after upgrading from <a href="http://debian.org/releases/etch/">etch</a> to <a href="http://debian.org/releases/lenny/">lenny</a>, <code>bash completion</code> would not work any more in this DomU:
<pre>
# tail -f /var&lt;TAB&gt;-bash: /dev/fd/62: No such file or directory
-bash: /dev/fd/60: No such file or directory
</pre>
Workaround:
<pre>
# sudo ln -s /proc/self/fd /dev/fd
</pre>
...or just install <code>udev</code>, although this package was not needed before the upgrade. Oh, there's a <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514098">bug report</a> for this one too. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?278" rel="alternate" title="Mediawiki &amp; MySQL &amp; SQLite" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-11-17T01:23:39Z</published>
        <updated>2011-11-17T03:31:11Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=278</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=278</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?278</id>
        <title type="html">Mediawiki &amp; MySQL &amp; SQLite</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I got a <a href="http://www.mediawiki.org">MediaWiki</a> instance up &amp; running with <a href="http://www.mysql.com">MySQL</a> as its database backend. Now, I wanted to play around with this wiki in a <a href="http://www.virtualbox.org/">VM</a> running <a href="https://fedoraproject.org/wiki/Releases/16">Fedora 16</a>. Let's prepare the VM for running MediaWiki:<br/>

<pre>
  $ yum install httpd php links mediawiki mediawiki-Cite
  $ grep ^Alias /etc/httpd/conf.d/mediawiki.conf 
  Alias /wiki/skins /usr/share/mediawiki/skins
  $ cp -a /var/www/wiki/ /var/www/html/
  $ systemctl enable httpd.service
  $ systemctl start httpd.service
</pre>

Note that we did <i>not</i> install a MySQL server here: I did not want to run yet another service in this small virtual machine.<br/><br/>

After that, the MediaWiki instance can be accessed &amp; setup via <code>http://fedora.local/wiki/</code> - be sure to choose <i>SQLite</i> for the database backend.<br/><br/>

Now MediaWiki is up &amp; running with an <i>empty</i> <a href="http://www.sqlite.org">SQLite</a> database. But how can I <a href="http://www.sqlite.org/cvstrac/wiki?p=ConverterTools">convert</a> my original MySQL database into SQLite?<br/><br/>

There's <a href="https://gist.github.com/943776">mysql2sqlite</a>, a shell script using <a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">mysqldump</a> and <a href="http://cm.bell-labs.com/cm/cs/awkbook/">awk</a> to do the job. And it <i>did</i> the job pretty well so far:

<pre>
  mysql2sqlite.sh -u admin -p mw_wiki > wiki.sqlite.raw
</pre>

I could pipe the whole thing through <code>sqlite</code> already but I had to alter the output a bit: my original database had <a href="http://www.mediawiki.org/wiki/Manual:$wgDBprefix">$wgDBprefix</a> set to <code>"<font color="red">mw_</font>"</code> but somehow this parameter seems to be ignored when an SQLite database is used. So let's cut out the prefix from our preliminary dump whenever a table is created, indexed or inserted<small><sup>1)</sup></small> into:

<pre>
  sed -e '/[INDEX|INTO|TABLE] \"<font color="blue">mw_</font>/s/<font color="red">mw_</font>//g' -i wiki.sqlite.raw
</pre>

Now we can generate our SQLite database as simple as:

<pre>
  sqlite wiki.sqlite < wiki.sqlite.raw
</pre>

Point <a href="http://www.mediawiki.org/wiki/Manual:$wgDBname">$wgDBname</a> to this filename and off we go: the wiki should now be up &amp; running with the original data visible. Yay ;-)<br/><br/>

Great, but we could not update pages or create new articles<small><sup>2)</sup></small>:

<pre>
  INSERT INTO text (old_id,old_text,old_flags) VALUES (NULL,...
  Database returned error "19: text.old_id may not be NULL". 
</pre>

Hm, shouldn't <code>old_id</code> be <a href="http://stackoverflow.com/questions/631060/can-i-make-a-field-autoincrement-after-made-a-table">set</a> to <a href="http://www.sqlite.org/autoinc.html">AUTOINCREMENT</a>? Let's look at our <code>wiki.sqlite.raw</code> again:

<pre>
CREATE TABLE "text" (
  "old_id" int(10)  NOT NULL<font color=red> ,</font>
  "old_text" mediumblob NOT NULL,
  "old_flags" tinyblob NOT NULL,
  <font color=blue>PRIMARY KEY ("old_id")</font>
);
</pre>

Again: this is the output of <code>mysql2sqlite</code> and it looks pretty sane to me. But somehow <code>old_id</code> wasn't set to <code>PRIMARY KEY</code> (aka <code>"AUTOINCREMENT"</code>) when parsed by <code>sqlite</code> (v3.7.7.1). When the <code>"PRIMARY KEY"</code> is moved right before the <code>"NOT NULL"</code> statement for <code>old_id</code>, it still would not recognize it. We also had to replace the <code>"int(10)"</code> with <code>INTEGER</code> and remove the superfluous space on the same line. Now it reads:

<pre>
CREATE TABLE "text" (
  "old_id" <font color=blue>INTEGER PRIMARY KEY</font> NOT NULL<font color=red>,</font>
  "old_text" mediumblob NOT NULL,
  "old_flags" tinyblob NOT NULL
);
</pre>

We have to modify all (19) occurences of <code>PRIMARY KEY</code> in our <code>wiki.sqlite.raw</code>. Be sure to <i>omit</i> the <code>INTEGER</code> keyword when the field is declared <code>varbinary</code>.

With all that in order now, <code>wiki.sqlite.raw</code> can be fed into <code>sqlite</code> again. FWIW, this is what <code>sqlite</code> makes of the statement above:

<pre>
  $ sqlite3 data/wikidb.sqlite 
  sqlite> .schema text
  CREATE TABLE text (
    old_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    old_text BLOB NOT NULL,
    old_flags BLOB NOT NULL
  );
</pre>

Now we should be able to update pages and create articles. Phew, what a ride :-)<br/><br/>

<b>Update:</b> Right after finishing this article, I came across <a href="http://kb.siteground.com/article/How_to_convert_your_MediaWiki_database_to_SQLite.html" title="Siteground: How to convert your MediaWiki database to SQLite?">this knowledge base article</a> on how to do this with scripts provided by the MediaWiki installation. In short:

<pre>
  $ php maintenance/dumpBackup.php --full --uploads --conf `pwd`/LocalSettings.php > wiki.xml
</pre>

Then, in the VM again:

<pre>
  $ cd /var/www/html/wiki
  $ php /usr/share/mediawiki/maintenance/importDump.php wiki.xml
  $ php /usr/share/mediawiki/maintenance/rebuildrecentchanges.php 
</pre>

This takes quite a lot of time - around 7 minutes for a 13MB <code>.xml</code> dump. The resulting was written into the configured <code>$wgDBname</code>, or <code>data/wiki.sqlite</code> in our case. All pages were in place, only the <a href="https://www.mediawiki.org/wiki/Help:Namespaces">MainPage</a> was overwritten with its initial version. Going back one version with the <i>page history</i> revealed the most current version of the (imported) article.

<br/><br/>
<small><sup>1)</sup> Is this really the correct statement? It works, but I thought it should use () instead of [] for the OR statement.</small><br/>

<small><sup>2)</sup> We had to set <a href="http://www.mediawiki.org/wiki/Manual:$wgShowExceptionDetails">$wgShowExceptionDetails</a>, <a href="http://www.mediawiki.org/wiki/Manual:$wgShowSQLErrors">$wgShowSQLErrors</a>, <a href="http://www.mediawiki.org/wiki/Manual:$wgDebugDumpSql">$wgDebugDumpSql</a> to <i>true</i> for this to be shown.</small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?277" rel="alternate" title="Growl 1.3.1" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-11-07T22:44:12Z</published>
        <updated>2011-11-10T14:59:24Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=277</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=277</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?277</id>
        <title type="html">Growl 1.3.1</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <img class="serendipity_image_right" src="http://nerdbynature.de/s9y/uploads/growl-update.png" title="Growl 1.3.1 Update Available" alt="Update Available - A newer version of Growl is available online. Click here to download it right now." />
What's up with the latest <a href="http://growl.info/">Growl</a> update? Apparently it <a href="http://www.newbie2mac.com/2011/10/what-is-growl-and-why-is-it-no-longer-free/">costs money</a> now? Not that $1.99 for this useful piece of software were too much, but...no announcement about this change? Why not? Users are <a href="https://groups.google.com/group/growldiscuss/search?group=growldiscuss&q=pay&qt_g=Search+this+group">already upset</a> about this change and I really fail to see why they did this w/o any prior <i>notification</i>.<br/><br/>

For the brave and able, Growl 1.3.1 can still be <a href="https://code.google.com/p/growl/wiki/GrowlReleaseProcess">built</a> from <a href="https://code.google.com/p/growl/source/checkout">source</a> - good luck fighting all the build errors then :-\ 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?181" rel="alternate" title="That's When I Reach For My Resolver" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2010-05-11T18:24:03Z</published>
        <updated>2011-11-07T15:08:38Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=181</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=181</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?181</id>
        <title type="html">That's When I Reach For My Resolver</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, the primary nameserver is down but luckily <code>/etc/resolv.conf</code> has been equipped with a secodary nameserver entry - great! And <code>nslookup</code> works like a charm too, heh! But all the other <i>useful</i> tools are waiting for ages until they'll get a response from the backup server - why is that?

<pre>
$ time ping eve
eve is alive

real    0m30.045s
user    0m0.007s
sys     0m0.018s
</pre>

Other than e.g. <code>nslookup</code>, the <i>normal</i> applications have to use the the <a href="http://www.youtube.com/watch?v=R0v9a-x45gw">resolver(4)</a> to get their name requests answered. Now, we could cheat and put our backup server <i>before</i> the faulty one, but let's see if we can tackle this from a different angle. <a href="http://download.oracle.com/docs/cd/E19109-01/tsolaris8/835-8005/6ruu381rk/index.html">resolv.conf(4)</a> was most helpful, of course:

<pre>
options
   Allows certain internal resolver variables to be modified.

timeout:n / retrans:n
   Sets the amount of time the resolver will wait for a response from a remote 
   name server before retrying the query by means of a different name server.
   Measured in seconds, the default is RES_TIMEOUT. See <resolv.h>

attempts:n / retry:n

   Sets the number of times the resolver will send a query to its name 
   servers before giving up and returning an error to the calling application.
   The default is RES_DFLRETRY. See <resolv.h>.
</pre>

In our <a href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/resolv.h"><code>resolv.h</code></a> (Solaris 10) we have :

<pre>
$ egrep 'RES_TIMEOUT|RES_MAXRETRANS|RES_DFLRETRY' /usr/include/resolv.h
#define RES_TIMEOUT         5      /<strong> min. seconds between retries </strong>/
#define RES_MAXRETRANS     30      /<strong> only for resolv.conf/RES_OPTIONS </strong>/
#define RES_DFLRETRY        2      /<strong> Default #/tries. </strong>/

</pre>

So, let's tweak those <code>options</code>:

<pre>
$ grep options /etc/resolv.conf 
options timeout:1 retry:<font color="red">1</font>

$ time ping eve
eve is alive

real    0m7.794s
user    0m0.007s
sys     0m0.018s
</pre>

Whooha, not bad.<br/>
Note: in Linux the <i>retry:</i> parameter is called <a href="https://www.kernel.org/doc/man-pages/online/pages/man5/resolver.5.html"><i>attempts:</i></a><br/><br/>

Let's tweak the <i>retry:</i> parameter a bit more:

<pre>
$ grep options /etc/resolv.conf 
options timeout:1 retry:<font color="red">0</font>

$ time ping eve
eve is alive

real    0m2.100s
user    0m0.007s
sys     0m0.018s
</pre>

Even better. Of course, one has to realize that with <i>zero</i> retries the resolver will jump to the next nameserver on the first failure - so, if our backup server is a bit sleepy we won't get a reply at all.

If you enable <a href="http://download.oracle.com/docs/cd/E18752_01/html/816-5166/nscd-1m.html">nscd</a>, subsequent requests to the same name will be answered instantly:

<pre>
$ sudo svcadm enable svc:/system/name-service-cache
$ time ping eve
eve is alive

real    0m3.218s
user    0m0.007s
sys     0m0.018s

$ time ping eve
eve is alive

real    0m0.198s
user    0m0.007s
sys     0m0.017s
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?43" rel="alternate" title="some kind of fruit company...." />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2008-07-26T04:26:31Z</published>
        <updated>2011-11-07T14:37:08Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=43</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?43</id>
        <title type="html">some kind of fruit company....</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                When the MacMini arrived, I forgot that I might need a keyboard as well. Not that often, as it'll be some kind of "server", but once in a while one might have to free the box from an ugly <a href="http://vserver.13thfloor.at/Experimental/OOPS/kernel-first-oops.jpg" title="oops!">panic</a> or just play around locally. Anyway, now a <a href="http://store.apple.com/us/product/MB110LL/A?fnode=home/shop_mac/mac_accessories/mice_keyboards&mco=MTQ0OTA" title="keyboard">slim Apple keyboard</a> is connected and suffering from a nasty bug in Ubuntu/Hardy. Fortunately, this is already documented in <a href="https://bugs.launchpad.net/ubuntu/+bug/216374" title="LP#216374">Launchpad</a> and the <a href="http://tipotheday.com/2008/04/30/slim-aluminum-apple-keyboard-with-ubuntu-hardy-heron/">almighty blogosphere</a>.<br/><br/>
In short: when accidently hitting the NUMLOCK key, my keyboard is basically unsuable. Hitting F6 twice does the trick for me. Plugging in a 2nd (non-Apple) keyboard and hitting NUMLOCK again seems to resolve it as well :-)

<br/><br/>

<small><a href="http://www.imdb.com/title/tt0109830/quotes">What's the subject line about?</a></small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?169" rel="alternate" title="You do not have permission to access this server." />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2010-03-28T01:53:58Z</published>
        <updated>2011-11-07T14:34:39Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=169</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=169</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?169</id>
        <title type="html">You do not have permission to access this server.</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                It was <a href="http://sourceforge.net/tracker/?func=detail&atid=397597&aid=1180762&group_id=29880">time to login to SourceForge</a> again but upon providing my credentials, all I got was:

<pre>
Error 403
We're sorry, but we could not fulfill your request for /account/login.php on this server.
You do not have permission to access this server.
Your technical support key is: 43ae-fa75-17f4-e8c8

Please contact ... and be sure to provide the technical support key shown above
and as much information as you can so we can resolve the problem.
</pre>

Well, I really needed to login so I contacted the support guys. Although they responded within minutes(!), they were not really sure why I <i>do not have permission to access this server</i>. Something about my useragent, but then it could be my IP address as well. After a few exchanges it became clear that it was really my useragent what's being blocked. As I've modified <a href="https://developer.mozilla.org/en/User_Agent_Strings_Reference">general.useragent.override</a> this must've been catched by some of their blacklists. To be specific, the following string was blocked:<br/><br/>

<pre>
     Mozilla/5.0 (X11; U; Linux; en-US; rv:1.0) Gecko/<font color="red">25250101</font>
</pre>

While the following allowed me to login:

<pre>
     Mozilla/5.0 (X11; U; Linux; en-US; rv:1.0) Gecko/<font color="red">20050316</font>
</pre>

Now, the only tow questions left open are:<br/><br/>
<strike>What kind of blacklist logic filters on <i>useragent</i> strings?</strike><br/>
Why can't they put a nice desciptive explanation in the error message instead of this tedious support key?
<br/><br/>

<b>Update:</b> their helpdesk turned out to be more helpful as I expected and they provided me with a few details. Apparently it was the <a href="http://www.bad-behavior.ioerror.us/">BadBehaviour</a> filter which refused my login with the weird useragent. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?276" rel="alternate" title="Schneierfacts fortune cookies" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-11-06T21:57:43Z</published>
        <updated>2011-11-06T22:34:12Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=276</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=276</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?276</id>
        <title type="html">Schneierfacts fortune cookies</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A (long) while ago I stumbled upon the incredible <a href="http://geekz.co.uk/schneierfacts">Schneierfacts</a> and thought <i>"I must have these snippets of wisdom as a <a href="http://fortunes.cat-v.org/">fortune(6)</a> file!"</i> Here's how I did that:

<pre>
  mkdir schneierfacts &&amp; cd schneierfacts
  f=1
  while [ $f -lt <font color="red">1610</font> ]; do 
      echo "fact: $f"
      wget -q http://geekz.co.uk/schneierfacts/fact/"$f"
      sleep 1
      f=$((f+1))
  done


  grep 'p class="fact"' * | \
          sed 's/.*fact\">//;s/<\/p>//;s/\&quot\;/\"/g' | \
          sort -u > ../schneierfacts.txt
  sed G ../schneierfacts.txt | sed 's/^$/%/' > ../schneierfacts

  <a href="http://www.freebsd.org/cgi/man.cgi?query=strfile">strfile</a> -r ../schneierfacts
  "../schneierfacts.dat" created
  There were 1600 strings
  Longest string: 24713 bytes
  Shortest string:  142 bytes
</pre>

With that in place, we can install our new fortune file:

<pre>
  sudo mkdir -p /usr/local/share/games/fortunes
  sudo cp ../schneierfacts{,.dat} /usr/local/share/games/fortunes/

  $ fortune schneierfacts
  When Bruce Schneier does modulo arithmetic, there are no remainders. Ever.
</pre>

Note: There are currently over 1600 facts, be kind when downloading the facts! (i.e. use <code>sleep(1)</code> after every <code>wget(1)</code> call.) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?275" rel="alternate" title="TCP: Peer 1.2.3.4:64259/51542 unexpectedly shrunk window 4197231805:4197240525 (repaired)" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-11-06T21:26:42Z</published>
        <updated>2011-11-06T21:56:41Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=275</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=275</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?275</id>
        <title type="html">TCP: Peer 1.2.3.4:64259/51542 unexpectedly shrunk window 4197231805:4197240525 (repaired)</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                From time to time our Linux 2.6 kernel generates the following message:

<pre>
  TCP: Peer 1.2.3.4:64259/51542 unexpectedly shrunk window \
          4197231805:4197240525 (repaired)
</pre>

It was a bit scarier <a href="http://www.informedbanking.com/wiki/TCP_Treason_Uncloaked" title="informedbanking.com: TCP Treason Uncloaked">back then</a> when it read something like this:

<pre>
  TCP: Treason uncloaked! Peer 1.2.3.4:64259/51542 shrinks window \
          3166327388:3166327393. Repaired.
</pre>

The message has been <a href="https://git.kernel.org/linus/6086ebca13ddc9cfaaa25248ba8ebef35103fb74" title="tcp: Stop scaring users with treason uncloaked!">modified in December 2008</a>.

While there are quite a lot of <a href="http://kerneltrap.org/node/7182" title="kerneltrap.org: Treason Uncloaked">posts</a> and <a href="https://lwn.net/Articles/92727/" title="LWN: TCP window scaling and broken routers">articles</a> on this <a href="http://kerneltrap.org/mailarchive/linux-netdev/2009/4/19/5518144" title="kerneltrap.org: TCP: Peer messages">topic</a>, a pretty good explanation can be found in <a href="https://git.kernel.org/linus/2ad41065d9fe518759b695fc2640cf9c07261dd2" title="[TCP]: Clear stale pred_flags when snd_wnd changes">commit 2ad4106</a>: <code>Clear stale pred_flags when snd_wnd changes</code>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?274" rel="alternate" title="Just like gambling" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-11-01T00:38:32Z</published>
        <updated>2011-11-01T00:38:32Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=274</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=274</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/4-Land-of-the-free" label="Land of the free" term="Land of the free" />
    
        <id>http://nerdbynature.de/s9y/?274</id>
        <title type="html">Just like gambling</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Ah yes, that's the <a href="http://thejobmouse.com/2011/10/28/we-are-wall-street-wall-street-strikes-back/">stuff</a>:

<pre>
 > We are Wall Street. It's our job to make money. Whether it's a commodity, 
 > stock, bond, or some hypothetical piece of fake paper, it doesn't matter. We
 > would trade baseball cards if it were profitable. I didn’t hear America 
 > complaining when the market was roaring to 14,000 and everyone’s 401k 
 > doubled every 3 years. Just like gambling, it’s not a problem until you lose.
 > I've never heard of anyone going to Gamblers Anonymous because they 
 > won too much in Vegas.
</pre>

...and so the <a href="http://boingboing.net/2011/10/29/traders-talk-back-to-occupy-chicago.html">leaflet</a> <i>from</i> the financial traders goes on to explain why everything is just OK the way it is. Oh well, that's a relief. I was kinda worried, but not anymore... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?271" rel="alternate" title="rtorrent: GET /announce?info_hash=" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-10-21T18:11:22Z</published>
        <updated>2011-10-28T16:44:36Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=271</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=271</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?271</id>
        <title type="html">rtorrent: GET /announce?info_hash=</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Running <a href="http://libtorrent.rakshasa.no/">rtorrent</a> and <a href="http://redmine.lighttpd.net/projects/lighttpd">a webserver</a> on the same machine reveals the following strange entries in the webserver's log:

<pre>
127.0.0.1 - - [21/Oct/2011:18:59:02 -0700] "GET /announce?info_hash=.... \
                   HTTP/1.1" 404 142 "-" "rtorrent/0.8.6/0.12.6"
</pre>

This happens every few minutes or so. It's not causing any trouble, but why <i>does</i> rtorrent connect to localhost? Someone at <a href="https://www.freenode.net/">#rtorrent</a> pointed out that it may be a tracker, resolving to <code>localhost</code>. And indeed, going through the trackerlist a popular tracker decided to <a href="https://forum.suprbay.org/showthread.php?tid=78934">resolve some of their servers to localhost</a>. And they even explain why:

<pre>
   Because retarded ISPs and registrars like to hijack NXDOMAIN responses to display 
   ads and crap. Also, if you are using a service like OpenDNS, you'll get their generic
   error response instead.
</pre>

Understandably :-)<br/><br/>

Well, redirecting <code>localhost</code> seems weird, so for now I'm just adding the tracker in question to <code>/etc/hosts</code> and point it to an unused <a href="https://tools.ietf.org/html/rfc1918">private IP address</a> to get rid of these bogus log entries. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?273" rel="alternate" title="Don't let your kids play with NoSQL!" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-10-27T21:30:02Z</published>
        <updated>2011-10-27T21:30:02Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=273</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=273</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?273</id>
        <title type="html">Don't let your kids play with NoSQL!</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Not that I do <s>much</s> anything with NoSQL, but I really enjoyed <a href="http://radar.oreilly.com/2011/10/oracle-nosql-database-architecture.html">this article</a> about <a href="http://www.oracle.com/technetwork/database/nosqldb/">Oracle's NoSQL Database</a>, especially the point where they <a href="http://www.oracle.com/technetwork/database/debunking-nosql-twp-399992.pdf">removed</a> the white paper, titled "<a href="https://bayfiles.com/file/163N/Linmh2/debunking-nosql-twp-399992.pdf">Debunking the NoSQL Hype</a>" (from May 2011!).<br/><br/>

The last sentence sounds like one of those old <a href="http://pzrservices.typepad.com/vintageadvertising/vintage_public_service_announcements_psas/">public service announcements</a>:

<pre>
  Go for the tried and true path. Don't be risking your data on NoSQL databases.
</pre>

Another favourite:

<pre>
  As a result, NoSQL databases may only have partial or no sql support.
</pre>

No shit, <a href="https://en.wiktionary.org/wiki/no_shit,_Sherlock">Sherlock</a>! :-) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?270" rel="alternate" title="pkgutil: Bad signature detected in catalog!" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-10-06T15:08:07Z</published>
        <updated>2011-10-06T15:08:07Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=270</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=270</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?270</id>
        <title type="html">pkgutil: Bad signature detected in catalog!</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                For some reason, this happened:

<pre>
# pkgutil -u CSWpkgutil
Checking integrity of ../catalog.mirrors.usc.edu_pub_csw_unstable_sparc_5.10 with gpg.
gpg: Signature made Wed Oct 05 12:32:42 2011 PDT using DSA key ID <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9306CC77">9306CC77</a>
gpg: Can't check signature: public key not found
Bad signature detected in catalog!
</pre>

But <a href="http://www.opencsw.org/2011/09/new-signing-key/">the key</a> had been imported already:

<pre>
# gpg --list-keys 9306CC77
pub   1024D/9306CC77 2011-08-31
uid                  OpenCSW catalog signing <board@opencsw.org>
sub   2048g/971EDE93 2011-08-31
</pre>

So why would <code>pkgutil</code> not recognize it? <a href="http://download.oracle.com/docs/cd/E19082-01/819-2239/truss-1/index.html">truss(1)</a> to the rescue!

<pre>
# truss -elfda pkgutil -u CSWpkgutil
[...]
20753/1:         3.2282 execve("/opt/csw/bin/gpg", 0x0020A208, 0x00028B60)  argc = 5
20753/1:         argv: /opt/csw/bin/gpg <font color=green>--homedir /var/opt/csw/pki</font> --verify
[....]
20753/1:         3.3719 open("/var/opt/csw/pki/pubring.gpg", O_RDONLY)  = 3
</pre>

Aha! So we need to import the key to <a href="http://www.opencsw.org/packages/CSWpkgutil/">CSWpkgutil</a>'s keystore:

<pre>
# gpg <font color=green>--homedir /var/opt/csw/pki</font> --keyserver keys.gnupg.net --recv-key 9306CC77
gpg: requesting key 9306CC77 from hkp server keys.gnupg.net
gpg: key 9306CC77: public key "OpenCSW catalog signing <board@opencsw.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
</pre>

After doing that (and setting the <a href="http://www.gnupg.org/gph/en/manual/r899.html">key's trust</a>) <code>pkgutil</code> worked again :-) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?269" rel="alternate" title="svc: failed to register lockdv1 RPC service (errno 97)" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-09-25T16:35:21Z</published>
        <updated>2011-09-25T16:35:21Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=269</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=269</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?269</id>
        <title type="html">svc: failed to register lockdv1 RPC service (errno 97)</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                During bootup, this message appears:

<pre>
  svc: failed to register lockdv1 RPC service (errno 97).
</pre>

What's <a href="https://github.com/torvalds/linux/commit/363f724cdd3d2ae554e261be995abdeb15f7bdd9">this message</a> about?<br/><br/>

This <a href="https://lkml.org/lkml/2009/5/11/273">thread</a><!-- lkml: svc: failed to register lockdv1 RPC service (errno 97). --> explains little. <a href="http://ubuntuforums.org/showpost.php?p=8981193&postcount=5">Disabling IPv6</a> <small>(via <code>ipv6.disable=1</code>)</small> seems to help, but I don't consider this a viable workaround. How about <code>s/KERN_WARNING/KERN_DEBUG/</code> then? 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?268" rel="alternate" title="Yo dawg, I herd you like bittorrent..." />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-09-22T14:54:17Z</published>
        <updated>2011-09-22T14:54:17Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=268</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=268</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/4-Land-of-the-free" label="Land of the free" term="Land of the free" />
    
        <id>http://nerdbynature.de/s9y/?268</id>
        <title type="html">Yo dawg, I herd you like bittorrent...</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                so I put a <code>bundesregierung.de</code> in your peerlist so you can leech while you seed:<br/><br/>

<a href="/bits/misc/nqt.php?queryType=lookup&target=83.169.2.20"><img src="http://nerdbynature.de/s9y/uploads/83.169.2.20.png" alt="" /></a>
<!-- http://network-tools.com/default.asp?prog=lookup&host=83.169.2.20 --> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?267" rel="alternate" title="The procedure entry point could not be located in the dynamic link library MSVCP90.dll" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-09-11T22:49:31Z</published>
        <updated>2011-09-11T22:49:31Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=267</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=267</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?267</id>
        <title type="html">The procedure entry point could not be located in the dynamic link library MSVCP90.dll</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                The <a href="https://forum.avira.com/wbb/index.php?page=Thread&postID=928363#post928363">original error message</a> was a bit more cryptic:

<pre>
  The procedure entry point Xbad<sub>ds2</sub>std@@XBYP3error_type@regex_constants<sub>32</sub>@Y
  could not be located in the dynamic link library MSVCP90.dll
</pre>

The web is <a href="https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?q=the%20procedure%20entry%20point%20could%20not%20be%20located%20MSVCP90.dll">full of errors like this</a> and <a href="http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/entry-point-error/11f124b6-c9f3-4466-8025-e4e5d6f764bf">various solutions</a> are <a href="http://support.microsoft.com/default.aspx/kb/936212">proposed</a> but it seems to be important <i>which</i> application generates this error. In this case it was <a href="https://www.avira.com/en/avira-free-antivirus">avgnt.exe</a>. And indeed, installing the <a href="https://www.microsoft.com/download/en/details.aspx?id=5582">Microsoft Visual C++ 2008 SP1 Redistributable Package</a> made the error go away :-) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?266" rel="alternate" title="Error 1603: A fatal error occurred during installation" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-09-11T12:56:42Z</published>
        <updated>2011-09-11T12:56:42Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=266</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=266</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?266</id>
        <title type="html">Error 1603: A fatal error occurred during installation</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                While trying to install <a href="http://www.vmware.com/products/vcenter-server/overview.html">vCenter Server</a>, the installation of the included <a href="https://www.microsoft.com/download/en/details.aspx?id=21844">Microsoft SQL Server 2005 Express Edition</a> failed. In the install logs, one can find something like this:

<pre>
Error: Action "ReportChainingResults" threw an exception during execution.
One or more packages failed to install. Refer to logs for error details. : 1603
        Error Code: 0x80070643 (1603)
Windows Error Text: Fatal error during installation.
  Source File Name: sqlchaining\sqlchainingactions.cpp
Compiler Timestamp: Sat Oct 25 08:47:07 2008
     Function Name: sqls::ReportChainingResults::perform
Source Line Number: 3521
</pre>

It turned out not to be a <a href="http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/2e6fdc4d-0c0c-4243-9d52-9b873d4de3e6/">DCOM issue</a> and Microsoft had <a href="http://support.microsoft.com/kb/968749">KB 968749</a> in place: the solution would be to <a href="http://support.microsoft.com/kb/913089">obtain the latest servicepack for MSSQL 2005 Server</a>. But as the package was included with the VMware bundle, applying a service pack to a not-yet-installed version of MSSQL 2005 Server did not seem like a sound option. However, their workaround worked like a charm, I even tried the <a href="http://support.microsoft.com/kb/968749">Fix it for me</a> thingy: a small executable had to be downloaded and some Microsoft magic is applied to the system. After doing this, vCenter Server could be installed just fine.<br/><br/>

Well, almost: the <a href="http://support.microsoft.com/kb/949977">%systemdrive%</a> was a bit low on space and the installation stopped when there was no more space. <a href="http://windirstat.info/">Windirstat</a> revealed that <code>%windir%\$hf_mig$</code> was pretty big, but should <a href="http://support.microsoft.com/kb/824994">not be deleted</a>. However, <i>moving</i> this directory to another drive should be OK. After doing that, a <a href="http://technet.microsoft.com/en-us/sysinternals/bb896768">junction</a> was <a href="http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/">created</a> to satisfy the old pathname. With that in place, the installation continued and the system seems fine so far. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?265" rel="alternate" title="Peer certificate cannot be authenticated with known CA certificates" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-09-06T14:50:13Z</published>
        <updated>2011-09-06T14:50:13Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=265</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=265</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?265</id>
        <title type="html">Peer certificate cannot be authenticated with known CA certificates</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, this <a href="https://thepiratebay.org">bittorrent site</a> switched to <a href="https://tools.ietf.org/html/rfc2818">HTTP Secure</a>. And in the name of <a href="https://www.eff.org/https-everywhere">HTTPS Everywhere</a> I praise them for that. Yet my beloved <a href="http://libtorrent.rakshasa.no/">rTorrent</a> client seems to have a problem with that:

<pre>
(15:17:33) Peer certificate cannot be authenticated with known CA certificates: 
    "https://torrents.thepiratebay.org/4224797/debian-slink-i386-binary.4224797.TPB.torrent"
</pre>

Which is strange, my browsers don't have a problem with that. But <a href="http://curl.haxx.se/">cURL</a> disagrees:

<pre>
$ curl -I https://torrents.thepiratebay.org/
  curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
</pre>

Hm, what up with that? The browser shows <code>"Equifax Secure Certificate Authority"</code> and there are indeed Equifax certificates in <code>/etc/ssl/certs</code>. But apparently not the correct ones:

<pre>
$ strace curl -I https://torrents.thepiratebay.org/ 2>&1 | grep etc/ssl
stat64("/etc/ssl/certs/2f2c2f7c.0", 0xbf8e2148) = -1 ENOENT (No such file or directory)
</pre>

So, <code>cURL</code> is looking for a certificate with the hash of <font color=red>2f2c2f7c</font>. Of course, we cannot construct the correct certificate just with that <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Cryptographic_hash_function">hash</a>. But we can <a href="http://lmgtfy.com/">search</a> for it :-)<br/><br/>

Looking around, we find something like <a href="http://www.ccsime.com/images/pwd/1.txt/proc/self/cwd/etc/pki/tls/certs/2f2c2f7c.0">this</a>. OK, the hash matches. But where's the certificate from? Searching a bit more brings us to <a href="http://thawte.testssl.net/geotrust_ca_rapid_ssl-english.html">"GeoTrust Intermediate CA Certificates for Rapid SSL"</a>. Extracting the <i>GeoTrust Rapid SSL Primary Intermediate CA Certificate</i> we can see:

<pre>
$ openssl x509 -hash -fingerprint -noout -in geotrust_ca_rapid_ssl.crt 
<font color=red>2f2c2f7c</font>
SHA1 Fingerprint=C0:39:A3:26:9E:E4:B8:E8:2D:00:C5:3F:A7:97:B5:A1:9E:83:6F:47
</pre>

The hash matches ;-) We'll now move it to our default certificate store and run <a href="http://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html">c_rehash</a> to generate the correct symlink:

<pre>
$ sudo mv geotrust_ca_rapid_ssl.crt /etc/ssl/certs/
$ sudo c_rehash /etc/ssl/certs
[...]
geotrust_ca_rapid_ssl.crt => 2f2c2f7c.0
</pre>

Now <code>cURL</code> works fine:

<pre>
$ curl -I https://torrents.thepiratebay.org/
HTTP/1.1 200 OK
Content-Type: text/html
ETag: "1070355883"
Last-Modified: Tue, 10 Nov 2009 11:25:43 GMT
Expires: Thu, 08 Sep 2011 11:22:36 GMT
Cache-Control: max-age=172800
Server: lighttpd
Content-Length: 5
Date: Tue, 06 Sep 2011 23:12:32 GMT
X-Varnish: 1297278148 1293045530
Age: 42648
Via: 1.1 varnish
Connection: keep-alive
</pre>


...and so does <code>rTorrent</code> :-)
<br/><br/>
However, the question remains how <a href="https://www.eff.org/observatory">trustworthy</a> this <i>GeoTrust Rapid SSL Primary Intermediate CA Certificate</i> really is. You may feel more comfortable to just <a href="http://blog.hokietux.net/?p=9">add the site's certificate</a> to the certificate store (and not the whole CA):

<pre>
$ echo | openssl s_client -connect www.thepiratebay.org:443 2>/dev/null | \
   sed -n '/BEGIN/,/END/p'  > tpb.crt
$ sudo mv tpb.crt /etc/ssl/certs
$ sudo c_rehash /etc/ssl/certs
</pre>
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?264" rel="alternate" title="Extended Attributes and ACLs on MacOS X" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-08-07T00:32:19Z</published>
        <updated>2011-08-07T00:32:19Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=264</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=264</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?264</id>
        <title type="html">Extended Attributes and ACLs on MacOS X</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                The <a href="http://nerdbynature.de/s9y/?155">last article</a> on this topic covered Linux systems, let's see how things are on MacOS X:<br/><br/>

<h3>EA - Extended attributes</h3><br/>

Extended attributes (arbitrary name/value pairs) are marked with an <font color="red">@</font> sign on the command line:

<pre>
$ ls -l .DS_Store 
-rw-------<font color="red">@</font>  1 bob  staff     24580 Aug  7 01:04 .DS_Store

$ <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/xattr.1.html">xattr</a> -l .DS_Store 
com.apple.FinderInfo:
00000000  20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00  |        ........|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

$ xattr -p com.apple.FinderInfo .DS_Store 
20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

$ xattr -d com.apple.FinderInfo .DS_Store 
</pre>

With the last command, we removed the extended attribute from the file. But there's more:<br/><br/>

<h3>ACLs - Access Control Lists</h3><br/>

With the EA removed, a plus-sign (<font color="red">+</font>) appears, marking <a href="http://docs.info.apple.com/article.html?path=ServerAdmin/10.5/en/c1fs4.html">Access Control Lists</a>. They can be shown with <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ls.1.html">ls(1)</a> and <a href="http://mostlyslow.blogspot.com/2009/04/technical-mac-os-x-permissions-issues.html">changed</a> with <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/chmod.1.html">chmod(1)</a>:

<pre>
$ ls -l .DS_Store 
-rw-------<font color="red">+</font> 1 bob  staff  24580 Aug  7 01:04 .DS_Store

$ ls -le .DS_Store 
-rw-------<font color="red">+</font> 1 bob  staff  24580 Aug  7 01:04 .DS_Store
 0: group:everyone deny delete
</pre>

Somehow this ACL <a href="https://discussions.apple.com/message/15866980#15866980">was set</a> for many (all?) files in my home directory and it was <a href="http://superuser.com/questions/313845/why-does-os-x-lion-ask-for-my-password-whenever-i-delete-a-file-in-my-home-direct">impossible to delete files</a> w/o entering the admin password first. Removing the ACL helped:

<pre>
$ rm -f .DS_Store
rm: .DS_Store: Permission denied

$ chmod -a "group:everyone deny delete" .DS_Store

$ ls -le .DS_Store
-rw-r--r--- 1 bob  staff  24580 Aug  7 01:04 .DS_Store
</pre>

Deleting this ACL from all objects in <code>$HOME</code> with <code>chmod -R</code> helped indeed and deleting files is now possible again, w/o being asked for a password. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?263" rel="alternate" title="Miroleak?" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-08-04T23:17:36Z</published>
        <updated>2011-08-04T23:17:36Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=263</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=263</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?263</id>
        <title type="html">Miroleak?</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Wow, <a href="http://www.getmiro.com/">Miro</a> needs a lot of memory, for holding ~20k of media files in its database:

<pre>
$ top -o rsize -U `whoami` -n 5 -l 1 | cut -c-90
[...]
PID   COMMAND         %CPU TIME     #TH #WQ #PORTS #MREGS RPRVT RSHRD RSIZE VPRVT VSIZE
<font color="red">755-  Miro            0.0  08:42.11 20  3   232+   1678+  727M+  63M+ 772M+ 780M+ 1641M+ </font>
592   firefox-bin     0.0  33:52.33 27  1   297+   1785+  316M+ 118M+ 529M+ 500M+ 3673M+
594   thunderbird-bin 0.0  04:09.21 27  1   218+    907+  176M+  87M+ 285M+ 273M+ 2839M+
668   firefox-bin     0.0  17:52.92 43  1   371+   1135+  146M+  92M+ 257M+ 400M+ 3603M+
<font color="red">1342- songbird        0.0  19:59.40 14  1   213+    984+   68M+  56M+ 147M+ 142M+  876M+</font>
</pre>

Indeed, <a href="http://getsongbird.com/">Songbird</a>, having indexed the very same directory is significantly lighter on memory requirements, at least in this particular case. Unfortunately, both are feeling rather sluggish, guess I'll have to look into <a href="http://mpg321.sourceforge.net/">mpg321</a> again :-\ 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?262" rel="alternate" title="Online backups with CrashPlan" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-08-01T00:21:30Z</published>
        <updated>2011-08-01T00:21:30Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=262</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=262</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?262</id>
        <title type="html">Online backups with CrashPlan</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                When I came across <a href="http://smyck.net/2011/07/10/evaluating-online-backup-services/">Evaluating Online Backup Services</a> the other day, I remembered that I looked into that <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Comparison_of_online_backup_services">topic</a> too a year ago or so. And I was surprised to see that the <i>finalists</i> were the same one as well. In alphabetical order:

<ul>
<li><a href="http://www.haystacksoftware.com/arq/">Arq</a> - unlimited storage, per-user encryption, their backup client costs $29, but then they're offering the <a href="http://sreitshamer.github.com/arq_restore/">restore client</a> for free. Also, data integrity seems to be one of their <a href="http://www.haystacksoftware.com/blog/2010/06/crashplan-restore-analysis/">key benefits</a></li>

<li><a href="http://www.backblaze.com/">Backblaze</a> - unlimited storage at an incredibly low price, per-user encryption but unfortunately no Linux client.</li>

<li><a href="http://support.crashplan.com">CrashPlan</a> - unlimited storage at an incredibly low price, per-user encryption and a Java client, which is good enough.</li>

<li><a href="https://www.jungledisk.com/">Jungle Disk</a> - unlimited storage, per-user encryption, Linux client, not sure about their <a href="http://www.daemonology.net/blog/2011-06-03-insecurity-in-the-jungle.html">security approach</a> though.</li>

<li><a href="https://spideroak.com/">SpiderOak</a> - per-user encryption, Linux client, <a href="https://spideroak.com/mobile">Android client coming soon</a>, but unfortunately no unlimited storage plans.</li>
</ul>

With unlimited storage and an able backup software and because I already had a trial account from last year, I went with CrashPlan. Since I did not want to backup from my workstation, I went for the <a href="http://support.crashplan.com/doku.php/how_to/configure_a_headless_client">headless client installation</a>, but with a few modifications.<br/><br/>

On this <a href="https://wiki.ubuntu.com/LucidLynx">Ubuntu 10.04</a> system (ia32), the <a href="http://www.oracle.com/technetwork/java/javase/downloads/">Java JRE</a> was already installed:

<pre>
$ dpkg -l | grep java
ii  java-common      0.34                     Base of all Java packages
ii  sun-java6-bin    6.24-1build0.10.04.1     Sun Java(TM) Runtime Environment (JRE) 6
ii  sun-java6-jre    6.24-1build0.10.04.1     Sun Java(TM) Runtime Environment (JRE) 6
</pre>

Also, we wanted to run CrashPlan as a different user:

<pre>
# useradd -d /opt/crashplan -m -s /bin/false crashplan
# id crashplan 
uid=1002(crashplan) gid=1002(crashplan) groups=1002(crashplan)

# su -s /bin/bash - crashplan 

$ tar -xzf /tmp/CrashPlan_3.0.3_Linux.tgz 
$ cd CrashPlan-install/
$ ./install.sh 
[....]
Would you like to start CrashPlanDesktop? (y/n) [y] <font color="red">n</font>
</pre>

Now that CrashPlan is installed (notice that we did not start the GUI), we'll fix a few permissions and file ownerships:

<pre>
cd /opt/crashplan
rm -rf .bash_history CrashPlan-install
chown -R root:root .
chmod 0750 .

mkdir tmp
chown :crashplan . 
chown -R crashplan:crashplan .crashplan
chown -R :crashplan log/ conf/  lang/ tmp/ cache/ manifest/
chmod -R g+rw       log/ conf/  lang/ tmp/ cache/ manifest/
</pre>

Almost done. A few quirks are still left:

<pre>
sed 's/TARGETDIR\/\${NAME}\.pid/TARGETDIR\/log\/\${NAME}\.pid/' \
               -i.bak bin/CrashPlanEngine 
sed 's/SRV_JAVA_OPTS=\"/&-Djava.io.tmpdir=\/opt\/crashplan\/tmp /' \
               -i.bak bin/run.conf
sed 's/FINE/WARNING/;s/INFO/WARNING/' \
               -i.bak conf/service.log.properties
</pre>

The first command makes sure the PID file gets written into <code>log/</code>, which is writable for our CrashPlan user. The second one fixes a <a href="https://crashplan.zendesk.com/entries/52448-crashplan-on-centos-5-throwing-java-exceptions">java exception</a> we got, because <code>/tmp</code> is mounted with <i><code>noexec</code></i> here. Finally, we reduce the <a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Level.html">loglevel</a>, so our logfiles are not getting spammed with debug information. You might want to postpone this change until things are up &amp; running.

With all that in place, we can start the CrashPlan <i>engine</i>:

<pre>
# su -s /bin/sh -c "/opt/crashplan/bin/CrashPlanEngine start" crashplan
</pre>

The engine will listen on <code>127.0.0.1:4243</code> - that's where our desktop client has to connect to. We'll use the desktop client <i>only</i> to configure and schedule the backups. The actual backup jobs will be run by the engine on the server and we can just close the desktop client at any time.

Enjoy! But make sure your <a href="http://blog.koehntopp.de/archives/1177-MySQL-fuer-Dummies-7.html">restores are working too!</a> :-)<br/><br/>

<b>Update:</b> Bonus points for extra <a href="http://www.urbandictionary.com/define.php?term=l33tness">leetness</a>: CrashPlan offers to <a href="http://support.crashplan.com/doku.php/feature/seed_service">ship your initial backup to them</a>. Incredibly useful for bigger backups! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?261" rel="alternate" title="Happy System Administrator Appreciation Day!" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-29T13:41:00Z</published>
        <updated>2011-07-29T13:41:00Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=261</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=261</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?261</id>
        <title type="html">Happy System Administrator Appreciation Day!</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
<a href="http://www.sysadminday.com"><img src="http://nerdbynature.de/s9y/uploads/thank-468x60.gif"  ALT="SysAdminDay"></a> 

<p><p>

<small>
Q: When is Sysadmin Day?<br/>
A: <a href="http://www.sysadminday.com/LastFridayOfJuly.html">Last Friday of July.</a>
</small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?260" rel="alternate" title="gnu/stubs-32.h: No such file or directory" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-27T11:03:34Z</published>
        <updated>2011-07-27T11:03:34Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=260</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=260</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?260</id>
        <title type="html">gnu/stubs-32.h: No such file or directory</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                While trying to compile for <a href="http://developer.intel.com/products/processor/manuals/index.htm">ia32</a> on <a href="http://arstechnica.com/old/content/2008/09/x86-64.ars">x86-64</a> system, this happened:

<pre>
$ gcc -m32 file.c -o file.exe
In file included from /usr/include/features.h:378,
                 from /usr/include/stdio.h:28,
                 from file.c:10:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
</pre>

Hm, let's see where to get <code>gnu/stubs-32.h</code> from:

<pre>
$ <a href="http://packages.debian.org/stable/apt-file">apt-file</a> search gnu/stubs-32.h
libc6-dev-i386: /usr/include/gnu/stubs-32.h
</pre>

However, installing <code>libc6-dev-i386</code> was not enough:

<pre>
$ gcc -m32 file.c -o file.exe
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libgcc.a \
                  when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libgcc.a \
                  when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
</pre>

Turns out we needed <a href="http://airs.com/ian/configure/configure_8.html">GCC Multilib</a> support:

<pre>
$ sudo apt-get install <a href="http://packages.debian.org/stable/gcc-multilib">gcc-multilib</a>
(installs gcc-multilib, depends on lib32gcc1 and libc6-dev-i386)

$ gcc -m32 file.c -o file.exe
$ file file.exe
file.exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), \
             dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?259" rel="alternate" title="Mediawiki &amp; SimpleSecurity" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-24T00:18:00Z</published>
        <updated>2011-07-24T00:18:00Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=259</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=259</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?259</id>
        <title type="html">Mediawiki &amp; SimpleSecurity</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                With the <a href="http://lists.wikimedia.org/pipermail/mediawiki-announce/2011-June/000101.html">latest release</a> of MediaWiki, the <a href="http://www.mediawiki.org/wiki/Extension:Simple_Security">SimpleSecurity</a> extension reveals a <a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=29960">really nasty bug</a>: with every request to an article page, the <code>php-cgi</code> process handling the request would allocate as much memory as possible (until it hits the configured <a href="http://php.net/manual/en/ini.core.php#ini.memory-limit">memory-limit</a>. With multiple requests to the site, the machine begins to swap very heavily and will run out of memory eventually.<br/><br/>
In the meantime I decided to disable the extension via <a href="http://www.mediawiki.org/wiki/Manual:LocalSettings.php">LocalSettings.php</a>, but how to protect all the articles ''SimpleSecurity'' was supposed to protect? Luckily it weren't that many articles with read restrictions and most of them were <a href="http://www.mediawiki.org/wiki/Help:Categories">categorized</a> too. Instead of protecting these articles on the Wiki-layer, the webserver now has to handle that task. Since we're running <a href="http://redmine.lighttpd.net/wiki/lighttpd">lighttpd</a>, the following directives were added to the configuration:

<pre>
  $HTTP["url"] =~ "^/phpmyadmin|<font color="blue">^/wiki/(Category|Special|User)</font>" {
     auth.require = ( "" => 
         ("method" => "digest", "realm" => "Restricted", "require" => "valid-user"))
  }
</pre>

However, that alone would not protect from calling articles via <code>index.php?title=Special</code>. I was surpised to see that Lighttpd can match on the <a href="http://redmine.lighttpd.net/wiki/lighttpd/Docs:Configuration#Conditional-Configuration">querystring</a> too:

<pre>
  $HTTP["querystring"] =~ "title\=<font color="blue">(Category|Special|User)</font>" { ...
</pre>

It's not as nice as the <code>SimpleSecurity</code> configuration and one needs to restart the webserver for every change of the protected sites, but as long as <a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=29960">#29960</a> is not fixed, that could be the only way to go here. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?257" rel="alternate" title="MacOS X Lion Boot Disc" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-23T14:50:07Z</published>
        <updated>2011-07-23T14:50:07Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=257</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=257</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?257</id>
        <title type="html">MacOS X Lion Boot Disc</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, apparently <a href="http://www.apple.com/pr/library/2011/07/20Mac-OS-X-Lion-Available-Today-From-the-Mac-App-Store.html">MacOS X Lion has been released</a> and it's (currently) <a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/2#installation">only available via an AppStore download</a> which allows for an in-place upgrade from a running MacOS X Snow Leopard system to the newest one. While this may be the way to go in 2011, I still wanted to be able to <a href="http://eggfreckles.net/tech/burning-a-lion-boot-disc/">boot from an optical medium</a> - just in case. Here is how I did it:<br/><br/>

Use <a href="http://www.apple.com/mac/app-store/">AppStore</a> to download the <i>Mac OS X Lion installer</i>. Unfortunately on this particular system the AppStore would freeze after clicking on the <i>Buy!</i> button in the AppStore. A <a href="https://discussions.apple.com/message/15431640#15431640">workaround</a> suggested to enable <a href="http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/MetadataIntro/MetadataIntro.html">Spotlight</a>. Indeed, Spotlight was disabled on this system, because I don't need/use it. But how to enable it again?

<pre>
  # mdutil -E /Applications
  Spotlight server is disabled.
</pre>

Hm. Where is that magic <code>.plist</code> file again, to enable Spotlight again again? Ah, <a href="http://forums.macrumors.com/showthread.php?p=8529033#post8529033">here</a> it is:

<pre>
  # launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
</pre>

Now that Spotlight was enabled, I tried again. After clicking the <i>Buy!</i> button again, AppStore would not freeze/hang but instead come up with an error message now:

<pre>
  Your request is temporarily unable to be processed. Please try again later.
</pre>

Trying again (later) did not help, searching the <a href="https://discussions.apple.com/message/12203614#12203614
">interwebs</a> did:

<pre>
  On the iTunes toolbar click Store and then click Authorize this computer.
</pre>

After doing that and a bit of fiddling around with iTunes, agreeing to the <a href="http://www.apple.com/legal/itunes/us/terms.html">iTunes Terms &amp; Conditions</a> and restarting AppStore, it would finally start to download the MacOS X Lion installer. But where to? <a href="https://trac.macports.org/browser/trunk/dports/net/iftop/Portfile">iftop</a> revealed that Port <code>:53218</code> was busy downloading data via HTTP: 

<pre>
  # <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/lsof.8.html">lsof</a> -li :53218
  COMMAND  PID  NODE NAME
  storeagen 2126  TCP local:53218->[...].akamaitechnologies.com:http (ESTABLISHED)

  # lsof -ln -p 2126 | sort -nk7 | tail -3
  storeagen 2126 [...] /private/var/db/dyld/dyld_shared_cache_x86_64
  storeagen 2126 [...] ../Library/Application Support/AppStore/444303913/mzm.stuhjljp.pkg
  storeagen 2126 [...] ../Library/Application Support/AppStore/444303913/mzm.stuhjljp.pkg

  # xar -t -f ../mzm.stuhjljp.pkg  | grep dmg
  InstallMacOSX.pkg/InstallESD.dmg
</pre>

Ah, there it is :-)<br/><br/>

After the download has completed, we can just follow the <a href="http://eggfreckles.net/tech/burning-a-lion-boot-disc/">initial instructions</a> and burn the <code>InstallESD.dmg</code> on a DVD via <code>Disk Utility</code>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?256" rel="alternate" title="mount: warning: /mnt seems to be mounted read-write" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-13T14:36:21Z</published>
        <updated>2011-07-13T14:36:21Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=256</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=256</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?256</id>
        <title type="html">mount: warning: /mnt seems to be mounted read-write</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                When trying to create <a href="http://lwn.net/Articles/281157/">readonly bind-mounts</a>, this happens:

<pre>
$ mkdir a b
$ mount -o bind,ro a b
<font color="blue">mount: warning: b seems to be mounted read-write.</font>
$ touch b/1
$ mount -o remount,ro b
$ touch b/2
touch: cannot touch `b/2': Read-only file system
</pre>

This is even documented in the <a href="http://manpages.ubuntu.com/manpages/oneiric/man8/mount.8.html">manpage</a>:

<pre>
   Note that the filesystem mount options will remain the same as those on the 
   original mount point, and cannot be changed by passing the -o option along 
   with --bind/--rbind. The mount options can be changed by a separate remount 
   command, for example:

        mount --bind olddir newdir
        mount -o remount,ro newdir
</pre>

Interestingly enough, <a href="https://www.kernel.org/doc/man-pages/online/pages/man2/mount.2.html">mount(2)</a> states:

<pre>
    Up until Linux 2.6.26, mountflags was also ignored (the bind mount has the
    same mount options as the underlying mount point).  Since Linux <a href="https://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.26">2.6.26</a>, 
    the MS_RDONLY flag is honored when making a bind mount.
</pre>

FWIW, let's see how other systems handle that:

<ul>
<li>NetBSD handles this via its <a href="http://netbsd.gw.com/cgi-bin/man-cgi?mount_null">mount_null</a> filesystem and gets the dupicated subtree <i>readonly</i> right away:

<pre>
$ mkdir /mnt/a /mnt/b
$ mount -t null -o ro /mnt/a /mnt/b
$ touch /mnt/b/1
touch: /mnt/b/1: Read-only file system
$ touch /mnt/a/2
$ ls -l /mnt/b/<strong>
-rw-r--r--  1 root  wheel  0 Jul 13 15:57 /mnt/b/2
</pre></li>

<li>Same for FreeBSD, only here it's called <a href="http://www.freebsd.org/cgi/man.cgi?query=mount_nullfs&sektion=8">mount_nullfs</a>.</li><br/>

<li>OpenBSD <a href="http://www.mail-archive.com/misc@openbsd.org/msg101673.html">removed</a> <code>mount_nullfs</code> <a href="http://www.openbsd.org/cgi-bin/cvsweb/src/sys/miscfs/nullfs/Attic/">years ago</a>.</li><br/>

<li>Solaris has <a href="http://download.oracle.com/docs/cd/E19963-01/html/821-1475/lofs-7fs.html">lofs(7FS)</a>:
<pre>
$ mkdir /mnt/a /mnt/b
$ mount -F lofs -o ro /mnt/a /mnt/b
$ touch /mnt/b/1
touch: cannot create /mnt/b/1: Read-only file system
$ touch /mnt/a/2
$ ls -l /mnt/b/</strong>
-rw-r--r--   1 root  root   0 Jul 13 16:53 /mnt/b/2
</pre></li> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?255" rel="alternate" title="Oh no, IPv6!" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-06T19:11:02Z</published>
        <updated>2011-07-06T19:11:02Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=255</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=255</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?255</id>
        <title type="html">Oh no, IPv6!</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Now that <a href="http://nerdbynature.de/s9y/?254">IPv6 is up &amp; running</a>, several things are not though:<br/>

<ul>
<li>OpenSSL <a href="http://rt.openssl.org/Ticket/Display.html?id=2051">lacks IPv6 support</a>, despite a <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589520">patch</a> being available <a href="http://www.sixxs.net/forum/?msg=apps-4979877">for some time</a> now. But <a href="https://www.gnu.org/software/gnutls/">GnuTLS</a> can do it:

<pre>
   $ echo | gnutls-cli -p 443 ipv6.google.com
   Resolving 'ipv6.google.com'...
   Connecting to '2001:4860:4001:803::1011:443'...
   - Certificate type: X.509
   [...]
</pre>
</li>


<li>Most of the <a href="http://www.debian.org/mirror/mirrors_full">Debian mirrors</a> are <i>not</i> reachable via IPv6. Wow. Not even <a href="https://www.kernel.org/">kernel.org</a> <small>(except for a few hours on <a href="http://www.worldipv6day.org/">IPv6 Day</a>)</small>. I remember many of the <a href="http://netbsd.org/mirrors/">NetBSD mirrors</a> are IPv6-ready.</li>

<li>With that in place, <a href="https://wiki.debian.org/Apt">apt-get</a> is of course unable to complete its task. And even with an IPv6 enabled mirror in place, <code>security.(ipv6.)debian.org</code> <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620222">seems to be unreachable from</a> time to time, like <i>today</i>. And apparently there's <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611891">no way</a> to tell <code>apt-get</code> to stick to IPv4 for now. One can set a <a href="http://www.funtoo.org/wiki/IPv6_Networking#Prefer_IPv4_over_IPv6">sitewide preference</a> though and even <a href="http://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method">prefer IPv6 for specific hosts only</a> via <a href="http://lwn.net/Articles/426009/">/etc/gai.conf</a>.</li>
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?254" rel="alternate" title="Go, go, IPv6!" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-06T01:51:36Z</published>
        <updated>2011-07-06T01:51:36Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=254</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=254</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?254</id>
        <title type="html">Go, go, IPv6!</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="http://www.heise.de/-1260260">This article</a> reminded me that I'm still (!) not connected to IPv6. While waiting for my <a href="https://www.sixxs.net/">SixXS</a> account, I tried with <a href="http://gogonet.gogo6.com/page/freenet6-account">GoGo6</a> <small>(formerly known as <a href="http://gogoware.gogo6.com/4105/news_details.asp?news_id=142&intpage=">Hexago</a></small>):

<pre>
$ apt-get install gogoc
$ cat /etc/gogoc/gogoc.conf
[...]
userid=foo
passwd=bar
server=authenticated.freenet6.net
auth_method=any
if_prefix=eth0
log_file=1
log_rotation_size=1024

$ /etc/init.d/gogoc start 
Starting IPv6 TSP Client: gogoc
Not starting gogoc - no server key ... (warning).
</pre>

After a bit of <a href="http://forfunky.tumblr.com/post/6316242580/ipv6-on-ubuntu-maverick-10-10">searching</a> it turned out to be a missing server key. Since we never connected to any Freenet6 server, we don't have any keys. The quick solution is to disable the keyfile check:

<pre>
$ grep ^[A-Z] /etc/default/gogoc 
CHECK_KEYFILE="no"
</pre>

However, <tt>gogoc</tt> still would not work. Well, the process was <i>running</i>, spinning wildly in fact - but not setting up a IPv6 tunnel. What was going on?

<pre>
$ strace -p `pgrep gogoc` 2>&1 | grep -v read
write(1, "(Y/N) montreal.freenet6.net is a"..., 4096) = 4096
write(1, "freenet6.net is an unknown host,"..., 4096) = 4096
write(1, " an unknown host, do you want to"..., 4096) = 4096
write(1, "t, do you want to add its key?? "..., 4096) = 4096
</pre>

Apparently there's a public key needed too:

<pre>
$ gogoc -n
montreal.freenet6.net is an unknown host, do you want to add its key?? (Y/N) Y

$ ls -lgo /var/lib/gogoc/gogockeys.pub 
-rw-r----- 1 607 Jul  5 19:55 /var/lib/gogoc/gogockeys.pub
</pre>

With that in place<sup>*</sup>, <tt>gogoc</tt> was running just fine and IPv6 connectivity was established - yay :-)<br/><br/>

<small><sup>*</sup><a href="http://redmine.lighttpd.net/wiki/lighttpd/IPv6-Config">and a few more tweaks for the webserver</a> </small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?253" rel="alternate" title="This is Why I'll Never be an Adult" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-05T22:50:28Z</published>
        <updated>2011-07-05T22:50:28Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=253</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=253</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?253</id>
        <title type="html">This is Why I'll Never be an Adult</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <br/>
Have a read: <a href="http://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html">This is Why I'll Never be an Adult</a><br/><br/>

<small>(Thanks, <a href="http://www.youtube.com/watch?v=QzLPsgfOzXs">Allie</a>!)</small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?252" rel="alternate" title="Skype upgrade: free Google Chrome offer" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-04T17:59:57Z</published>
        <updated>2011-07-04T17:59:57Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=252</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=252</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?252</id>
        <title type="html">Skype upgrade: free Google Chrome offer</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                LOL, even 2 month's after <a href="https://www.microsoft.com/Presspass/press/2011/may11/05-10CorpNewsPR.mspx">Microsoft's acquisition of Skype</a>, they still offer <a href="http://chrome.blogspot.com/">Google Chrome</a>:<br/><br/>

<img src="http://nerdbynature.de/s9y/uploads/skype-chrome.jpg" alt="Skype upgrade: free Google Chrome offer"/> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?251" rel="alternate" title="gzip vs. pigz vs. bzip2 vs. pbzip2" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-07-01T15:22:09Z</published>
        <updated>2011-07-01T15:22:09Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=251</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=251</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/2-benchmarks" label="benchmarks" term="benchmarks" />
    
        <id>http://nerdbynature.de/s9y/?251</id>
        <title type="html">gzip vs. pigz vs. bzip2 vs. pbzip2</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Shortly after the last <a href="http://nerdbynature.de/s9y/?239">benchmark</a>, I came across <a href="http://www.zlib.net/pigz/">pigz</a> (parallel gzip) and a bigger (real-world) task to complete:

<pre>
$ time gzip -c file.tar > file.tar
real     41m52.636s
user     33m58.392s
sys       2m26.903s

$ time pigz -c file.tar > file.tar.pigz
real     18m34.894s
user     54m07.784s
sys       3m47.910s

$ time bzip2 -c file.tar > file.tar.bz2
real    838m47.771s
user    830m48.621s
sys       2m18.429s

$ time pbzip2 -c file.tar > file.tar.pbz2
real     58m06.466s
user   1748m17.785s
sys       4m49.537s

$ ls -lhgo
-rw-r--r--   1  15G Jun 24 02:03 file.tar
-rw-r--r--   1 598M Jun 24 22:10 file.tar.gz
-rw-r--r--   1 600M Jun 24 21:02 file.tar.pigz
-rw-r--r--   1 304M Jun 25 12:44 file.tar.bz2
-rw-r--r--   1 306M Jun 25 13:42 file.tar.pbz2
</pre>

<small>Hardware: <a href="http://www.oracle.com/us/products/servers-storage/servers/sparc-enterprise/t-series/031579.htm">Sun SPARC Enterprise T5120</a>, 1.2GHz 8-Core SPARC V9, 4GB RAM</small> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?250" rel="alternate" title="autossh &amp; expect" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-06-30T15:29:12Z</published>
        <updated>2011-06-30T15:29:12Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=250</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=250</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?250</id>
        <title type="html">autossh &amp; expect</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Hah! Don't try <a href="http://netkiller.sourceforge.net/zh-tw/shell/ch08.html">this</a> at <s>home</s> work, kids:

<pre>
$ cat otp.txt 
123456
234567
345678

$ cat autossh.exp
#!/usr/bin/<a href="http://www.nist.gov/el/msid/expect.cfm">expect</a> -f
set ipaddress [lindex $argv 0]
set password [lindex $argv 1]
set command [lindex $argv 2]
set timeout 30
spawn ssh <font color="green">-L 1234:localhost:80 -N</font> $ipaddress
expect {
        "yes/no"    { send "yes\r"; exp_continue }
        "password:" { send "$password\r" }
}
expect ""
# send "$command \r"
# send "exit\r"
 
expect eof
exit

$ cat otp.txt | while read p; do <font color="green">./autossh.exp bob@ssh.example.com $p</font>; done
</pre>

Yes, <a href="https://hkn.eecs.berkeley.edu/~dhsu/ssh_public_key_howto.html">public key authentication</a> would be the way to go. But when used in combination with a (known) one-time password list, the above does the trick. No, I'm not actually <i>using</i> this and <b>neither should you!</b> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?247" rel="alternate" title="Fedora 15" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-06-16T00:43:53Z</published>
        <updated>2011-06-16T00:43:53Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=247</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=247</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?247</id>
        <title type="html">Fedora 15</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Ready for <a href="http://nerdbynature.de/s9y/?233">yet another rant</a>? If not, please skip this one. Fedora 15 has been <a href="https://fedoraproject.org/wiki/Releases/15">released</a> in late May 2011 so I upgraded my Alpha installation, let's see what we've got:

<ul>
<li>Sound <a href="https://bugzilla.redhat.com/show_bug.cgi?id=590907">does work now on this MacBookPro</a>, if the speakers are unmuted:
<pre>
$ grep amixer /etc/rc.local 
/usr/bin/amixer -c 0 set 'Surround Speaker' 115 unmute
/usr/bin/amixer -c 0 set 'Front Speaker' 115 unmute
/usr/bin/amixer -c 0 set 'Surround Speaker Playback Volum' 115 unmute
</pre>
</li><br/>

<li><a href="https://fedoraproject.org/wiki/Features/ABRT">abrt</a> is still <a href="https://bugzilla.redhat.com/show_bug.cgi?id=692064">unusable</a> - how are people supposed to report bugs when the bugreporting tool is not working?</li><br/>

<li>Since <a href="http://live.gnome.org/Empathy/FAQ#Will_Empathy_have_OTR_.28.22Off_The_Record.22.29_support.3F">Empathy</a> <a href="https://bugs.launchpad.net/empathy/+bug/296867">won't</a> support OTR</a>, trying to install <a href="http://pidgin.im/">Pidgin</a> seemed the logical alternative. Not so on Fedora&#160;15:
<pre>
$ yum install pidgin-otr
---> Package pidgin-otr.x86_64 0:3.2.0-4.fc15 will be installed
--> Processing Dependency: pidgin >= 2.0.0 for package: pidgin-otr-3.2.0-4.fc15.x86_64
--> Processing Dependency: libotr >= 3.2.0 for package: pidgin-otr-3.2.0-4.fc15.x86_64
--> Processing Dependency: libotr.so.2()(64bit) for package: 
                                  pidgin-otr-3.2.0-4.fc15.x86_64
--> Running transaction check
---> Package libotr.x86_64 0:3.2.0-6.fc15 will be installed
---> Package pidgin.x86_64 0:2.7.11-2.fc15 will be installed
--> Processing Dependency: libpurple(x86-64) = 2.7.11-2.fc15 for package:
                                  pidgin-2.7.11-2.fc15.x86_64
--> Finished Dependency Resolution
Error: Package: pidgin-2.7.11-2.fc15.x86_64 (fedora)
           Requires: libpurple(x86-64) = 2.7.11-2.fc15
           Installed: libpurple-2.8.0-1.fc15.x86_64 (@updates-testing)
               libpurple(x86-64) = 2.8.0-1.fc15
           Available: libpurple-2.7.11-2.fc15.x86_64 (fedora)
               libpurple(x86-64) = 2.7.11-2.fc15
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
</pre> (Bugreport pending)</li><br/>

<li><a href="http://fedoraproject.org/wiki/Features/Gvfs">gvfs</a> is killing me. It <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544148">needlessly consumes resouces</a> <small>(also: try running <code>du -sh *</code> in your home directory when you accidently browsed some larger SMB share)</small> and one cannot really remove it w/o removing all the depending packages too. I was able to remove <code>gvfs-smb</code> and <code>gvfs-gphoto2</code>, let's see if this helps.</li><br/>

<li>Talking about <i>resources</i>, this is on a freshly installed Fedora 15:
<pre>
$ mount | awk '{print $5}' | sort | uniq -c | sort -n
      1 binfmt_misc
      1 debugfs
      1 devpts
      1 devtmpfs
      1 fusectl
      1 hugetlbfs
      1 mqueue
      1 proc
      1 rpc_pipefs
      1 securityfs
      1 selinuxfs
      1 sysfs
      1 vfat
      3 ext4
      5 autofs
      7 tmpfs
     11 cgroup
</pre>

Yes, that's <i>eleven</i> <a href="http://lwn.net/Articles/256389/">cgroup</a> filesystems! And with all the other devices mounted all over the place <small>(<code>/dev/sda4</code> mounted in 3 different places? <code>debugfs</code>, what for? <code>hugetlbfs</code>, on a desktop machine - really?)</small> the output of <code>mount(8)</code> just isn't useful any more.</li><br/>

<li>Another thing: wasn't there a <a href="http://fedoraproject.org/wiki/Features/20SecondStartup">20SecondStartup</a> project? Oh, it's 100% completed? Hm, my system must be too slow then, it takes over a minute until the login screen appears. Pressing <a href="http://en.wikipedia.org/wiki/Esc_key">ESC</a> during startup reveals <i>a lot</i> of daemons starting up. Let's help ourselves:

<pre>
for i in cups dnsmasq ebtables fcoe iscsi iscsid livesys livesys-late lldpad \
            lvm2-monitor mdmonitor sandbox; do echo $i &&amp; chkconfig "$i" off
done
</pre></li><br/>

<li>Oh, we're such a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=178879">professional</a> distribution - let's <a href="http://www.sudo.ws/pipermail/sudo-users/2000-August/000313.html">not allow</a> our users to be <a href="http://www.sudo.ws/repos/sudo/file/190683bac878/ins_classic.h">insulted.</li><br/>

<li>Ever since <a href="http://yum.baseurl.org/">YUM</a> had been introduced, I found it <i>very</i> <a href="http://illiterat.livejournal.com/5043.html">slow</a> compared to <a href="http://rpm.org/">RPM</a> or <a href="http://wiki.debian.org/Apt">APT</a>. And even today, it still is:

<pre>
$ time apt-cache search . | wc -l
28031

real    0m1.548s
user    0m0.892s
sys     0m0.124s

$ time yum --cacheonly --debuglevel 3 list available | grep time:
Config time: 0.210
pkgsack time: 1.460
rpmdb time: 0.000

real    0m22.277s
user    0m17.956s
sys     0m2.957s
</pre>

Note: there are 28031 packages on this Debian/5.0 machine <small>(PowerPC G4)</small> and 23929 packages on that Fedora 15 <small>(MacBookPro)</small> machine - and <code>yum(8)</code>, even <a href="http://fedorasolved.org/Members/zcat/yum-rpm-faq">w/o updating its caches</a> is still ~20 times <a href="http://skvidal.wordpress.com/2008/07/01/got-a-slow-yum-operation/">slower</a>. Other operations are also much slower and bring the system to its knees. Upgrading from Fedora 15 -alpha to -final while watching a movie? Good luck... It's pathetic watching this system thrashing while yum is "working" :-\
</pre></li><br/>

That's it for now. Missing bug reports are pending, stay tuned.<br/><br/>

Why do I still put up with Fedora then? I'm still in need of a <i>desktop</i> operating system for this MacBookPro (which is an unfriendly beast to open source software, considering their hardware choices). And Fedora <i>felt</i> like the most mature desktop OS once, but maybe this has changed somehow.... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?246" rel="alternate" title="The specified service has been marked for deletion" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-06-11T12:11:00Z</published>
        <updated>2011-06-11T12:11:00Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=246</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=246</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?246</id>
        <title type="html">The specified service has been marked for deletion</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                While trying to install <a href="https://code.google.com/p/eventlog-to-syslog/">eventlog-to-syslog</a> on WindowsXP, one has to register <code>evtsys.exe</code> as a service (<code>"Eventlog to Syslog"</code>). Playing around with that a bit, <a href="http://support.microsoft.com/kb/823942">this</a> happened when trying to <i>uninstall</i> the service:

<pre>
> sc stop evtsys
> sc delete evtsys
The specified service has been marked for deletion.
</pre>

Why yes indeed, it <i>had</i> been marked for deletion - but the <a href="http://projectdream.org/wordpress/2007/05/30/the-specified-service-has-been-marked-for-deletion/"><code>services.msc</code> window was still open</a> and the service could not be uninstalled properly the first time (sigh....). Closing the <code>services.msc</code> window might help; sometimes removing all the leftovers in the <a href="http://support.microsoft.com/kb/256986">registry</a> does the trick. But sometimes only a reboot will resolve this - as usual :-\ 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?245" rel="alternate" title="be_get_uuid: failed to get uuid property from BE root dataset user properties." />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-05-31T15:55:20Z</published>
        <updated>2011-05-31T15:55:20Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=245</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=245</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?245</id>
        <title type="html">be_get_uuid: failed to get uuid property from BE root dataset user properties.</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, there's this old <a href="http://opensolaris.org/jive/thread.jspa?threadID=99410">OpenSolaris 111b</a> installation, desperately needing an upgrade. But <a href="http://hub.opensolaris.org/bin/view/Project+pkg/WebHome">pkg(5)</a> (<a href="http://download.oracle.com/docs/cd/E19253-01/816-5175/6mbba7eu5/index.html">sic!</a>) fails to complete:

<pre>
# BE_PRINT_ERR=true pkg image-update -v
Retrieving catalog 'opensolaris.org'... 
Loading catalog cache ... 
Refreshing catalog 
Refreshing catalog 1/1 opensolaris.org 
Creating Plan 
[....]
be_get_uuid: failed to get uuid property from BE root dataset user properties.
pkg: image-update cannot be done on live image
</pre>

This has been partly covered in <a href="https://defect.opensolaris.org/bz/show_bug.cgi?id=7877">#7877</a> and <a href="https://defect.opensolaris.org/bz/show_bug.cgi?id=8313">#8313</a> and apparently been <a href="http://www.opensolaris.org/jive/message.jspa?messageID=478848#478848">fixed</a> but on this very system a newer version of <a href="http://pkg.opensolaris.org/release/en/search.shtml?token=SUNWbeadm&action=Search">SUNWbeadm</a> cannot be installed - for the very reason that <code>pkg image-update</code> is not working. Installing just <code>SUNWbeadm</code> was not possible either, because it'd <a href="http://mail.opensolaris.org/pipermail/pkg-discuss/2009-July/015792.html">clash with <code>max_version</code> in pkg:/entire</a>.<br/><br/>

So, where to go from here? Installing the whole OS from scratch would be the easiest choice, I suppose. But also the least interesting. Let's download a <a href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/beadm/">newer copy of <code>beadm</code></a> (or grab the scripts from a more current system), compile <a href="http://www.python.org/download/releases/2.6/">Python2.6</a> and try again, shall we? Stay tuned.... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?244" rel="alternate" title="Today's linkdump" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-05-31T15:23:51Z</published>
        <updated>2011-05-31T15:23:51Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=244</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=244</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/1-The-other-Europe" label="The other Europe" term="The other Europe" />
    
        <id>http://nerdbynature.de/s9y/?244</id>
        <title type="html">Today's linkdump</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Look! Pictures!

<ul>
<li><a href="http://midoriblues.tumblr.com/post/6042619069/suicide-magnet">The Golden Gate Bridge is the world's No. 1 suicide magnet</a></li>
<li><a href="http://umgatodeitadoaosol.tumblr.com/post/5250989456/where-children-sleep-by-james-mollison">James Mollison: Where Children Sleep</a></li>
<li><a href="http://umgatodeitadoaosol.tumblr.com/post/5778815000/everythingsuchas-wtf-is-wrong-with-people">WTF is wrong with people!</a> Yes, what <i>is</i> wrong with <a href="http://www.seashepherd.org/news-and-media/news-100720-1.html">them</a>?</li>
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://nerdbynature.de/s9y/?243" rel="alternate" title="git: fatal: invalid reference: foo" />
        <author>
            <name>christian</name>
                    </author>
    
        <published>2011-05-31T15:01:03Z</published>
        <updated>2011-05-31T15:01:03Z</updated>
        <wfw:comment>http://nerdbynature.de/s9y/wfwcomment.php?cid=243</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://nerdbynature.de/s9y/rss.php?version=atom1.0&amp;type=comments&amp;cid=243</wfw:commentRss>
    
            <category scheme="http://nerdbynature.de/s9y/categories/3-bits" label="bits" term="bits" />
    
        <id>http://nerdbynature.de/s9y/?243</id>
        <title type="html">git: fatal: invalid reference: foo</title>
        <content type="xhtml" xml:base="http://nerdbynature.de/s9y/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Today, <a href="http://git-scm.com/">git</a> barfed with:

<pre>
$ git bisect start
fatal: invalid reference: b
</pre>

Huh? What is <code>"reference b"</code>, what is <i>git</i> trying to tell me here? Pondering on this a bit more I remembered that I once created a branch named <code>"b"</code>. But that was quite some time ago and <code>git branch -a</code> did not show the branch either. And <code>bit reset --hard</code> did not help. Grrr. There was a <a href="http://permalink.gmane.org/gmane.comp.version-control.git/158718">patch</a> floating around dealing with this issue, but AFAICT it "only" made the error message more verbose. So I felt lucky and did:

<pre>
$ egrep -rl 'b$' .git | grep -v objects
.git/logs/HEAD
.git/index
.git/BISECT_START
</pre>

And indeed, there were those old <code>BISECT_*</code> files, which must have been from an old <a href="https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#using-bisect">git bisect</a> run. Removing the <code>.git/BISECT_*</code> did the trick and now we're in the middle of <a href="https://lkml.org/lkml/2011/5/31/514">yet another bisect</a> - oh jolly :-\ 
            </div>
        </content>
        
    </entry>

</feed>
