<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Timberline.se</title>
	<atom:link href="http://www.timberline.se/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.timberline.se</link>
	<description>Troubleshooting, programming and more!</description>
	<lastBuildDate>Wed, 18 Aug 2010 20:14:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DRDY ERR and ICRC ABRT with VIA VT6421 SATA controller</title>
		<link>http://www.timberline.se/?p=33</link>
		<comments>http://www.timberline.se/?p=33#comments</comments>
		<pubDate>Fri, 23 Jul 2010 10:08:30 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=33</guid>
		<description><![CDATA[01:07.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)
A Samsung F3 1TB drive connected to my PCI SATA controller started giving me the followed error messages as soon as I had a drive connected.
[125192.884053] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[125192.900395] ata6.00: configured for UDMA/33
[125192.900414] ata6: EH complete
[125192.949404] [...]]]></description>
			<content:encoded><![CDATA[<p><code>01:07.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)</code></p>
<p>A Samsung F3 1TB drive connected to my PCI SATA controller started giving me the followed error messages as soon as I had a drive connected.</p>
<p><code>[125192.884053] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)<br />
[125192.900395] ata6.00: configured for UDMA/33<br />
[125192.900414] ata6: EH complete<br />
[125192.949404] ata6.00: exception Emask 0x12 SAct 0x0 SErr 0x1000500 action 0x6<br />
[125192.952120] ata6.00: BMDMA stat 0x5<br />
[125192.954609] ata6: SError: { UnrecovData Proto TrStaTrns }<br />
[125192.957046] ata6.00: failed command: READ DMA EXT<br />
[125192.959455] ata6.00: cmd 25/00:00:84:cd:ba/00:01:3e:00:00/e0 tag 0 dma 131072 in<br />
[125192.959457]          res 51/84:84:00:00:00/84:ce:00:00:00/e0 Emask 0x12 (ATA bus error)<br />
[125192.964388] ata6.00: status: { DRDY ERR }<br />
[125192.966883] ata6.00: error: { ICRC ABRT }<br />
[125192.969389] ata6: hard resetting link<br />
[125193.288054] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)<br />
[125193.304393] ata6.00: configured for UDMA/33</code></p>
<p>The solution? I downloaded the latest stable kernel: <a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.bz2">2.6.34.1</a></p>
<p><strong>Update: The fix is now in the latest Debian squeeze kernel (linux-image-2.6.32-5-686 2.6.32-18), so I&#8217;m using the official Debian kernels once again. The following instructions could still be helpful if you want to compile a custom kernel on Debian.</strong></p>
<p>Then I unpacked the file. To make the new kernel fit into my existing system, I copied the latest kernel configuration from /boot.<br />
<code># cp /boot/config-2.6.32-5-686 .config</code></p>
<p>Using the old config, I ran the kernel configuration to make sure everything looked OK.<br />
<code># make menuconfig</code></p>
<p>And finally, I compiled and installed the new kernel as a Debian package.<br />
<code># make deb-pkg<br />
# dpkg -i ../linux-image-2.6.34.1_2.6.34.1-1_i386.deb<br />
</code></p>
<p>It seems the newer kernel has a better driver for this particular controller. Now, the error messages are gone and some problems with disk speed I experienced earlier are gone.</p>
<p>Note: I had to do this two times. I use zfs-fuse, and when I changed to the new kernel I was told my pool was corrupted, even though I have two mirrored disks. When I changed back to the older kernel, I could reach them again. The second time, I exported the pool, changed the kernel and then imported the pool again.</p>
<p><strong># zpool export tank<br />
(boot with new kernel)<br />
# zpool import tank</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unsupported character set &#8220;iso-8859-1&#8243;! when printing with CUPS/Samba</title>
		<link>http://www.timberline.se/?p=30</link>
		<comments>http://www.timberline.se/?p=30#comments</comments>
		<pubDate>Thu, 15 Apr 2010 19:34:45 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=30</guid>
		<description><![CDATA[My printer stopped working. It seems this is common when using an old Debian etch install with ISO 8859-1 and then upgrading to Lenny, since the new version of Cups only supports UTF-8. I tried changing my system locale, but that didn&#8217;t work. A solution was found by googling: Simply add &#8220;display charset = UTF8&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>My printer stopped working. It seems this is common when using an old Debian etch install with ISO 8859-1 and then upgrading to Lenny, since the new version of Cups only supports UTF-8. I tried changing my system locale, but that didn&#8217;t work. <a href="http://ubuntuforums.org/showthread.php?t=896931">A solution</a> was found by googling: Simply add &#8220;display charset = UTF8&#8243; to the &#8220;[globals]&#8221; section in /etc/samba/smb.conf.</p>
<p>Big thanks to kevmitch at the Ubuntu forums who posted the solution!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High-resolution time measurement in Linux</title>
		<link>http://www.timberline.se/?p=20</link>
		<comments>http://www.timberline.se/?p=20#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:51:25 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=20</guid>
		<description><![CDATA[I found this site which describes everything you need to know  
http://www.kerrywong.com/2009/05/28/timing-methods-in-c-under-linux/
]]></description>
			<content:encoded><![CDATA[<p>I found this site which describes everything you need to know <img src='http://www.timberline.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href=" http://www.kerrywong.com/2009/05/28/timing-methods-in-c-under-linux/">http://www.kerrywong.com/2009/05/28/timing-methods-in-c-under-linux/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Left-align code in Wordpress</title>
		<link>http://www.timberline.se/?p=10</link>
		<comments>http://www.timberline.se/?p=10#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:58:58 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=10</guid>
		<description><![CDATA[The default theme in Wordpress uses &#8220;text-align: justify&#8221; for everything in a post, which can stretch code and shell commands to cover an entire line. I didn&#8217;t want that, so I used the Theme Editor to comment out/remove that line.
.post {
	margin: 0 0 40px;
	text-align: justify;
	}
Now, things look okay!
]]></description>
			<content:encoded><![CDATA[<p>The default theme in Wordpress uses &#8220;text-align: justify&#8221; for everything in a post, which can stretch code and shell commands to cover an entire line. I didn&#8217;t want that, so I used the Theme Editor to comment out/remove that line.</p>
<p><code>.post {<br />
	margin: 0 0 40px;<br />
	text-align: justify;<br />
	}</code></p>
<p>Now, things look okay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile custom kernel (Linux 2.6.31.8) patched with RTAI (latest CVS version &#8211; vulcano) for Ubuntu (9.10)</title>
		<link>http://www.timberline.se/?p=8</link>
		<comments>http://www.timberline.se/?p=8#comments</comments>
		<pubDate>Tue, 16 Feb 2010 13:00:56 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=8</guid>
		<description><![CDATA[Problem
The rtai package in Ubuntu 9.10 doesn&#8217;t contain a patch for the latest Ubuntu kernel, so a kernel with RTAI support can&#8217;t easily be compiled with standard packages.
A solution
Compile a custom kernel image package using vanilla sources and patches from a CVS snapshot of RTAI.
Required packages
I think the packages kernel-package and cvs are enough.

# aptitude [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem<br />
<span style="font-weight: normal;">The </span>rtai<span style="font-weight: normal;"> package in Ubuntu 9.10 doesn&#8217;t contain a patch for the latest Ubuntu kernel, so a kernel with RTAI support can&#8217;t easily be compiled with standard packages.</span></strong></p>
<p><strong>A solution</strong></p>
<p>Compile a custom kernel image package using vanilla sources and patches from a CVS snapshot of RTAI.</p>
<p><strong>Required packages</strong><br />
<span style="font-weight: normal;">I think the packages<strong> kernel-package</strong> and <strong>cvs</strong> are enough.</span><br />
<code><br />
# aptitude install kernel-package cvs<br />
</code><br />
<strong>The kernel</strong></p>
<p>Browse the<a title="RTAI CVS repository" href="http://cvs.gna.org/cvsweb/?cvsroot=rtai" target="_blank"> RTAI CVS repository</a>. Right now, the latest version is called vulcano. The kernel patches are located in vulcano/base/arch/x86/patches. My current Ubuntu kernel version was 2.6.31-19-generic, so I chose the patch named <strong>hal-linux-2.6.31.8-x86-2.4-09.patch</strong>, which is for the kernel version 2.6.31.8<strong>. </strong>Since the versions are almost the same, it will be easier to use the old Ubuntu kernel configuration.</p>
<p>The next step is to download and extract the vanilla kernel sources in <strong>/usr/src</strong>. Finally add a symlink which points to the kernel sources.</p>
<p><code><br />
# cd /usr/src<br />
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.8.tar.bz2<br />
# tar xvjf linux-2.6.31.8.tar.bz2<br />
# ln -s linux-2.6.31.8 linux<br />
</code><br />
To get the required patch, checkout the latest CVS sources.</p>
<p><code># cvs -d:pserver:anonymous@cvs.gna.org:/cvs/rtai co vulcano (latest stable version)</code></p>
<p>Next, patch the kernel sources with the correct patch.</p>
<p><code># cd /usr/src/linux-2.6.31.8<br />
# patch -p1 -b &lt; ../vulcano/base/arch/x86/patches/hal-linux-2.6.31.8-x86-2.4-09.patch</code></p>
<p>It&#8217;s time to build the kernel. It will be built as an Ubuntu kernel image, which means it will be added automatically to the boot loader upon installation and fits nicely into the existing structure.</p>
<p>The current kernel configuration is copied from /boot.</p>
<p><code># make-kpkg clean<br />
# cp /boot/config-2.6.31-19-generic .config<br />
# make oldconfig</code></p>
<p>Reply to the questions which pop up (about Interrupt Pipelines, for example). Just press ENTER for defaults if you aren&#8217;t sure about a question.</p>
<p>There are a few things left to configure, at least I had to configure them to get rid of some error messages.</p>
<p><strong>Problem:</strong> include/linux/ipipe.h:76:2: error: #error &#8220;CONFIG_NR_CPUS is too large, please lower it.&#8221;<br />
<strong>Solution: </strong>Disable &#8220;Support sparse irq numbering&#8221; (SPARSE_IRQ=n)</p>
<p><strong>Problem:</strong> ipipe.c prints an error message about per_cpu__irq_state_union being undefined<br />
<strong>Solution: </strong>Disable &#8220;Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)&#8221; (CC_STACKPROTECTOR=n)</p>
<p><strong>Problem:</strong> The RTAI docs say that module versioning support should be disabled.<br />
<strong>Solution: </strong>Disable &#8220;Module versioning support&#8221; (CONFIG_MODVERSION=n)</p>
<p>Now, build the kernel! You might as well build the headers at the same time.</p>
<p><code><br />
# fakeroot make-kpkg --initrd kernel_image kernel_headers</code></p>
<p>Go do something else while the kernel compiles if your computer is slow. <img src='http://www.timberline.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  When it&#8217;s done, it&#8217;s time to install the new kernel. The new .deb-files have been placed in /usr/src.</p>
<p><code># cd /usr/src<br />
# dpkg -i linux-image-2.6.31.8_2.6.31.8-10.00.Custom_i386.deb linux-headers-2.6.31.8_2.6.31.8-10.00.Custom_i386.deb</code></p>
<p style="text-align: left;">Now, reboot the computer to see if your new kernel works. It should, but if it doesn&#8217;t, choose an older kernel in the boot loader to get back into your system.</p>
<p><strong>RTAI</strong></p>
<p>When the patched kernel is up and running, it&#8217;s time to compile RTAI itself and install it. The default options in the configuration should be fine, but change them if you want a certain feature. Note that the default setting for the kernel source location is /usr/src/linux, which our symlink takes care of.</p>
<p><code># cd /usr/src/vulcano<br />
# make menuconfig<br />
# make<br />
# make install</code></p>
<p>Note: The RTAI documentation tells you to have a separate build directory, but when I tried that I got the following error messages:</p>
<p>Makefile:303: ../vulcano/scripts/Kbuild.include: No such file or directory<br />
Makefile:527: ../vulcano/arch/x86/Makefile: No such file or directory</p>
<p>When I did everything in the source directory as above, the error messages never appeared.</p>
<p><strong>After the installation<br />
</strong></p>
<p>Enter your new RTAI directory.</p>
<p><code># cd /usr/realtime/</code></p>
<p>You&#8217;ll find the RTAI modules in modules/ and some tests to run in testsuite/.</p>
<p>Remember, load rtai_lxrt.ko for &#8216;user&#8217; tests and rtai_sched for &#8216;kern&#8217; tests.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian/Ubuntu: Man pages for system calls and library calls</title>
		<link>http://www.timberline.se/?p=9</link>
		<comments>http://www.timberline.se/?p=9#comments</comments>
		<pubDate>Mon, 15 Feb 2010 14:22:30 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=9</guid>
		<description><![CDATA[A quick tip if you want to look up system and library calls in the man pages.
Install the following package:
# sudo aptitude install manpages-dev
]]></description>
			<content:encoded><![CDATA[<p>A quick tip if you want to look up system and library calls in the man pages.</p>
<p>Install the following package:</p>
<p># sudo aptitude install manpages-dev</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding more swap space as a file in Linux</title>
		<link>http://www.timberline.se/?p=7</link>
		<comments>http://www.timberline.se/?p=7#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:58:10 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=7</guid>
		<description><![CDATA[I&#8217;ve had some &#8220;out of memory&#8221; problems on a host system running VirtualBox. I&#8217;ve decided to add more swap memory to the host to see if it helps.
Since the hard drives are already partitioned I had to add the new swap memory as a file. I followed the following guide and added 2GB of memory.
http://www.linux.com/archive/feature/113956
This [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some &#8220;out of memory&#8221; problems on a host system running VirtualBox. I&#8217;ve decided to add more swap memory to the host to see if it helps.</p>
<p>Since the hard drives are already partitioned I had to add the new swap memory as a file. I followed the following guide and added 2GB of memory.</p>
<p><a href="http://www.linux.com/archive/feature/113956">http://www.linux.com/archive/feature/113956</a></p>
<p>This is what I did:</p>
<p><code># dd if=/dev/zero of=/swapfile bs=1M count=2K<br />
# mkswap /swapfile<br />
# swapon /swapfile<br />
# vim /etc/fstab<br />
</code><br />
Added the following line:<br />
<code>/swapfile    none        swap    sw        0    0</code></p>
<p>Things are looking good so far, but I&#8217;ll wait a couple of days to see if the problem returns.</p>
<p>Edit:</p>
<p>As of now, the guest system has an uptime of 12 days. Success!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How did you get here?</title>
		<link>http://www.timberline.se/?p=5</link>
		<comments>http://www.timberline.se/?p=5#comments</comments>
		<pubDate>Thu, 07 Jan 2010 00:09:43 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.timberline.se/?p=5</guid>
		<description><![CDATA[Hello! This blog is rather empty at the moment. I&#8217;d appreciate it if you could post a comment and tell me how you got here, since there shouldn&#8217;t be any links pointing here yet.
Just curious!
]]></description>
			<content:encoded><![CDATA[<p>Hello! This blog is rather empty at the moment. I&#8217;d appreciate it if you could post a comment and tell me how you got here, since there shouldn&#8217;t be any links pointing here yet.</p>
<p>Just curious!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timberline.se/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
