<?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>www.vegard.net &#187; Linux</title>
	<atom:link href="http://www.vegard.net/archives/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vegard.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 04 Feb 2012 20:26:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Size Matters.</title>
		<link>http://www.vegard.net/archives/1316/</link>
		<comments>http://www.vegard.net/archives/1316/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 20:41:56 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1313</guid>
		<description><![CDATA[Yes, when it comes to computers, size often matters. Apple realized that and created the MacBook Air. Many Apple fanboys responded with a &#8220;wow&#8221;, Jesus Jobs had created another incredible gadget. Of course it turned out that many companies had already manufactured computers thinner than the MacBook Air, but there is a good chance that [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, when it comes to computers, size often matters. Apple realized that and created the <a href="http://www.apple.com/macbookair/">MacBook Air</a>. Many Apple fanboys responded with a &#8220;wow&#8221;, Jesus Jobs had created another incredible gadget. Of course it turned out that <a href="http://www.news.com/8301-10784_3-9850943-7.html">many</a> <a href="http://blog.wired.com/gadgets/2008/01/sharp-actius-mm.html">companies</a> had already manufactured computers <a href="http://www.mackable.com/blog/a-laptop-thinner-than-macbook-air-10-years-ago/">thinner</a> than the MacBook Air, but there is a good chance that you have not heard of any of them because they lacked the hype-machine that Apple can use now: The internet.</p>
<p>[Dell] also made a small computer once that you probably never heard of, the <a href="http://www.dell.com/content/products/productdetails.aspx/latit_x1">Latitude X1</a>. It&#8217;s tiny, with a decent CPU, a good screen &#8211; and the best thing &#8211; I&#8217;ve got it right here.<span id="more-1316"></span></p>
<p>Once upon a time we bought two X1&#8242;s at work, one of them left with an employee that decided to seek new challenges, while the other one was used by the CEO until he had filled it up with so much software it took 15 minutes to boot the poor computer. When he decided to begin using Office 2007 it was the final nail in the X1 coffin and we ordered a new computer for our increasingly frustrated, but fearless leader.</p>
<p>The messed up X1 ended up on my desk. It was battered and unusable, but as soon as Windows was replaced by <a href="http://www.ubuntu.com/">Ubuntu</a> it once again woke to life and has turned out to be quite a usable little thing. Installing Ubuntu was a total breeze, and all devices worked as expected &#8211; including the Wi-Fi card, and with WPA support this time. The battery life isn&#8217;t too bad either and the laptop will stay on for about two hours of normal use without the power cord plugged in. I&#8217;ve been using the X1 for some time now, and there are really only two fingers I can put my finger on.</p>
<p>First of all, the unusual keyboard layout will take a while to get used to, and since I don&#8217;t use it very often, I probably never get used to it. The X1 also gets unbelievably hot and if you have it on your lap for more than 5 minutes, you will get burn marks. Apart from that, it&#8217;s a great little computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1316/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to get AFP to work with Netatalk in OS X Leopard.</title>
		<link>http://www.vegard.net/archives/1257/</link>
		<comments>http://www.vegard.net/archives/1257/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 16:01:24 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1254</guid>
		<description><![CDATA[After I installed OS X 10.5 Leopard on my Mac I was unable to connect to an AFP share I had on a Debian Etch server. Everything had worked like a charm in OS X 10.4 Tiger, but Leopard just refused to connect. Evidently, the reason for this misbehavior is that Leopard requires the passwords [...]]]></description>
			<content:encoded><![CDATA[<p>After I installed OS X 10.5 Leopard on my Mac I was unable to connect to an AFP share I had on a Debian Etch server. Everything had worked like a charm in OS X 10.4 Tiger, but Leopard just refused to connect.</p>
<p>Evidently, the reason for this misbehavior is that Leopard requires the passwords to be encrypted while Tiger didn&#8217;t really care. Because of incompatible licenses, the version of Netatalk that comes with both Debian and Ubuntu is compiled without the DHX module needed to encrypt passwords, making it impossible for you to connect to your AFP shares using Leopard.</p>
<p>But fear not, the nerds of the interweb have come up with a way to solve this.<span id="more-1257"></span></p>
<p>I found three guides (<a href="http://www.blackmac.de/archives/58-Make-Netatalk-talk-to-Leopard-Mac-OS-X-10.5.html#extended">here</a>, <a href="http://blog.our-files.com/?p=5">here</a> and <a href="http://www.damontimm.com/blog/how-to-install-netatalk-afp-on-ubuntu-with-encrypted-authentication/">here</a>), but none of them solved my problem on their own. After dicking around with all three of them for a while, however, I was once again able to connect to my beloved AFP share. Here&#8217;s a quick and dirty guide to what I think I did &#8211; unfortunately, I didn&#8217;t write down the exact steps &#8211; so it&#8217;s mostly guesswork.</p>
<p>You&#8217;ll have to compile a new version of Netatalk with the DHX module. Maybe it&#8217;ll work for you, maybe it won&#8217;t. If you&#8217;re having problems, have a look at the three other guides mentioned above.</p>
<p>First, log in to your Linux box (Debian or Ubuntu) and execute the following commands:</p>
<pre>$ su
$ cd /usr/src
$ apt-get source netatalk
$ apt-get install devscripts fakeroot openssl cracklib2 dpkg-dev
$ apt-get install libpam-cracklib cracklib2-dev libssl-dev
$ apt-get build-dep netatalk</pre>
<p>You&#8217;ve now installed everything that should be necessary to compile a new version of Netatalk. Perhaps you had some of the packages already, perhaps you need to install another few packages to get it to work. If you have to, you will normally see quite clearly what kind of files you&#8217;re missing from the compiler&#8217;s output when we start the compile (which is the next step below). Use Google to find the name of the missing package, apt-get to install it and restart the compiling process.</p>
<p>Some of the packages above might not be available in the file sources currently scanned by apt-get. If that is the case, you have to edit /etc/apt/sources.list and add the correct sources and run apt-get update before trying to install the missing package. Again, use Google to find the correct sources for your missing packages.</p>
<p>Now that you have (hopefully) installed all the necessary packages, let&#8217;s get on with it our Netatalk challenge:</p>
<pre>$ cd netatalk-2.0.3
$ DEB_BUILD_OPTIONS=ssl debuild</pre>
<p>A lot of text will fly by, when it&#8217;s done you might get an error message about missing keys or something similar. Ignore it, install the new package and clean up the source and compiler mess we&#8217;ve made:</p>
<pre>$ debi
$ rm -dfR netatalk*</pre>
<p>The new version of Netatalk should now be installed on your Linux box, but you will not be able to connect to it from Leopard just yet. Let&#8217;s poke around in the Netatalk configuration file.</p>
<pre>$ vi /etc/netatalk/afpd.conf</pre>
<p>If you have not made any changes to this file before, the very last line should say</p>
<pre>#- -transall -uamlist uams_clrtxt.so,uams_dhx.so -nosavepassword</pre>
<p>Remove the # and write-quit vi with :wq, then restart netatalk.</p>
<pre>$ /etc/init.d/netatalk restart</pre>
<p>You should now be able to connect to the AFP share from Leopard.</p>
<p>The final thing you should do is to prevent apt-get from updating the Netatalk package whenever you run apt-get update. This is done with the following command:</p>
<pre>$ echo "netatalk hold" | sudo dpkg --set-selections</pre>
<p>Keep in mind, though, that if Netatalk is actually updated by the maintainers, your old version will not be updated with apt-get update. If you&#8217;re still having problems, consult the three other guides listed above or use Google. Google is your friend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1257/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The Assembly Continues.</title>
		<link>http://www.vegard.net/archives/1185/</link>
		<comments>http://www.vegard.net/archives/1185/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 21:59:50 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mini-ITX]]></category>
		<category><![CDATA[VBOX]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1182</guid>
		<description><![CDATA[This is the second part of an entry that was way too huge to post as one. The first part was Building The New VBOX. After I was finally able to configure my RAID setup in Ubuntu, I halted the system to assemble everything. Shock and horror! Just before the screen went black, two large [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second part of an entry that was way too huge to post as one. The first part was <a href="/archives/1184/">Building The New VBOX</a>.</p>
<p>After I was finally able to configure my RAID setup in Ubuntu, I halted the system to assemble everything. Shock and horror! Just before the screen went black, two large FAILED error messages appeared, informing me that an error had occurred when stopping the RAID arrays. Was I surprised? Not really.</p>
<p>Once again I consulted the Great Interweb Oracle, a.k.a. Google. From what I gathered when reading the Ubuntu forums and bug reports, the posters considered it to be a bug that resulted in the RAID array being dirty on every boot. This, in turn, meant that one of the disks would be rebuilt on every boot. A rather useless RAID setup, in my humble opinion.<span id="more-1185"></span></p>
<p>With a bug of this magnitude, I decided to jump the Ubuntu-wagon and move to another Linux distro. I went with Debian, which I&#8217;m somewhat familiar with. It installed without any trouble, I was even able to configure the RAID setup again without having to go through the <span class="code">mdadm</span> nightmare I had with Ubuntu. When it was installed, Debian started up as expected, but when I halted the system, the same RAID error messages as with Ubuntu appeared.</p>
<p>After banging my head against the living room wall for a few minutes, I once again searched the internet for a feasible explanation. After all, Debian is a server Distro used by lots of servers and most of them are probably configured with RAID. I quickly found someone with the same problem as me and discovered that the error messages are actually not caused by a bug at all. It will never be possible to stop the arrays because they are still mounted when the system tries to stop them.</p>
<p>Even if I had now realized that the error messages I saw when shutting down Ubuntu wasn&#8217;t a bug after all, I was confident that my choice to dump Ubuntu in favor of Debian was a very good choice. I would rather use a distro with a community that could give me a reasonable explanation for strange behavior than a community that considered the same strange behavior to be a bug.</p>
<p>Anyway. When Debian was finally installed and everything seemed to functioning more or less as expected, work on placing the second 2.5&#8243; SATA drive in the tiny <a href="http://www.morex.com.tw/products/productdetail.php?fd_id=37">Morex Cubid 3688</a> case started. If you&#8217;re familiar with the size of a 2.5&#8243; hard drive, you will naturally assume that getting the drive into the case should be a walk in the park.</p>
<p>Wrong.</p>
<p>With the DVD drive, the first hard drive, the motherboard with its huge heatsink and all the cables already installed, I was just not able to get the second drive into the case without using a sledge hammer and that probably would have been a very bad idea. Someone with the right engineering skills and tools &#8211; something else than a sledge hammer &#8211; probably could have attached the second hard drive in the space below the DVD drive bay and applied some kind of shielding from the DC-DC converter and the power connector but at the same time made sure there was good airflow through the case. I tried all that, but soon realized that I lacked both the skills and the tools &#8211; at some point I actually attached the hard drive with double sided tape, but I quickly decided that it was a perfect recipe for a disaster, something I tried to avoid. Yes, I had RAID now, but I saw no reason to provoke a hard drive meltdown.</p>
<p>In the end I removed the DVD drive to make space for the second hard drive. I drilled four holes to attach it, naturally managed to miscalculate and the drive is now only attached with three out of four screws. Not a huge problem. Even tough I will probably never have to use the DVD drive ever again &#8211; and if I do, I can just open the case and attach it &#8211; it&#8217;s still a pity to have to remove it.</p>
<p>After everything was finally in place and the lid closed and secured, I&#8217;ve had a lot of fun configuring Debian and installing everything I think I&#8217;ll need. Right now VBOX is only hosting <a href="http://vbox.vegard.net:81/">this page boring page</a>, hopefully the page will contain some more interesting bits of information soon. A permanent link to VBOX can also be found in the footer of every page now.</p>
<p>So there you have it, folks. This is how I spend my vacation. I build computers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1185/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building The New VBOX.</title>
		<link>http://www.vegard.net/archives/1184/</link>
		<comments>http://www.vegard.net/archives/1184/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 18:58:24 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mini-ITX]]></category>
		<category><![CDATA[VBOX]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1181</guid>
		<description><![CDATA[All the parts that I ordered for the new VBOX arrived on Monday, just one day after I placed the order. I didn&#8217;t have to wait for the parcel to arrive at the post office or stay at home all day to wait for a courier to deliver it to my apartment; I picked up [...]]]></description>
			<content:encoded><![CDATA[<p>All the parts that I ordered for the new VBOX arrived on Monday, just one day after I placed the order. I didn&#8217;t have to wait for the parcel to arrive at the post office or stay at home all day to wait for a courier to deliver it to my apartment; I picked up the box at an automated machine at the central station. I entered a eight digit code the postal service sent to me in a text message, then a small door in the machine opened and my computer parts popped out. It was all extremely convenient.  Almost like magic.</p>
<p>The first part of the assembly went more or less according to plan, I had to go out and buy a power connector for the SATA drive, but that was the only unexpected event. To get all the parts to fit was a bit of a challenge, the box is quite small and the heat sink on the motherboard is enormous, at least compared to the size of the motherboard itself. On top of this, the shortest SATA cable I could find was half a meter long, which was more than twice the length I actually needed.</p>
<p>As for operating system, I went with <a href="http://www.ubuntu.com">Ubuntu</a> because it&#8217;s the new hot Linux distro and it also has a very active <a href="http://www.ubuntuforums.org/">community</a>. That&#8217;s a good thing for me, who know very little about Linux. Ubuntu installed as planned, <a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29">LAMP</a>, was set up by the main installer and everything generally worked like a charm until I got some ideas. Some crazy ideas.<span id="more-1184"></span></p>
<p>Since I was setting up a server, I decided I needed <a href="http://en.wikipedia.org/wiki/RAID">RAID</a>. No server is complete without at least <a href="http://en.wikipedia.org/wiki/Disk_mirroring">RAID 1</a>. RAID 1 gives the server fault tolerance because if one of the hard drives in the setup fails, there is still at least one working drive with all the data. The faulty disk can be replace while the system is powered up and online and the contents of the disks in the array is automatically synched. I found another cheap disk and started to configure it. The motherboard has a built in RAID controller, but I realized after some reading that it was only FakeRAID and not recognized as a RAID controller by Ubuntu. So instead I started configuring a software RAID.</p>
<p>Everything worked well until, what do you know, one of the disks actually failed during the installation process! That&#8217;s irony for you. So I had to get back to the store where I bought the drive and get a replacement. When I got back home with the new drive, the problems began. It was just plain impossible to add the new disk to the existing RAID setup in the Ubuntu installer. No matter how hard I tried to delete the partition tables on both drives, the RAID setup just magically appeared time and time again.</p>
<p>After many frustrating hours, I finally found the answer: The RAID configuration is <em>not</em> saved in the partition tables, which was what I assumed all along. They are saved in something called superblocks, and these superblocks are <em>not</em> deleted by partman nor fdisk. So if you&#8217;re struggling with magic RAID configuration that just appear out of the blue, this is the shell command that will save the day:</p>
<p><span class="code">sudo mdadm &#8211;zero-superblock /dev/sda5</span></p>
<p>Be careful, though, as I suspect that you will <strong>loose access to all your data</strong> when you run the above command. It&#8217;s possible that you can save it with some other mdadm-command but that is way beyond my very limited knowledge. Replace <span class="code">/dev/sda5</span> with whatever partition you want to remove from the RAID configuration. It&#8217;s quite possible that you have to stop the RAID array before running the above command:</p>
<p><span class="code">sudo mdadm &#8211;stop /dev/md0</span></p>
<p>Replace <span class="code">/dev/md0</span> with the name of the array you have to stop.</p>
<p>If you plan to configure a RAID 1 setup in Ubuntu, I also recommend that you read the following articles:</p>
<p><a href="http://linux.die.net/man/8/mdadm">mdadm(8) &#8211; Linux man page</a></p>
<p><a href="http://users.piuha.net/martti/comp/ubuntu/raid.html">RAID-1 in My Ubuntu Installation</a></p>
<p><a href="http://advosys.ca/viewpoints/2007/04/setting-up-software-raid-in-ubuntu-server/">Setting up software RAID in Ubuntu Server</a></p>
<p>That&#8217;s about it for now; later I&#8217;ll tell you all about why I ended up using <a href="http://www.debian.org/">Debian</a> instead. The second part of this entry is <a href="/archives/1185/">The Assembly Continues</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1184/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edge.</title>
		<link>http://www.vegard.net/archives/1007/</link>
		<comments>http://www.vegard.net/archives/1007/#comments</comments>
		<pubDate>Tue, 08 Aug 2006 19:15:04 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1004</guid>
		<description><![CDATA[Today I spent a few hours in our data center installing new servers. Since I&#8217;m usually spending most of my work dat on my ass in front of a computer, this is the closest I get to physical labour. The servers we installed today are large, hard to grip properly and weighs in at around [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spent a few hours in our data center installing new servers. Since I&#8217;m usually spending most of my work dat on my ass in front of a computer, this is the closest I get to physical labour. The servers we installed today are large, hard to grip properly and weighs in at around 30 kilos a pop, something that makes the whole operation rather complicated. Every server comes with redundant PSUs and two network card, which adds to the equation since cables has to be .</p>
<p>The result of today&#8217;s work is a bruise on my arm that I didn&#8217;t notice before I got home and a nasty cut from opening one of the cardboard boxes. It&#8217;s probably not much to cry about, but as you know there&#8217;s not much that stings more than a clean, deep cardboard cut. Maybe a machete in the stomach, but I&#8217;ve never tried that and never plan to, so I have no real reference.</p>
<p>The thread I posted on the <a href="http://www.ubuntuforums.org/">Ubuntu Forums</a> yesterday resulted in exactly zero recommendations on wireless PCMCIA network cards with WPA that works out of the box in Ubuntu. So much for the helpful Linux community.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being With Others.</title>
		<link>http://www.vegard.net/archives/1006/</link>
		<comments>http://www.vegard.net/archives/1006/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 20:56:15 +0000</pubDate>
		<dc:creator>Vegard Skjefstad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.vegard.net/archives/1003</guid>
		<description><![CDATA[The nerd in me has taken on another nerdish challenge: To get Ubuntu to work on my old Dell laptop. Getting it up and running was surprisingly easy, download the Live CD, which also worked as an install CD, check it out for a bit and then install. Everything went OK until I was to [...]]]></description>
			<content:encoded><![CDATA[<p>The nerd in me has taken on another nerdish challenge: To get Ubuntu to work on my old Dell laptop.</p>
<p>Getting it up and running was surprisingly easy, download the Live CD, which also worked as an install CD, check it out for a bit and then install. Everything went OK until I was to connect to my wireless network, which uses WPA encryption. And I&#8217;m just not able to get WPA to work with my D-Link DWL-G650+ wireless card.  WEP is OK, but in the words of one of my favourite cartoon characters: Idowanna!</p>
<p>Since I face enough challenges at work, I really don&#8217;t feel like sitting in front of a computer strugling with something like this. Right now I&#8217;m connecting through a Windows box using a twisted TP cable and that works well – but it&#8217;s not very wireless. I have now taken what can only be descibed as the easy exit; asking the people over at the <a href="http://www.ubuntuforums.org/">Ubuntu Forums</a> for suggestions on PCMCIA cards that work out of the box. Hopefully they&#8217;ll come up with a cheap alternative.</p>
<p>The German movie <a href="http://www.imdb.com/title/tt0108211/">Stalingrad</a> is on the idiot box in the background. It looks like a movie I should probably see properly one day, but not right after dinner. Violent, violent stuff. “War”, I think they call it.</p>
<p>And while we&#8217;re on the subject of war. On my way back home from work today, I biked passed a pro-Israeli demonstration. A lot of people, and a lot of cops. Perhaps a perfect opportunity to photograph riot police beating the living shit out of activists. So I got home, grabbed my camera and walked back. But when I got there, they had left.</p>
<p>Unfortunately, I didn&#8217;t know where they had gone, which is too bad, because after a while the pro-Israeli crowd had stumbled upon a not-so-pro-Israeli crowd and they&#8217;d startet hiting eachother, burning flags and all kinds of really mature stuff. Kodak moment upon Kodak moment, and I wasn&#8217;t there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vegard.net/archives/1006/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

