<?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>From thoughts to text &#187; Linux</title>
	<atom:link href="http://blog.torh.net/category/english/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.torh.net</link>
	<description>The personal blog of Tor Håkon Haugen</description>
	<lastBuildDate>Mon, 17 Oct 2011 14:44:18 +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>Citrix Receiver on Linux</title>
		<link>http://blog.torh.net/2011/10/12/citrix-receiver-on-linux/</link>
		<comments>http://blog.torh.net/2011/10/12/citrix-receiver-on-linux/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 14:23:17 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[citrix]]></category>
		<category><![CDATA[ssl certificates]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=1202</guid>
		<description><![CDATA[I&#8217;ve written about this issue before, in 2008. But as it turns out, the problem still exists with todays version of the Citrix client, version 12.0, now called Citrix Receiver. And people are still searching for an answer on how &#8230; <a href="http://blog.torh.net/2011/10/12/citrix-receiver-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://blog.torh.net/2008/02/29/problems-with-citrix-client-on-linux/">written about this issue before</a>, in 2008. But as it turns out, the problem still exists with todays version of the Citrix client, version 12.0, now called Citrix Receiver. And people are still searching for an answer on how to solve this issue.</p>
<blockquote><p>You have not chosen to trust [certificate] the issuer of the server&#8217;s security certificate (SSL error 61)</p></blockquote>
<p>Both the problem and the solution is the same as before, only the name and the path is different. The path depends on whether you installed the client/receiver as a normal user, or root, also known as the superuser.</p>
<p>I&#8217;ve used Ubuntu 11.04 here, but I reckon it&#8217;ll work on any Linux distribution.</p>
<p><a href="http://blog.torh.net/wp-content/uploads/2011/10/Citrix-Receiver-Error.jpg" rel="lightbox[1202]"><img class="size-full wp-image-1209 alignnone" title="Citrix Receiver Error" src="http://blog.torh.net/wp-content/uploads/2011/10/Citrix-Receiver-Error.jpg" alt="" width="442" height="203" /></a></p>
<p>The problem is this; When you install the Citrix Receiver, it will only install a handful of certificate files, and we&#8217;ll have to provide the rest. Now, where can we find a reliable source of SSL certificates? Well, it turns out that we most likely have that already. The same source our browser is using.</p>
<pre> /usr/share/ca-certificates/mozilla/</pre>
<p>Just copy those .crt files over to the Citrix keystore, and we should be done. If the client is installed under <em>/opt/Citrix/ICAClient/</em>, run this command in a terminal:</p>
<pre>sudo cp /usr/share/ca-certificates/mozilla/* \
/opt/Citrix/ICAClient/keystore/cacerts/</pre>
<p>If it&#8217;s installed in your home directory, this command should work:</p>
<pre>cp /usr/share/ca-certificates/mozilla/* \
$HOME/ICAClient/linuxx86/keystore/cacerts/</pre>
<p>If you are using a home made certificate, or for some reason this doesn&#8217;t work for you, you&#8217;ll have to track down the correct .crt files yourself. But at least now you&#8217;ll know where to place them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2011/10/12/citrix-receiver-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air &#8211; Open URLs in default browser</title>
		<link>http://blog.torh.net/2009/07/30/adobe-air-open-urls-in-default-browser/</link>
		<comments>http://blog.torh.net/2009/07/30/adobe-air-open-urls-in-default-browser/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 08:34:30 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[default browser]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[tweetdeck]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=629</guid>
		<description><![CDATA[For the last few days I&#8217;ve been fighting TweetDeck on my laptop trying to get it to open web pages in Opera. A small, but fast browser, from the Norwegian company with the same name. At first I thought that &#8230; <a href="http://blog.torh.net/2009/07/30/adobe-air-open-urls-in-default-browser/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the last few days I&#8217;ve been fighting <a title="TweetDeck" href="http://tweetdeck.com/" target="_blank">TweetDeck</a> on my laptop trying to get it to open web pages in <a title="Opera" href="http://www.opera.com" target="_blank">Opera</a>. A small, but fast browser, from the Norwegian company with the same name.</p>
<p>At first I thought that Opera wasn&#8217;t my default browser in <a title="Gnome Desktop Manager" href="http://www.gnome.org" target="_blank">Gnome</a>. I&#8217;m currently using <a title="Linux Mint" href="http://www.linuxmint.com" target="_blank">Linux Mint</a>, a distribution based on <a title="Ubuntu Linux" href="http://www.ubuntu.com" target="_blank">Ubuntu</a>. So I checked the &#8220;Preferences-&gt;Preferred Applications&#8221; and made sure Opera was the default application for browsing the web. I also checked with &#8220;gconf-editor&#8221; just to be safe that Opera was set as default browser.</p>
<p>Having checked all this. I did a few tests and found out that Opera was indeed the default application for surfing the web. So the problem had to be limited to TweetDeck or <a title="Adobe AIR" href="http://www.adobe.com/products/air/" target="_blank">Adobe AIR</a>.</p>
<p>Now. I checked all the xml-files regarding Adobe AIR and TweetDeck, I even installed SQLite3 to read the database file for TweetDeck in my home directory. No luck.</p>
<p>But the Internet is a collection of <span style="text-decoration: line-through;">tubes</span> amazing and brilliant people. So I searched and found <a href="http://blog.andreaolivato.net/about" target="_blank">Andrea Olivato</a>, which in turned had found <a href="http://blog.andreaolivato.net/open-source/change-adobe-air-apps-default-browser.html" target="_blank">the solution to my (and many others) problem</a>. He discovered that Adobe AIR has hard-coded firefox as default browser in <em>libCore.so</em>, which (usually) can be found in <em>/opt/Adobe AIR/Versions/1.0.</em></p>
<p><em><strong>The solution</strong> </em></p>
<p>His solution to the problem was to open <em>libCore.so</em> with vim, or any other editor for that matter, and search for the word &#8220;firefox&#8221;. Ok, he writes that he jumps directly to line 15500, but this might change. But then again, maybe Adobe will make it work in the future. Anyway. He replaced &#8220;firefox&#8221; with &#8220;browser&#8221;, which is the same length. Very important. And created a symlink from his favourite browser to, well, browser.</p>
<p>In my case:</p>
<pre>ln -s /usr/bin/opera /usr/local/browser</pre>
<p>I noticed that in <em>libCore.so</em>, Adobe has a reference to <em>/desktop/gnome/url-handlers/http/command</em>, which is the registry setting for Gnome when it comes to default browser. Why this isn&#8217;t used I don&#8217;t understand. Perhaps the hard-coded firefox is a backup solution in case AIR fails to retrieve the information from the registry.</p>
<p><em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/07/30/adobe-air-open-urls-in-default-browser/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>OpenWRT &#8211; Configuring VLANs and trunks</title>
		<link>http://blog.torh.net/2009/07/27/openwrt-configuring-vlans-and-trunks/</link>
		<comments>http://blog.torh.net/2009/07/27/openwrt-configuring-vlans-and-trunks/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 08:14:31 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[openwrt linksys cisco wrt54gl vlan trunking]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=610</guid>
		<description><![CDATA[This weekend I decided to finally upgrade the firmware on my Linksys WRT54GL wireless router. The whole reason I bought this router a few years back was because it supported third-party firmware based on Linux. Up until now, Linksys firmware &#8230; <a href="http://blog.torh.net/2009/07/27/openwrt-configuring-vlans-and-trunks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This weekend I decided to finally upgrade the firmware on my Linksys WRT54GL wireless router. The whole reason I bought this router a few years back was because it supported third-party firmware based on Linux.</p>
<p>Up until now, Linksys firmware has been working great. I didn’t need more than a simple wireless router. But recently I’ve started playing with VMware ESXi, which led to a few virtual servers. And with a few virtual servers, there was also a need to make them accessible from the Internet. With the only way of opening up ports on my router was through my ISPs web page, and that every change needed to be accompanied by a reboot of my router, I decided it was time to set up my own firewall.</p>
<p><strong>Support for VLANs</strong></p>
<p><a title="OpenWRT" href="http://www.openwrt.org" target="_blank">OpenWRT</a> support VLANs, and this is one of the main reasons I wanted to upgrade to a third-party firmware. Running a firewall with just one network adapter isn’t really possible, unless you can split networks within the same physical medium. And that’s when VLANs come in to the picture. This technology makes it possible to have several different networks within the same physical medium. Even the with the same network addresses.</p>
<p>The firewall, which is a virtual machine, doesn’t know that the host it’s running on only has one network adapter. I gave the firewall three adapters, all connected to different virtual switches. These switches tag their traffic with VLAN data and sends it to my Linksys router, which in also was configured the same way. One port on the router could hand out data for VLAN1, the next port for VLAN2.</p>
<p>In my setup, the traffic coming from Internet is connected to a port in VLAN2. This is sent, along with data in VLAN3, via port 4 to the ESXi host. Here the traffic is divided into virtual switches. One switch for each VLAN. So my firewall is connected to both the switch for VLAN2, and for VLAN3. VLAN2 is being labeled as WAN, while VLAN3 is labeled LAN. I also have a VLAN4 named SERVERS.</p>
<p><strong>Installing OpenWRT</strong></p>
<p>This is easy. If you haven&#8217;t installed a third-party firmware on your Linksys, you can use the web interface from Linksys to upgrade. Just as you would if you were to upgrade the original firmware. Download the correct image from OpenWRT, select it in the web interface and click the upgrade button.</p>
<p>After the new firmware is installed, the router will reboot and ready for configuration. By default the routers IP-address is 192.168.1.1. You can log in via telnet with no user name and password. It is advised to set a password at first log in. Doing so, telnet will be disabled and ssh enabled instead.</p>
<p>If you manage to lock yourself out, it&#8217;s possible to restart OpenWRT into a safe mode. Just take the power, when it starts up, press any button just when the DMZ light is lid. Now you can access it via telnet at address 192.168.1.1 again, no matter what address you have specified earlier. In safe mode you can change password and reconfigure firewall rules, if you have enabled a rule you shouldn&#8217;t have.</p>
<p><strong>Setting up different VLANs (and trunking them)</strong></p>
<p>First you should be aware of how the WRT54GL hardware is mapped internally. It is essential to understand the logic when configuring the router. The image shows the default configuration where port 1 &#8211; 4 is a regular switch on VLAN0, and the WAN port is separated on VLAN1. If you only want a dumb switch with 5 ports, you could put the WAN port into VLAN0 as well.</p>
<p style="text-align: center"><a href="http://blog.torh.net/wp-content/uploads/2009/07/WRT54_sw1_internal_architecture.png" rel="lightbox[610]"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="size-full wp-image-622 aligncenter" title="WRT54_sw1_internal_architecture" src="http://blog.torh.net/wp-content/uploads/2009/07/WRT54_sw1_internal_architecture.png" alt="WRT54_sw1_internal_architecture" width="472" height="351" /></a></p>
<p>The configuration file can be found under <em>/etc/config/network</em>. Here we can set the IP-address of the box, but also configure the ports. I only need a dumb switch with VLAN capabilities, so I won&#8217;t set up any fancy routing rules in this post.</p>
<pre>config switch "eth0"
   option vlan0 "0t 5"
   option vlan1 "0t 5"
   option vlan2 "0t 4 5"
   option vlan3 "0t 3 2 5*"
   option vlan4 "0t 5"</pre>
<p>In this setup I have created five VLANs, three of which are unused at the moment. VLAN3 is the default VLAN, as marked by the asterisk (*). Port 5, the internal, has to be included. Data on LAN port 4 (which is internally mapped as port 0), is tagged, which basically means it&#8217;s a trunk. If a port isn&#8217;t tagged, it can&#8217;t belong to more than one VLAN (except the internal port 5). If a port is tagged, it can&#8217;t be used by a computer which doesn&#8217;t support trunk or tagging.</p>
<p>My Internet connection is connected to the WAN-port on the router, also known as internal port 4. It belongs to VLAN2, and is tagged on LAN port 4, which is known as internal port 0. On the other side of LAN port 4 is my ESXi server, which supports trunking (surprise). VLAN2 then goes into my firewall, on the other side of my firewall is VLAN3, which goes over the same cable back to the OpenWRT box, which in turn distributes it to my main computer and media center on LAN port 1 and 2.</p>
<p><strong>Conclusion</strong></p>
<p>Linksys WRT54GL is a great product, and with third-party firmware such as OpenWRT, it&#8217;s even greater. This box can be transformed from a boring wireless router, to a full blown firewall if needed.</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/07/27/openwrt-configuring-vlans-and-trunks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Ubuntu 6.06 LTS to 8.04 LTS</title>
		<link>http://blog.torh.net/2009/07/09/upgrading-ubuntu-6-06-lts-to-8-04-lts/</link>
		<comments>http://blog.torh.net/2009/07/09/upgrading-ubuntu-6-06-lts-to-8-04-lts/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 14:27:46 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=574</guid>
		<description><![CDATA[Today I upgraded from Ubuntu 6.06 to 8.04. The process was fairly painless thanks to a guide I found floating around on the Internet by Ronald Bruintjes. Thanks! I thought about posting it here, but that wouldn&#8217;t be fair to &#8230; <a href="http://blog.torh.net/2009/07/09/upgrading-ubuntu-6-06-lts-to-8-04-lts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I upgraded from Ubuntu 6.06 to 8.04. The process was fairly painless thanks to <a href="http://www.automationadventures.com/2009/02/23/upgrade-ubuntu-server-604-lts-to-804-lts/">a guide I found</a> floating around on the Internet by Ronald Bruintjes. Thanks!</p>
<p>I thought about posting it here, but that wouldn&#8217;t be fair to the author. So, please <a href="http://www.automationadventures.com/2009/02/23/upgrade-ubuntu-server-604-lts-to-804-lts/">visit his site for more information</a>.</p>
<p>However, be prepared to answer some questions regarding different configuration files. More specifically if you want to keep the original, or overwrite with a new one. I myself have edited a quite a few configuration files over the last year, so I had to do a manual screening before I decided what to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/07/09/upgrading-ubuntu-6-06-lts-to-8-04-lts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filesystem mounted as read-only during boot</title>
		<link>http://blog.torh.net/2009/06/16/filesystem-mounted-as-read-only-during-boot/</link>
		<comments>http://blog.torh.net/2009/06/16/filesystem-mounted-as-read-only-during-boot/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 18:15:03 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[mknod]]></category>
		<category><![CDATA[suse]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=550</guid>
		<description><![CDATA[Today I had a case where a server mounted the root filesystem as read-only during boot. To make a short story shorter, check /dev/null. After doing some searching in the logs I found a few lines complaining about /dev/null also &#8230; <a href="http://blog.torh.net/2009/06/16/filesystem-mounted-as-read-only-during-boot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I had a case where a server mounted the root filesystem as read-only during boot. To make a short story shorter, check <em>/dev/null</em>.</p>
<p>After doing some searching in the logs I found a few lines complaining about /dev/null also being read-only filesystem. So I checked the permission with <em>ls -al /dev/null, </em>and it turned out this had been changed into a regular file rather then the special file it&#8217;s supposed to be.</p>
<p>The fix is easy. Delete the file called <em>/dev/null</em> and re-create the special device with the command <em>mknod -m 666 /dev/null c 1 3</em>.</p>
<p>You can also read about how to create this special file by reading the man-pages. Command: <em>man 4 null</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/06/16/filesystem-mounted-as-read-only-during-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NimBUS and Regular Expressions</title>
		<link>http://blog.torh.net/2009/03/15/nimbus-and-regular-expressions/</link>
		<comments>http://blog.torh.net/2009/03/15/nimbus-and-regular-expressions/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 23:39:43 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[log file]]></category>
		<category><![CDATA[logmon]]></category>
		<category><![CDATA[nimbus]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[probe]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=476</guid>
		<description><![CDATA[I recently had to configure NimBUS to send alarm upon detecting a specific log entry in /var/log/messages on a Linux system. Because this alarm was supposed to be sent by SMS , I didn&#8217;t want it to send more than &#8230; <a href="http://blog.torh.net/2009/03/15/nimbus-and-regular-expressions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to configure NimBUS to send alarm upon detecting a specific log entry in <em>/var/log/messages </em>on a Linux system. Because this alarm was supposed to be sent by SMS , I didn&#8217;t want it to send more than one message. But since our log file has a timestamp, each entry were we found a match would be handled as a unique alarm, thus sending one message for each log entry where the mach was found.</p>
<p>If the string we were looking for first would appear, it would most likely show up somewhere between 5 to 50 times within an hour.It&#8217;s hard to guess, really. But we are looking for a problem that won&#8217;t solve itself, and the program checking for this problem will continue to write to the log file upon each encounter with the problem.</p>
<p>The way to solve this kind of problem, where we want to ignore the timestamp, is to understand how NimBUS handle incoming alarms. If it receives the same message two or more times, it would just upper the count, instead of creating a new entry in the alarm window.</p>
<p>Lets say our log file looks like this:</p>
<p><code>Mar 14 14:55:35 ErrorCheck: Oh noes, error detected in A51<br />
Mar 14 14:57:32 ErrorCheck: Oh noes, error detected in A51</code></p>
<p>We only want to get one alarm, but with a count of two (actually one), not two alarms which is identical except for the timestamp. First, set up logmon to detect the correct line in the log file using regular expressions. The logmon probe supports both pattern recognition and regular expressions, so make sure to use the right one. Regex starts and end with a forward slash, otherwise it assumes pattern is used.</p>
<p>In this case we can use the following simple regex:</p>
<p><code>/.*ErrorCheck.*/</code></p>
<p>Of course my regex where more advanced since I had to detect other parameters as well, since the output of our program also had to be checked.</p>
<p>Now, with this regex in place, we are at the point where every entry will be treated uniquely. But logmon also give you the possibility to construct your own message, and to define variables. And that is what we have to do.</p>
<p>We can construct variables both by row or column number. Since this is a single line, we will use the column offset. So, let us create the variables:</p>
<p><code>prog = column number 4<br />
error = column number 10</code></p>
<p>This is only a simplified view. The logmon probe has a user interface for this. Right click, add new variable (or something like that).</p>
<p>When this is done, add your own message text in the field saying so:</p>
<p><code>$prog: Error detected in $error</code></p>
<p>When this is set as the outbound message, NimBUS will count it instead of creating a new entry in the alarm view each time, since the message now is identical. If the error code changes, a new alarm will be sent.</p>
<h2>Short version:</h2>
<p>Create your own output message when using NimBUS logmon probe on a log file which has a timestamp.</p>
<p>(<em>This short version was a lot better and could have saved me some time</em>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/03/15/nimbus-and-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Running Web Server as a Virtual Machine</title>
		<link>http://blog.torh.net/2009/02/18/running-web-server-as-a-virtual-machine/</link>
		<comments>http://blog.torh.net/2009/02/18/running-web-server-as-a-virtual-machine/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 21:15:51 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=341</guid>
		<description><![CDATA[For several months now I’ve been planning to virtualize my home server. That’s the server hosting this blog, among other things. For starters it would give me some more room to test different applications on separate operating system, but without &#8230; <a href="http://blog.torh.net/2009/02/18/running-web-server-as-a-virtual-machine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">For several months now I’ve been planning to virtualize my home server. That’s the server hosting this blog, among other things. For starters it would give me some more room to test different applications on separate operating system, but without the hassle of dealing with several physical computers.</p>
<p class="MsoNormal"><span lang="EN-US">One of my ideas is to test web application prior to deployment. This is kind of hard now that I only have one machine. It’s would be shameful if I accidently killed the web service because of a faulty configuration. Also I have a few projects which I want to separate from the machine visible on the internet.</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://www.vmware.com/products/server/">VMware Server</a> is a free product which can be installed on top of either Windows or Linux, so it’s not a bare-metal hypervisor. I recommend running it on top of Linux for minimal footprint, not to mention all the rebooting you have to do with Windows. A minimal <a href="http://www.ubuntu.com/">Ubuntu server</a> installation takes less than 1GB of disc space, and use next to nothing when it comes to terms of memory.</span></p>
<p class="MsoNormal"><span lang="EN-US">For the moment I’m doing some testing with one <a href="http://dev.mysql.com/">mySQL server</a>, one <a href="http://apache.org/">Apache web server</a> and one server running <a href="http://varnish.projects.linpro.no/">Varnish</a>, which is a cache/proxy service. It’s not because I’m expecting high load in the near future, but it’s an interesting solution. </span></p>
<p class="MsoNormal"><span lang="EN-US">Anyway; the next few months I expect this blog to focus more on virtualization, but I can’t guarantee anything. I would be satisfied if I keep writing semi regular, no matter the topic.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2009/02/18/running-web-server-as-a-virtual-machine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configuring Static Routes on CentOS 4</title>
		<link>http://blog.torh.net/2008/09/18/configuring-static-routes-on-centos-4/</link>
		<comments>http://blog.torh.net/2008/09/18/configuring-static-routes-on-centos-4/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:31:57 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[routing network networking linux centos gateway]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=139</guid>
		<description><![CDATA[Last night we did some upgrades on a system in our datacenter. Among other things moving a few services from physical computers to virtual ones. One of these new machines needed contact with three different physical networks, and even more &#8230; <a href="http://blog.torh.net/2008/09/18/configuring-static-routes-on-centos-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last night we did some upgrades on a system in our datacenter. Among other things moving a few services from physical computers to virtual ones. One of these new machines needed contact with three different physical networks, and even more subnets.<br />
If you don&#8217;t want to read about my whole example network, skip to the &#8220;fun part&#8221;.</p>
<p>In this blog entry I will use some bogus internal network addresses. We had the following:<br />
<code><br />
eth0 directly connected to 10.0.100.0/24<br />
eth1 directly connected to 192.168.0.0/24<br />
eth2 directly connected to 192.168.10.0/24<br />
</code></p>
<p>Our new (virtual) server was configured using <em>192.168.0.1</em> as default gateway, via <em>eth1</em>. But we also needed to reach the following networks via <em>eth2</em>:</p>
<ul>
<li>192.168.20.0/24</li>
<li>192.168.30.0/24</li>
<li>192.168.55.0/24</li>
<li>10.50.0.0/16</li>
</ul>
<p>Configuring this &#8220;on-the-fly&#8221; is easy. All we have to do is run the following commands as root:<br />
<code><br />
route add -net 192.168.20.0/24 gw 192.168.10.5<br />
route add -net 192.168.30.0/24 gw 192.168.10.5<br />
route add -net 192.168.55.0/24 gw 192.168.10.5<br />
route add -net 10.50.0.0/16 gw 192.168.10.5<br />
</code></p>
<p>As you have guessed, <em>192.168.10.5</em> is the gateway being connected to <em>eth2</em>. Now the following is taking place:</p>
<p>Traffic for 10.0.100.0/24 is directly pushed out eth0, no routing needed.<br />
Traffic for 192.168.0.0/24 is directly pushed out eth1, no routing needed.<br />
Traffic for 192.168.10.0/24 is directly pushed out eth2, no routing needed.<br />
Traffic for 192.168.20.0/24, 192.168.30.0/24, 192.168.55.0/24 and 10.50.0.0/16 is pushed to gateway 192.168.10.5 via eth2.<br />
Everything else is directed to gateway 192.168.0.1 via eth1.</p>
<h4><strong>Fun Part</strong></h4>
<p>To make this routing permanent, meaning it will return upon reboot, we need to store this information somewhere. In this case we&#8217;re using CentOS 4, so the file we need to edit is <em>/etc/sysconfig/static-routes</em>. Per default this file doesn&#8217;t exists, at least it didn&#8217;t on my machine, so I created one and entered the following:<br />
<code><br />
any net 192.168.20/24 gw 192.168.10.5<br />
any net 192.168.30/24 gw 192.168.10.5<br />
any net 192.168.55.0/24 gw 192.168.10.5<br />
any net 10.50.0.0/16 gw 192.168.10.5<br />
</code></p>
<p>Also, check the files <em>/etc/sysconfig/network-scripts/ifcfg-ethx</em>, replace <em>x</em>. Only <em>eth1</em>, in my example, should have a line which says &#8220;GATEWAY=192.168.0.1&#8243;. If anyone of the other files also has a line which starts with &#8220;GATEWAY&#8221;, something will most likely go wrong.</p>
<p>I&#8217;m not sure how interesting this is for anyone. But at least I hope someone will benefit from it. I might start some more &#8220;in-depth&#8221; articles about network configuration in the future.</p>
<p><em>Please leave a comment if you found this useful, or ask questions if there is something I can improve.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2008/09/18/configuring-static-routes-on-centos-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Different Fan Behaviour on ThinkPad X61 than X31</title>
		<link>http://blog.torh.net/2008/06/23/different-fan-behaviour-on-thinkpad-x61-then-x31/</link>
		<comments>http://blog.torh.net/2008/06/23/different-fan-behaviour-on-thinkpad-x61-then-x31/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 06:37:25 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[acpi]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[temperature]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x31]]></category>
		<category><![CDATA[x61]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=43</guid>
		<description><![CDATA[Since I got my new Lenovo ThinkPad X61, I have discovered that the CPU fan is behaving rather differently than the one I have in my IBM ThinkPad X31. That is the fan makes a lot more noise when idle &#8230; <a href="http://blog.torh.net/2008/06/23/different-fan-behaviour-on-thinkpad-x61-then-x31/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I got my new Lenovo ThinkPad X61, I have discovered that the CPU fan is behaving rather differently than the one I have in my IBM ThinkPad X31. That is the fan makes a lot more noise when idle on the X61.</p>
<p>For the record. I&#8217;m running Ubunty Hardy (8.04) on the X61 and Ubuntu Gutsy (7.04) on the X31. Both 32-bit systems.</p>
<p>The first thing I did was checking <a href="http://launchpad.net/">Launchpad.net</a> for any known bugs. I found <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/224876">bug 224876</a> to be promising, it&#8217;s titled &#8220;Hardy does not control the CPU fan properly.&#8221;<br />
After reading this thread I ran the tests described myself, which gave these results.</p>
<p><b>Machine temperature and fan speed when idle (X61):</b><br />
<code><br />
$ cat /proc/acpi/thermal_zone/THM0/temperature<br />
temperature:             41 C<br />
$ cat /proc/acpi/thermal_zone/THM1/temperature<br />
temperature:             42 C<br />
$ cat /proc/acpi/ibm/fan<br />
status:		enabled<br />
speed:		3207<br />
level:		auto<br />
</code></p>
<p><b>After 5 minutes of &#8220;yes | sha512sum&#8221; (X61):</b><br />
<code><br />
$ cat /proc/acpi/thermal_zone/THM0/temperature<br />
temperature:             76 C<br />
$ cat /proc/acpi/thermal_zone/THM1/temperature<br />
temperature:             78 C<br />
$ cat /proc/acpi/ibm/fan<br />
status:		enabled<br />
speed:		3242<br />
level:		auto<br />
</code></p>
<p>As you can see there is as good as no change in the fan speed.<br />
However; doing the same check on my older, one core, IBM ThinkPad X31.<br />
I get this results:</p>
<p><b>Machine temperature and fan speed when idle (X31):</b></p>
<p><code><br />
$ cat /proc/acpi/thermal_zone/THM0/temperature<br />
temperature:             44 C<br />
$ cat /proc/acpi/ibm/fan<br />
status:		enabled<br />
speed:		0<br />
level:		auto<br />
</code></p>
<p>Actually, the fan doesn&#8217;t start until the temperature reach 68 degrees Celsius. Then it will speeds up to around ~3500 rpm, thus keeping the processor at around 70 degrees Celsius during &#8220;yes | sha512sum&#8221;.</p>
<p>My question is: Why does the fan constantly run on the X61? Is it really necessary to keep the processor cool? I must say I prefer the silence of the X31 when I&#8217;m just browsing the web.</p>
<p><i><a href="http://journal.boblycat.org/karltk/">Karl Trygve</a> has suggested that this is a result of a new design team and BIOS which is more restrictive than the one found on the X31.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2008/06/23/different-fan-behaviour-on-thinkpad-x61-then-x31/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu Hardy and Hibernate Issues</title>
		<link>http://blog.torh.net/2008/06/11/ubuntu-hardy-and-hibernate-issues/</link>
		<comments>http://blog.torh.net/2008/06/11/ubuntu-hardy-and-hibernate-issues/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 17:05:56 +0000</pubDate>
		<dc:creator>Tor Håkon Haugen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[8.04]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[splash]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x61]]></category>

		<guid isPermaLink="false">http://blog.torh.net/?p=42</guid>
		<description><![CDATA[As I mentioned in my last post I had some minor problems with Ubuntu Hardy (8.04) and hibernation. It didn&#8217;t always work. However it now seems like I might have overcome this problem. At first I thought it might had &#8230; <a href="http://blog.torh.net/2008/06/11/ubuntu-hardy-and-hibernate-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in <a href="http://blog.torh.net/2008/06/08/thinkpad-x61/">my last post</a> I had some minor problems with Ubuntu Hardy (8.04) and hibernation. It didn&#8217;t always work.</p>
<p>However it now seems like I might have overcome this problem. At first I thought it might had something to do with my docking station. Hibernating while docked, booting up while not and vice versa. The problem was that the machine would freeze during startup after being in hibernation. So to be able to actually see what was going on, I removed the splash screen, and afther this I haven&#8217;t had any problems with hibernate what so ever.</p>
<p>Come to think of it, this isn&#8217;t the only time the splash screen have caused problems. I had another machine where it refused to boot as long as the splash parameter was set. Luckily, with grub, we are able to edit the boot parameters at boot. Something that wasn&#8217;t possible with LILO in the good old days.</p>
<p>To remove the splash screen more permanently than editing grub at each boot. You can,<del>would be to edit the file /boot/grub/menu.1st and remove the word &#8216;splash&#8217; from the kernel parameters. Just remember that this will sneak its way in the next time you upgrade the kernel. Or rather, Ubuntu upgrades your kernel.</del> as <a href="http://blaagg.tadkom.net/">Stian</a> said in the first comment, edit the line &#8220;# defoptions=quiet splash&#8221; to &#8220;#defopts=&#8221;quiet nosplash&#8221; in the file /boot/grub/menu.1st. Do not remove the leading #.</p>
<p><em>Please leave a comment if you found this useful.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.torh.net/2008/06/11/ubuntu-hardy-and-hibernate-issues/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

