<?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>adam.golebiowski.eu/blog &#187; english</title>
	<atom:link href="http://adam.golebiowski.eu/blog/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://adam.golebiowski.eu/blog</link>
	<description>here be dragons</description>
	<lastBuildDate>Wed, 09 Sep 2009 16:56:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ethernet bridging with OpenVPN on vserver-enabled host</title>
		<link>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/</link>
		<comments>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 21:58:13 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLD]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/?p=30</guid>
		<description><![CDATA[Intro Openvpn&#8217;s ethernet bridging howto comes with simple setup scripts that you can use to bridge internal interface (e.g. eth0) with virtual one (e.g. tap0). Since standard system tools in PLD do not let you create tap interfaces, you have to care about creating one on your own. Hopefully you can use openvpn&#8217;s &#8211;mktun command [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><strong>Intro</strong></p>
<p>Openvpn&#8217;s <a href="http://openvpn.net/index.php/documentation/miscellaneous/ethernet-bridging.html">ethernet bridging howto</a> comes with simple setup scripts that you can use to bridge internal interface (e.g. eth0) with virtual one (e.g. tap0). Since standard system tools in PLD do not let you create tap interfaces, you have to care about creating one on your own. Hopefully you can use openvpn&#8217;s &#8211;mktun command line switch or handy little tool called tunctl to create one.</p>
<p>This has one drawback &#8212; you can&#8217;t easily use it with standard PLD interface config files (/etc/sysconfig/interfaces/ifcfg-foo). Of course you could set up the interface from rc.local, but things are getting more complicated if you are using vserver on the same machine that is supposed to act as a openvpn server.</p>
<p>The problem is &#8211; after you start your vserver guest systems, they have their virtual networking set up and bound to ethX (or whatever device you set them up to). If you&#8217;d try to set bridge at this time, you&#8217;d run into trouble. Not only this could cause problems with services on host system, but what&#8217;s worse &#8211; your vserver guest systems would loose network connectivity.</p>
<p>You could try to write your own init script and run it somewhere between networking and vserver. Slightly better, but still not perfect. Luckily, there&#8217;s a better approach.</p>
<p>Obiously the scenario I described above only matters if one of your vservers uses ethernet card that you plan to be a part of bridge interface. In case of ethernet bridging, this means at least one of your vserver (as it was in my case) vservers provides service to LAN.</p>
<p><strong>Ethernet bridging with OpenVPN on vserver-enabled host &#8211; PLD way </strong></p>
<p>In my configuration, I needed to connect two networks over Internet. I need to bridge them becase of various proprietary stuff that cannot be reconfigured. For the sake of this howto, we will name the gw machines in both locations hq and branch, each of them having two NICs, eth0 (external &#8211; internet), and eth1 (internal &#8212; lan).</p>
<p>hq eth0: &lt;irrelevant&gt;<br />
hq eth1: 10.0.0.1/8</p>
<p>branch office eth0: &lt;irrelevant&gt;<br />
branch office eth1: 10.0.10.1/8</p>
<p>There are also a few other ip addresses assigned on both hq&#8217;s interfaces &#8212; these are used by vserver guest systems.</p>
<p>Before we begin, make sure you have all necessary tools:<br />
# poldek -Qiv  bridge-utils openvpn easy-rsa umlinux-tools</p>
<p>What we need is to prepare /etc/sysconfig/interfaces/ifcfg-br0 with slightly modified content:</p>
<blockquote>
<pre># ifcfg-br0
TAP=$(tunctl -b -t tap0)
DEVICE=br0
IPADDR1=10.0.0.1/8
ONBOOT=yes
BRIDGE_DEVS="eth1 $TAP"
SPANNING_TREE=no
# eof</pre>
</blockquote>
<p>Alternatively you could use openvpn binary to set up tap device: <em>&#8222;openvpn &#8211;mktun &#8211;dev tap0&#8243;</em> &#8211; it&#8217;s up to you. Note that if you choose to use openvpn binary, you will need to</p>
<p><strong>What&#8217;s next</strong></p>
<p>Once it is done, you can follow the official <a href="http://openvpn.net/index.php/documentation/miscellaneous/ethernet-bridging.html">ethernet bridging howto</a> &#8211; just skip the bridge-start / bridge-stop scripts. Here&#8217;s a sample configuration for hq machine (openvpn server):</p>
<blockquote>
<pre># hq's openvpn config
local 1.2.3.4 # hq public ip address
port 1194
proto tcp
dev tap0
ca /etc/easy-rsa/keys/ca.crt
cert /etc/easy-rsa/keys/hq.crt
key /etc/easy-rsa/keys/hq.key  # This file should be kept secret
dh /etc/easy-rsa/keys/dh1024.pem
server-bridge 10.0.0.1 255.0.0.0 10.0.10.3 10.0.10.100
push "route 10.0.0.0 255.0.0.0"
ifconfig-pool-persist /etc/openvpn/ipp-hq.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-hq-status.log
log /var/log/openvpn-hq-log
verb 5
# eof</pre>
</blockquote>
<p>You will also need to reconfigure vserver to bind to bridge interface (e.g. br0) &#8212; just edit <em>/etc/vservers/$vserver/interface/$num/dev</em> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mommy, why is there a server in the house?</title>
		<link>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/</link>
		<comments>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 22:50:52 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLD]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/?p=21</guid>
		<description><![CDATA[So why is there a server in our house? Because it&#8217;s fun. Few months ago (before I saw this, honestly!) dad and I agreed that having a family file server was a good idea. What conviced us what the mess we were having with family photos &#8211; some of them were on my father&#8217;s computer, [...]]]></description>
			<content:encoded><![CDATA[<p>So why is there a server in our house?  Because it&#8217;s fun.</p>
<p>Few months ago (before I saw <a href="http://gizmodo.com/342499/microsofts-brainwashing-childrens-book-mommy-where-do-servers-come-from">this</a>, honestly!) dad and I agreed that having a family file server was a good idea. What conviced us what the mess we were having with family photos &#8211; some of them were on my father&#8217;s computer, some on mine. We also wanted to get rid of duplicate data (apps, few isos, etc.) between our computers.  What was surprising to me, my mom was also enthusiastic about the idea.  Before we stared, we decided that our server has to:</p>
<ul>
<li>be quiet (preferably fanless),</li>
<li>be economic / ecologic (small power consumption),</li>
<li>have a lot of space (in RAID-1 setup, if possible),</li>
<li>cost no more than 1000 PLN (ca 300 €),</li>
</ul>
<p style="text-align: left;">After doing some research, I decided to buy one of VIA&#8217;s EPIA motherboards &#8211; which are small (mini-itx), fanless (!), and consume relatively low power (ca. 15 W) comparing to their full-size competitors. From my rough calculations whole system would consume no more that 30-40W of energy, beside the already mentioned motherboard (with integrated CPU, NIC and VGA), there would be a 1TB SATA disk. With 40W of power conspution, estimated cost of running it 24/7 was:</p>
<p style="text-align: center;">24 (hours) * 30 (days) * 0.04 kW (power consumption) * 0.3 PLN (estimated price of 1kWh of energy) ~= 10 PLN</p>
<p style="text-align: left;">As low as 10 PLN (about 3 €) a month. Boy I wish I could pay that &#8222;much&#8221; on a gas station &#8230;</p>
<p>It took about three weeks before I bought all the required parts:</p>
<ul>
<li>EPIA SP-8000EG FANLESS motherboard,</li>
<li>a <a href="http://www.allegro.pl/item385095653_obudowa_d_153_via_epia_mini_itx.html">D-153</a> chasis (designed for VIA&#8217;s EPIA motherboards),</li>
<li>1TB Samsung HD103UJ SATA HDD,</li>
<li>1GB DDR RAM,</li>
</ul>
<p>Total cost: 1003 PLN (incl. VAT), which is about 300 €. Once assembled it looks like this:</p>
<p><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1.jpg"><img class="alignnone size-medium wp-image-22" title="epiath_1" src="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1-300x219.jpg" alt="" width="300" height="219" /> </a><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_2.jpg"><img class="alignnone size-medium wp-image-23" title="epiath_2" src="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_2-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1.jpg"></a></p>
<p>Maybe it&#8217;s not beautiful, but it doesn&#8217;t have to be.<br />
Now to the more technical part, it is powered by <a href="http://www.pld-linux.org/">PLD</a> Th:</p>
<p><em>[root@epiath ~]# cat /proc/cpuinfo<br />
processor       : 0<br />
vendor_id       : CentaurHauls<br />
cpu family      : 6<br />
model           : 9<br />
model name      : VIA Nehemiah<br />
stepping        : 8<br />
cpu MHz         : 800.047<br />
cache size      : 64 KB<br />
fdiv_bug        : no<br />
hlt_bug         : no<br />
f00f_bug        : no<br />
coma_bug        : no<br />
fpu             : yes<br />
fpu_exception   : yes<br />
cpuid level     : 1<br />
wp              : yes<br />
flags           : fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse up rng rng_en ace ace_en<br />
bogomips        : 1602.68<br />
clflush size    : 32[root@epiath ~]#</p>
<p></em></p>
<p>And it was so quiet&#8230;  image a system where the most nosiest component is its hdd (about 27dB). Unfortunately, it failed as a fanless system, the hdd warmed up to more than 45°C. We decided to insert small, 8x8cm fan inside the chasis. It helped a lot &#8211; the hdd temperature dropped almost isntantly to less than 35°C, and as I am writing thist post, hddtemp reports 28°C. At the price of lower temperature, we got a bit louder system and a slightly higher power consumption.</p>
<p>Epiath (I probably suck at naming my systems) is a new project &#8211; it went &#8222;live&#8221; about three weeks ago, and is still not finished, there are few thins I still plan to do:</p>
<ul>
<li>remote access (OpenVPN), so that my brother could share his photos as well,</li>
<li>track new files (with find), and announce them with mail sent on a daily basis,</li>
<li>develop a search engine &#8211; search throuch file names at a minimum, perhaps we could make use of beagle to scan through contents as well (any experience with that anyone?),</li>
<li>NFS access &#8211; or is it more convenient to use SMB, even for a Linux user?</li>
</ul>
<p>So far, I am quite happy we decided to build our home server &#8211; even though it did cost a bit (you don&#8217;t spend 300  € everyday, do you?).</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>diskless PLD &#8211; part 1</title>
		<link>http://adam.golebiowski.eu/blog/2008/03/24/diskless-pld-part-1/</link>
		<comments>http://adam.golebiowski.eu/blog/2008/03/24/diskless-pld-part-1/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 10:10:44 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[PLD]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/2008/03/24/diskless-pld-part-1/</guid>
		<description><![CDATA[&#8222;disks are cheap&#8221; They are, but nevertheless for some reasons &#8211; like saving few watts of energy, or just for pure fun &#8211; one may want to create a diskless workstation. One of our customers (who deserves a separate entry) runs a medium sized grocery shop. Recently we had to replace one of the computers [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><em>&#8222;disks are cheap&#8221;</em></p>
<p>They are, but nevertheless for some reasons &#8211; like saving few watts of energy, or just for pure fun &#8211; one may want to create a diskless workstation.</p>
<p>One of <a href="http://www.agmk.net/">our</a> customers (who deserves a separate entry) runs a medium sized grocery shop. Recently we had to replace one of the computers that for that last few years served as terminal at the cash desk. We decided to put a diskless workstation there &#8211; after all, if server goes down, we are in big trouble anyway, and a workstation that can&#8217;t boot would be the least of our problems.</p>
<p>Not being an experienced PXE user, I decided to write a small tutorial for those who would like to play a bit with diskless systems. I will provide you with a short howto that shows how to successfully boot PLD on a diskless computer.</p>
<p>In this part we will learn to boot <a href="http://rescuecd.pld-linux.org/">PLD RescueCD</a>. This has been previously described by <a title="PLD RescueCD i PXE" href="http://blog.jajcus.net/2005/07/30/pld-rescuecd-i-pxe/">jajcus</a> and used by areq as a semi-official <a href="http://rescuecd.pld-linux.org/download/current/PXE.txt">RescueCD-PXE howto</a> (polish). I assume you have two computers &#8211; a server and a diskless client, and you know MAC address of the latter.</p>
<p>First we need ot install few packages:</p>
<p># poldek -Qiv dhcp rlinetd tftpd-hpa syslinux</p>
<p>where dhcp is a DHCP server (in case you don&#8217;t have one yet), tftpd-hpa being a TFTP server and syslinux provides us with pxelinux.0 file (more on this later). If you already have an inet daemon, you may skip rlinetd. If not, you may install it, or some other inetd implementation, like xinetd.</p>
<p>Than we need to obtain <a href="http://rescuecd.pld-linux.org/">PLD RescueCD</a>, I downloaded 2.95 which was the most recent version as of this writing. Once you have it, either burn it and mount the cd, or just mount the iso and copy files we need :</p>
<p># mkdir /mnt/iso<br />
# mount -o loop RCDx86 _295.iso /mnt/iso<br />
# cp /mnt/iso/rescue.cpi /var/lib/tftp<br />
# cp /mnt/iso/boot/isolinux/vmlinuz /var/lib/tftp/rescue.vmlinuz<br />
# chmod 644 /var/lib/tftp/rescue.{cpi,vmlinuz}<br />
# umount /mnt/iso</p>
<p>Where vmlinuz is a kernel image, and rescue.cpi &#8211; an initrd &#8211; in case of RescueCD it&#8217;s more than that, but that&#8217;s ok.</p>
<p>From the syslinux package, we need pxelinux.0, which we also place in /var/lib/tftp:</p>
<p># cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftp</p>
<p>I believe pxelinux.0 can be best described as the network bootloader. It reads configuration from a specified TFTP server and behaves as told to. Both LILO and GRUB (or SILO in case of SPARC) need a config file to run properly. That&#8217;s no different in our case.</p>
<p>By default, PXELINUX looks up for several config files under the ${tftpdir}/pxelinux.cfg dir (where $tftpdir is /var/lib/tftp by default), starting from file named after the NIC GUID (shown on startup), going through file named as MAC address, through IP based configs till the file named &#8216;default&#8217; and stops once it finds one. This lets you to be as flexible as you want to be &#8211; you may want to provide separate files for each workstation you have, or have one file for them all. In this tutotrial, we will try to keep things simple, and will refer to the default file.</p>
<p># mkdir /var/lib/tftp/pxelinux.cfg<br />
# touch/var/lib/tftp/pxelinux.cfg/default</p>
<p>Syntax of pxelinux config file is pretty simple and easy to understand, let me provide you with a complete setup:</p>
<p># cat /var/lib/tftp/pxelinux.cfg/default<br />
default rescuecd<br />
label rescuecd<br />
kernel rescue.vmlinuz<br />
append initrd=rescue.cpi root=/dev/ram0<br />
#</p>
<p>If I were to write it for GRUB, it would more or less like this:</p>
<p># cat grub.test<br />
default 0<br />
title rescuecd<br />
kernel /vmlinuz root=/dev/ram0<br />
initrd  /rescue.cpi<br />
#</p>
<p>Great! Our TFTP server is now set up. What&#8217;s left is to tell DHCP how to use all these goodies. I assume you have DHCP configured (or know how to do it), if not, please refer to e.g. <a href="http://pl.docs.pld-linux.org/uslugi_dhcpd.html">official PLD documentation</a> (polish).  What you need to add is a group section that may look like this:</p>
<p># grep -A 20 group /etc/dhcpd.conf</p>
<blockquote><p>  group {</p>
<blockquote><p>      next-server 192.168.1.2;<br />
filename &#8222;pxelinux.0&#8243;;<br />
host comp {</p>
<blockquote><p>            hardware ethernet 00:12:34:56:78:90;<br />
fixed-address 192.168.1.3;</p></blockquote>
<p>}</p></blockquote>
<p>}</p></blockquote>
<p>#</p>
<p>This should be pretty much self-explanatory, but to make things clear, <em>next-server</em> tells a client IP address of the server that stores a file we should load and boot. As one may assume <em>filename </em>tells dhcpd which file to load through TFTP. host {} declares a static entry for a given machine &#8211; you may want to have a fixed IP address for it &#8211; so that you can remotly log in.</p>
<p>Once you are done, you should restart the services:</p>
<p># service dhcp restart<br />
# service rc-inetd restart</p>
<p>After that you should be able to sucessfully boot form the diskless workstation. In the next part we will learn how to boot PLD ac on a diskless workstation.</p>
<p>Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2008/03/24/diskless-pld-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>01&#215;01 / s01e01</title>
		<link>http://adam.golebiowski.eu/blog/2008/02/23/01x01-s01e01/</link>
		<comments>http://adam.golebiowski.eu/blog/2008/02/23/01x01-s01e01/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 00:18:26 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/2008/02/23/01x01-s01e01/</guid>
		<description><![CDATA[Tell me, have you ever seen first episode of the first of any TV series? After kinda hard week I decided to waste some time doing absolutely nothing productive &#8211; ended up firing up fireplace (sound of fire slowly eating pieces of wood rule), setting up projector, opening few cans of beer and watching movies [...]]]></description>
			<content:encoded><![CDATA[<p>Tell me, have you ever seen first episode of the first of any TV series?</p>
<p>After kinda hard week I decided to waste some time doing absolutely nothing productive &#8211; ended up firing up fireplace (sound of fire slowly eating pieces of wood rule), setting up projector,  opening few cans of beer and watching movies . Some of them were first episodes of MacGyver, A-Team and Yattaman &#8211; remember those?</p>
<p>What rocks about watching 01x01s of series you watched more than a few episodes is realizing how big part of the main theme comes from the 01&#215;01. After watching 1/3 of MacGyver&#8217;s 01&#215;01 I can tell that at least three scenes come from this very episode. Oh, did you know that in A-Team&#8217;s 01&#215;01, one of the team&#8217;s member (Face) was played by another actor than in all other episodes? That&#8217;s nothing &#8211; I saw MacGyver shooting a machine gun! w00t!</p>
<p>On contrary, Yattaman&#8217;s 01&#215;01 doesn&#8217;t provide anything special, I still don&#8217;t know how this kids managed to build YattaDog, or any other YattaMachines. What we find out (more or less) is why the Drombos are looking for the skull.</p>
<p>Anyone has 01&#215;01 of Gigi, Subasa, General Daimos or Calendar Man (speaking of anime) and is willing to share? I was also wondering if there is a person who watched first episode of &#8222;Bald and beautiful&#8221; &#8230;</p>
<p>What&#8217;s the point of this post? Something you wouldn&#8217;t expect. I always thought the the latter quote from this <a href="http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/fortunes-pl/djurban.diff?r1=1.2;r2=1.3">djurban&#8217;s commit</a> sucks, but recently realized that it is beautifil. Djurban &#8211; I will never be as close to where you are now (speaking of the level of knowledge you possess), but I can tell this quote is true. Sometimes you just have to zero yourself. This is what I am doing today.</p>
<p>PS: I hate it I have no time to work on PLD recently. Gotta work less&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2008/02/23/01x01-s01e01/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
