<?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>Scienco.org &#187; Linux</title>
	<atom:link href="http://www.scienco.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scienco.org</link>
	<description>Life&#039;s too short to be unenthusiastic</description>
	<lastBuildDate>Thu, 07 Jul 2011 13:47:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<atom:link rel="next" href="http://www.scienco.org/category/linux/feed/?page=2" />

		<item>
		<title>Ubuntu on Toshiba AC100</title>
		<link>http://www.scienco.org/2011/ubuntu-on-toshiba-ac100/</link>
		<comments>http://www.scienco.org/2011/ubuntu-on-toshiba-ac100/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 13:47:55 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=290</guid>
		<description><![CDATA[I have recently bought a Toshiba AC100-10D (it was quite cheap because it's now old, but the hardware is still quite similar to that of the new tablets). I bought it with the expections of installing Ubuntu on it (I don't really need Android - I have an Android phone which is good for that [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently bought a Toshiba AC100-10D (it was quite cheap because it's now old, but the hardware is still quite similar to that of the new tablets). I bought it with the expections of installing Ubuntu on it (I don't really need Android - I have an Android phone which is good for that purpose, but I'd like Latex, R etc. available on a netbook).</p>
<p>I found some tutorials on how to install Ubuntu, but I didn't really have any success until I found <a href="http://salaliitto.com/~gildean/ac100/wiki/phh/">http://salaliitto.com/~gildean/ac100/wiki/phh/</a> . So thanks a lot to gildean! I would recommend that you follow that guide if you want to install Ubuntu to your Toshiba AC100. At least until Ubuntu 11.* supports the machine better, see e.g. <a href="https://launchpad.net/~ac100/+archive/ppa">https://launchpad.net/~ac100/+archive/ppa</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2011/ubuntu-on-toshiba-ac100/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting up a huge file on one line with sed</title>
		<link>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/</link>
		<comments>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 23:59:16 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=222</guid>
		<description><![CDATA[Sometimes when I export MySQL to files, I end up having one huge query on one line. It can be quite annoying! I'd rather want it on several lines; in that way it easier to just copy out a fragment of the query. And it also seems that some editors handle several lines better than [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when I export MySQL to files, I end up having one huge query on one line. It can be quite annoying! I'd rather want it on several lines; in that way it easier to just copy out a fragment of the query. And it also seems that some editors handle several lines better than one huge. Well, in this case my line looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>With this sed-command, every entry got its own line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> s<span style="color: #000000; font-weight: bold;">/</span>\<span style="color: #7a0874; font-weight: bold;">&#41;</span>,\<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>\<span style="color: #7a0874; font-weight: bold;">&#41;</span>,\\n\<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>g export.sql <span style="color: #000000; font-weight: bold;">&gt;</span> one-per-line.sql</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import VCF-file to Nokia 6300 from Ubuntu through bluetooth</title>
		<link>http://www.scienco.org/2008/import-vcf-file-to-nokia-6300-from-ubuntu-through-bluetooth/</link>
		<comments>http://www.scienco.org/2008/import-vcf-file-to-nokia-6300-from-ubuntu-through-bluetooth/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 13:47:39 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Mobile phones]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gammu]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[vcf]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=196</guid>
		<description><![CDATA[Today I got a new Nokia 6300 - my old Sony Ericsson W810i had hard times charging. Of course I wanted to copy my phonebook onto my new phone, but it wasn't as easy as I hoped for - but after a while I found an alternative and easy way. First you need your phonebook [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got a new Nokia 6300 - my old Sony Ericsson W810i had hard times charging. Of course I wanted to copy my phonebook onto my new phone, but it wasn't as easy as I hoped for - but after a while I found an alternative and easy way.<span id="more-196"></span></p>
<p>First you need your phonebook as a VCF-file. This can be done be backing up your phonebook to the memory stick (this option is available on the W810i and possibly on several others). Now copy the file, e.g. by bluetooth or with a cable.</p>
<p>Now connect the Nokia 6300 through bluetooth and write down the port - it has the format 00:11:22:33:44:55.</p>
<p>Now install <code>gammu</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gammu</pre></div></div>

<p>Then create a config file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> ~<span style="color: #000000; font-weight: bold;">/</span>.gammurc</pre></div></div>

<p>with this content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>gammu<span style="color: #7a0874; font-weight: bold;">&#93;</span>
port = 00:<span style="color: #000000;">11</span>:<span style="color: #000000;">22</span>:<span style="color: #000000;">33</span>:<span style="color: #000000;">44</span>:<span style="color: #000000;">55</span> <span style="color: #666666; font-style: italic;"># change to fit your port</span>
model = <span style="color: #000000;">6300</span> <span style="color: #666666; font-style: italic;"># change to fit your model</span>
connection = bluephonet <span style="color: #666666; font-style: italic;"># if connecting with something else than bluetooth, you should change this</span>
synchronizetime = <span style="color: #c20cb9; font-weight: bold;">yes</span>
logfile = <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>.gammulog <span style="color: #666666; font-style: italic;"># change username to your actual username</span>
logformat = textalldate
use_locking =
gammuloc =</pre></div></div>

<p>And now check that everything is alright:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gammu <span style="color: #660033;">--identify</span></pre></div></div>

<p>And if it is, just copy the phonebook (remember to change the location of the VCF-file):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gammu restore Desktop<span style="color: #000000; font-weight: bold;">/</span>PB_Backup.vcf</pre></div></div>

<p>While restoring, I got errors like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Location <span style="color: #000000;">12</span>                    
    LUID                 : <span style="color: #ff0000;">&quot;00020000006D&quot;</span>
    Function not supported by phone.
Location <span style="color: #000000;">13</span>                    
    LUID                 : <span style="color: #ff0000;">&quot;000200000090&quot;</span>
    Function not supported by phone.
Location <span style="color: #000000;">14</span>                    
    LUID                 : <span style="color: #ff0000;">&quot;000200000007&quot;</span>
    Function not supported by phone.
Location <span style="color: #000000;">15</span>                    
    LUID                 : <span style="color: #ff0000;">&quot;0002000000E9&quot;</span>
    Function not supported by phone.</pre></div></div>

<p>But despite of that, it still worked.</p>
<p>I didn't know <code>gammu</code> before, but it seems very nice! Thanks to the authors of it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/import-vcf-file-to-nokia-6300-from-ubuntu-through-bluetooth/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FreeBSD 7.0 on Xen 3.2</title>
		<link>http://www.scienco.org/2008/freebsd-70-on-xen-32/</link>
		<comments>http://www.scienco.org/2008/freebsd-70-on-xen-32/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 16:05:31 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=184</guid>
		<description><![CDATA[After I got Xen installed on Ubuntu Server 8.04, I wanted to install FreeBSD 7.0, too. But this was in no regards as easy as installing Ubuntu Server 8.04 as a domU! To run a domU you have to possibilities with Xen: either with a modified kernel or using the so-called HVM (Hardware Virtual Machine) [...]]]></description>
			<content:encoded><![CDATA[<p>After I got Xen installed on Ubuntu Server 8.04, I wanted to install FreeBSD 7.0, too. But this was in no regards as easy as installing Ubuntu Server 8.04 as a domU!<span id="more-184"></span> To run a domU you have to possibilities with Xen: either with a modified kernel or using the so-called HVM (Hardware Virtual Machine) possibility. The latter has to be used when using operating systems on which the kernel cannot be changed, e.g. Windows. To be able to use the HVM-method, a compatible processor is required (please refer to <a href="http://wiki.xensource.com/xenwiki/HVM_Compatible_Processors">http://wiki.xensource.com/xenwiki/HVM_Compatible_Processors</a> for a list of these, but generally speaking Intel VT or AMD-V is required). The downside with HVM is that it doesn't yield as high performance as a modified kernel - generally speaking (optimized device drivers for some operating systems, e.g. Windows 2003 Server, should be available). On the other hand, the fact that you're able to use operating systems as domU without modifying the kernel is rather applicable! In general, please refer to <a href="http://wiki.xensource.com/xenwiki/OSCompatibility">http://wiki.xensource.com/xenwiki/OSCompatibility</a> in order to review operating system compatibility.</p>
<p>I, of course, prefer the use a modified kernel given the performance difference. In Ubuntu the same Xen-enabled kernel can be used for both dom0 and for domUs (and often is, too). It can be a bit tough to understand how it works, but don't mind about that.</p>
<p>Well, as said I wanted to use FreeBSD 7.0 as domU, so I needed to find an appropriate Xen-enabled kernel to use. As a starting point, I consulted section 21.2.2.2 in the Handbook at <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-guest.html">http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-guest.html</a>. Here it was possible to download a kernel for Xen 3.0, but I have Xen 3.2 - and the link to the kernel has broken anyway. Well, not much success here. And after several hours of search the web I hadn't find anything usable. Not besides noticing the fact that it didn't seemed like a task with high priority for the FreeBSD-folks to maintain a usable kernel for the newest version of Xen. Sad but true, apparently.</p>
<p>I accepted that fact, although it's laborious. So instead I used the HVM-method. As mentioned, you can use this method to install other operating systems with a unmodified kernel like Windows, too. </p>
<p>Firsty download the iso-file you want to use as a installation source. I did this on dom0:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> iso
<span style="color: #7a0874; font-weight: bold;">cd</span> iso
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.freebsd.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>FreeBSD<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ISO-IMAGES<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.0</span>-RELEASE-i386-bootonly.iso</pre></div></div>

<p>As with other domUs you have to decide whether to use a file, partition or whatever as a disk. Again I use a LV (logical volume) as the root file system, i.e. <code>/dev/lvmstore/lv2</code>, and a partition as swap, i.e. <code>/dev/sda7</code>. First create a configuration file <code>/etc/xen/domU2.cfg</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">name         = <span style="color: #ff0000;">'domU2'</span>
builder      = <span style="color: #ff0000;">'hvm'</span>
device_model = <span style="color: #ff0000;">'/usr/lib/xen/bin/qemu-dm'</span>
kernel       = <span style="color: #ff0000;">'/usr/lib/xen/boot/hvmloader'</span>
acpi         = <span style="color: #ff0000;">'0'</span>
memory       = <span style="color: #ff0000;">'512'</span>
maxmem       = <span style="color: #ff0000;">'1536'</span>
disk         = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'phy:/dev/lvmstore/lv2,hda,w'</span>,<span style="color: #ff0000;">'phy:/dev/sda7,hdb,w'</span>,<span style="color: #ff0000;">'file:/root/iso/7.0-RELEASE-i386-bootonly.iso,hdc:cdrom,r'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
vif          = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'type=ioemu,bridge=eth0'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
boot         = <span style="color: #ff0000;">'d'</span> 
vnc          = <span style="color: #ff0000;">'1'</span>
serial       = <span style="color: #ff0000;">'pty'</span>
on_poweroff  = <span style="color: #ff0000;">'destroy'</span>
on_reboot    = <span style="color: #ff0000;">'restart'</span>
on_crash     = <span style="color: #ff0000;">'restart'</span>
vcpus        = <span style="color: #ff0000;">'2'</span>
extra        = <span style="color: #ff0000;">'xencons=tty1'</span></pre></div></div>

<p>If you want a 64 bit domU, you can instead use this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">device_model = <span style="color: #ff0000;">&quot;/usr/lib64/xen/bin/qemu-dm&quot;</span></pre></div></div>

<p>And then start the machine:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xm create <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>domU2.cfg</pre></div></div>

<p>If you get an error like <code>losetup -r /dev/loop17 /root/iso/7.0-RELEASE-i386-bootonly.iso failed</code>, you can try run the command manually and use the newly create loop-device instead of the iso. First setup the device:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">losetup <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>loop17 <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>iso<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.0</span>-RELEASE-i386-bootonly.iso</pre></div></div>

<p>And then change the cfg-file accordingly:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#disk         = ['phy:/dev/lvmstore/lv2,hda,w','phy:/dev/sda7,hdb,w','file:/root/iso/7.0-RELEASE-i386-bootonly.iso,hdc:cdrom,r']</span>
disk         = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'phy:/dev/lvmstore/lv2,hda,w'</span>,<span style="color: #ff0000;">'phy:/dev/sda7,hdb,w'</span>,<span style="color: #ff0000;">'phy:/dev/loop17,hdc:cdrom,r'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Now verify that the machine is running - and destroy it afterwards (we need to setup some things before actually installing FreeBSD):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xm list
xm destroy domU2</pre></div></div>

<p>Please notice that with HVM we don't attach the console with the <code>-c</code>-parameter with <code>xm create</code> - instead we use VNC to connect to it until the system is installed. Because there's no X on dom0, we use X11-forwarding. From your workstation log into dom0 like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-X</span> root<span style="color: #000000; font-weight: bold;">@</span>dom0</pre></div></div>

<p>Now add this line to <code>/etc/xen/xend-config.sxp</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>vnc-listen <span style="color: #ff0000;">'0.0.0.0'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>And restart the service:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xend restart</pre></div></div>

<p>On your own workstation, you now use <code>vncviewer</code> to connect - just enter the address of your dom0-server and you'll automatically get connected to the FreeBSD-installation! This is of course a security issue, but you can deal with this in several ways, e.g. restrict which host that are able to connect to VNC. No matter what I highly recommend to disable VNC-access after the installation is done - at that time you can just connect with ssh to the domU. This is simply done by deleting <code>(vnc-listen '0.0.0.0')</code> in <code>/etc/xen/xend-config.sxp</code>.</p>
<p>When you have installed FreeBSD (or whatever system you've just installed), please remember to modify the config-file in order to unmount the iso-file and boot from the disk, i.e. on the parameters:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">disk         = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'phy:/dev/lvmstore/lv2,hda,w'</span>,<span style="color: #ff0000;">'phy:/dev/sda7,hdb,w'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
boot         = <span style="color: #ff0000;">'c'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/freebsd-70-on-xen-32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server 8.04 as domU</title>
		<link>http://www.scienco.org/2008/ubuntu-server-804-as-domu/</link>
		<comments>http://www.scienco.org/2008/ubuntu-server-804-as-domu/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 10:23:32 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[Hetzner]]></category>
		<category><![CDATA[network bridge]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=161</guid>
		<description><![CDATA[If you have followed the guide in "Xen on Ubuntu Server 8.04 (Hardy Heron) with complex disk setup" or have an environment similar to that, please read on - if not please read on, too . Since my server is hosted at Hetzner, this guide will be based on that. I want to use network [...]]]></description>
			<content:encoded><![CDATA[<p>If you have followed the guide in <a href="http://www.scienco.org/2008/xen-on-ubuntu-server-804-hardy-heron-with-complex-disk-setup/">"Xen on Ubuntu Server 8.04 (Hardy Heron) with complex disk setup"</a> or have an environment similar to that, please read on - if not please read on, too <img src='http://www.scienco.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Since my server is hosted at Hetzner, this guide will be based on that. I want to use network bridging.<span id="more-161"></span> To do that you need additional IP-addresses. My host has <code>213.x.x.6</code> and besides that I've got <code>78.x.x.1</code>, <code>78.x.x.2</code>, ..., <code>78.x.x.6</code> (plus a broadcasting address).On my host I've got this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># cat /etc/network/interfaces </span>
<span style="color: #666666; font-style: italic;">### Hetzner Online AG - installimage</span>
<span style="color: #666666; font-style: italic;"># Loopback device:</span>
auto lo
iface lo inet loopback
&nbsp;
<span style="color: #666666; font-style: italic;"># device: eth0</span>
auto eth0
iface eth0 inet static
  address <span style="color: #000000;">213</span>.x.x.6
  broadcast <span style="color: #000000;">213</span>.x.x.31
  netmask 255.255.255.224
  gateway <span style="color: #000000;">213</span>.x.x.1
&nbsp;
<span style="color: #666666; font-style: italic;"># default route to access subnet</span>
up route add <span style="color: #660033;">-net</span> <span style="color: #000000;">213</span>.x.x.0 netmask 255.255.255.224 gw <span style="color: #000000;">213</span>.x.x.1 eth0
&nbsp;
auto eth0:<span style="color: #000000;">1</span>
iface eth0:<span style="color: #000000;">1</span> inet static
  address <span style="color: #000000;">78</span>.x.x.1
  broadcast <span style="color: #000000;">78</span>.x.x.7
  netmask 255.255.255.248</pre></div></div>

<p>The plan is that the guests will get <code>78.x.x.2</code>, <code>78.x.x.3</code>, etc. and will use <code>78.x.x.1</code> as gateway (you'll see this later) - that's why I've assigned it to the host.</p>
<p>Well, after you have found out that Xen kernel is loaded with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-r</span>
xm list</pre></div></div>

<p>you'll be ready to proceed.</p>
<p>Now we want to make a domU with Ubuntu Server 8.04 with the program <code>debootstrap</code>. First identify the partitions you want to use. For the root filesystem I'll use <code>/dev/lvmstore/lv1</code> and for swap I'll use <code>/dev/sda6</code>. To prepare the partitions, please</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mkfs.xfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>lvmstore<span style="color: #000000; font-weight: bold;">/</span>lv1
mkswap <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda6</pre></div></div>

<p>Now it's time to install the guest system. First mount the root file system like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>lvmstore<span style="color: #000000; font-weight: bold;">/</span>lv1 <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

<p>Now just install it with this simple command (depending on your environment you might have to change the <code>--arch</code>-parameter):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">debootstrap <span style="color: #660033;">--arch</span> amd64 hardy <span style="color: #000000; font-weight: bold;">/</span>mnt http:<span style="color: #000000; font-weight: bold;">//</span>archive.ubuntu.com<span style="color: #000000; font-weight: bold;">/</span>ubuntu</pre></div></div>

<p>Now you should copy a couple of files:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`/*</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`/</span></pre></div></div>

<p>Now you should change a couple of files. Now</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>interfaces</pre></div></div>

<p>should have the content</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># cat /mnt/etc/network/interfaces </span>
auto lo
iface lo inet loopback
&nbsp;
auto eth0
iface eth0 inet static
  address <span style="color: #000000;">78</span>.x.x.2
  broadcast <span style="color: #000000;">78</span>.x.x.7
  netmask 255.255.255.248
  gateway <span style="color: #000000;">78</span>.x.x.1</pre></div></div>

<p>Here you see that I'm using the host as gateway.</p>
<p>And</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">hostname</span></pre></div></div>

<p>to change the hostname of the guest.</p>
<p>We also need to change the <code>fstab</code> - mine looks like this (remember to change <code>xfs</code> to <code>ext3</code> or similar if you're not using xfs):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># cat /mnt/etc/fstab </span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1 <span style="color: #000000; font-weight: bold;">/</span>    xfs  defaults <span style="color: #000000;">1</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda2 none swap sw       <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>The names <code>/dev/sda1</code> and <code>/dev/sda2</code> is assigned on a Xen configuration file  we'll get to that i a minute.</p>
<p>Now we prepare the network bridge at the host by:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf</pre></div></div>

<p>and change</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#net.ipv4.ip_forward=1</span></pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">net.ipv4.ip_forward=<span style="color: #000000;">1</span></pre></div></div>

<p>We also start the network bridge:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>network-bridge start</pre></div></div>

<p>Now reboot the host to enable the changes in <code>/etc/sysctl.conf</code>. After reboot please check that the bridge is okay:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">brctl show</pre></div></div>

<p>Now we create the file <code>/etc/xen/domU1.conf</code> with this content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># cat /etc/xen/domu1.cfg </span>
kernel      = <span style="color: #ff0000;">'/boot/vmlinuz-2.6.24-19-xen'</span>
ramdisk     = <span style="color: #ff0000;">'/boot/initrd.img-2.6.24-19-xen'</span>
memory      = <span style="color: #ff0000;">'512'</span>
maxmem      = <span style="color: #ff0000;">'1536'</span>
&nbsp;
root        = <span style="color: #ff0000;">'/dev/sda1 ro'</span>
disk        = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'phy:/dev/lvmstore/lv1,sda1,w'</span>,<span style="color: #ff0000;">'phy:/dev/sda6,sda2,w'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
name        = <span style="color: #ff0000;">'domU1'</span>
&nbsp;
vif	     = <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'bridge=eth0'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
on_poweroff = <span style="color: #ff0000;">'destroy'</span>
on_reboot   = <span style="color: #ff0000;">'restart'</span>
on_crash    = <span style="color: #ff0000;">'restart'</span>
&nbsp;
vcpus	     = <span style="color: #ff0000;">'2'</span>
extra       = <span style="color: #ff0000;">'xencons=tty1'</span></pre></div></div>

<p>This is the specs of the guest. This is a configuration making you able to ballon the amount of memory to 1,5 GB instead of the initial 512 MB. Please view <code>man xmdomain.cfg</code> for further details.</p>
<p>Now start the guest (the <code>-c</code> means that the console is attached to the guest immediately):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xm create <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>domu1.cfg <span style="color: #660033;">-c</span></pre></div></div>

<p>When the environment is started, login with the same password as on your host. Now check the network is okay, change the password, and update the system, respectively:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ping</span> <span style="color: #000000;">78</span>.x.x.1
<span style="color: #c20cb9; font-weight: bold;">passwd</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> dist-upgrade</pre></div></div>

<p>You'll probably see some locales errors. For my case (da_DK) it's fixed by this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">locale-gen da_DK.UTF8
tzselect
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;export LANG=C&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></div></div>

<p>Please refer to <a href="https://wiki.ubuntu.com/DebootstrapChroot">https://wiki.ubuntu.com/DebootstrapChroot</a> for details regarding this and debootstrap in general.</p>
<p>To shut it down, use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">init <span style="color: #000000;">0</span></pre></div></div>

<p>You can start the guest without the <code>-c</code>-parameter to start it without the console. Then you can use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xm list</pre></div></div>

<p>to check that it's running.</p>
<p>At this point I'd strongly recommend to shut the guest down, reboot the host (dom0) and start everything again. This is to verify that everything is also working after a reboot (before using it in production).</p>
<p>I followed <a href="http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64">http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64</a> when I installed the guest, but I've done it slightly different and avoided some of the errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/ubuntu-server-804-as-domu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Xen on Ubuntu Server 8.04 (Hardy Heron) with complex disk setup</title>
		<link>http://www.scienco.org/2008/xen-on-ubuntu-server-804-hardy-heron-with-complex-disk-setup/</link>
		<comments>http://www.scienco.org/2008/xen-on-ubuntu-server-804-hardy-heron-with-complex-disk-setup/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 16:58:43 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[Hetzner]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[xfs]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=58</guid>
		<description><![CDATA[This is a tutorial about how to use Ubuntu Server 8.04 as dom0 (host) for Xen, i.e. how to install Xen on Ubuntu Server. In a later post I'll show how to install domUs (guests). The whole setup is done with a rather complex disk configuration using both raid 1 (mirroring) and LVM. It requires [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tutorial about how to use Ubuntu Server 8.04 as dom0 (host) for Xen, i.e. how to install Xen on Ubuntu Server. In a later post I'll show how to install domUs (guests). The whole setup is done with a rather complex disk configuration using both raid 1 (mirroring) and LVM. It requires some knowledge about Xen (e.g. I'll not try to convince you to use Xen - I assume it's already your plan and you had read of all the advantages it gives you <img src='http://www.scienco.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).<span id="more-58"></span></p>
<h3>Disk-layout considerations</h3>
<p>In order to use Windows with Xen you also need to have Intel VT or AMD-V - and have it enabled, too. My "metal" is a AMD-V enabled CPU, 4 GB RAM, 2 x 400 GB SATA II disks, and a 1 GBit NIC (network interface card) - a DS5000 at Hetzner. I've chosen to have a rather complex disk setup based on a lot of reading different places at the web (and for fun, too), e.g. [1], [2], [3], and [4]. First of all I want protection (raid 1 - mirroring) because I'm going to use the system in a production environment, but I don't want to pay the money for a real hardware RAID controller, hence I've decided to use software raid, i.e. mdadm. I know it's expensive in CPU-time, but I'm willing to "pay" for the protection this way. I want LVM for the domUs because it among other things enables me to take snapshots and easily grow/shrink the size of the disk.</p>
<p>The only thing I don't want mirrored, is the swap-partitions. I know it might cause the system to crash if a disk fails, but only data in memory can be lost this way. If a swap-partition crashes it's likely because the disk is dead, and as a back-up I want extra swap-partitions on the other disk so that I can use those until a new disk is installed. I don't want the swap-partitions to be LVM - only normal partitions that can be mapped directly to domUs through Xen. Because of my metal, it's not likely that I'm going to have more than 5 domUs running, hence I need 12 swap-partitions in total (the 5 plus 1 for dom0 and doubleing it to encounter the extra ones if a disk crashes). Because I don't know if the memory of dom0 or a domU is going to be ballooned (resized - and yes, among many other things Xen i capable of that), I've decided to go with a size of 4GB of all the swap-partitions. It may be a little oversized, but better safe than sorry and I have plenty of disk space for my needs.</p>
<p>Of course the root file system of dom0 needs to be mirrored, but I don't want to use LVM with this, because I'm not going to use any of the advantages with dom0. So this is going to be an ordinary raid 1 xfs partition. The rest of the disk space is used to make a VG (volume group) in LVM, and this pool can then be used to make LV (logical volumes) to disks for the domUs.</p>
<p>At this point please be aware that I'm going to map a LV to a domU to its root file system and a "normal" partition to its swap. Xen gives other possibilities, e.g. map a file on dom0 to the root file system of a domU or simply use a "normal" partition. All three choices have advantages and disadvantages; I've made my mind up and chosen to use the LVM-approach. I've also chosen to use xfs instead of ext3, but this choice really makes no difference in this tutorial: if you like ext3 better, then please use it.</p>
<h3>Disk layout</h3>
<p>If the two psysical 400GB disks are called /dev/sda and /dev/sdb, the disk-layout can be depicted as follows:</p>
<pre>disk	partition	size	usage/mount		pri/log
---------------------------------------------------------------
/dev/sda
	/dev/sda1	  1GB	/dev/md0 (bootable)	primary
	/dev/sda2	 20GB	/dev/md1 (dom0 -&gt; /)	primary
	/dev/sda5	  4GB	swap dom0		logical
	/dev/sda6	  4GB	dnu* (swap domU1)	logical
	/dev/sda7	  4GB	dnu* (swap domU2)	logical
	/dev/sda8	  4GB	dnu* (extra swap domU3)	logical
	/dev/sda9	  4GB	dnu* (extra swap domU4)	logical
	/dev/sda10	  4GB	dnu* (extra swap domU5)	logical
	/dev/sda11	 rest	/dev/md2 (LVM)		logical

/dev/sdb
	/dev/sdb1	  1GB	/dev/md0 (bootable)	primary
	/dev/sdb2	 20GB	/dev/md1 (dom0 -&gt; /)	primary
	/dev/sdb5	  4GB	dnu* (extra swap dom0)	logical
	/dev/sdb6	  4GB	dnu* (extra swap domU1)	logical
	/dev/sdb7	  4GB	dnu* (extra swap domU2)	logical
	/dev/sdb8	  4GB	dnu* (swap domU3)	logical
	/dev/sdb9	  4GB	dnu* (swap domU4)	logical
	/dev/sdb10	  4GB	dnu* (swap domU5)	logical
	/dev/sdb11	 rest	/dev/md2 (LVM)		logical

*dnu = DO NOT USE (is going to be mounted by the domUs)

/dev/md0 (bootable)
	/boot		  1GB	raid 1 (dom0 -&gt; /boot)

/dev/md1
	/		 20GB	raid 1 (dom0 -&gt; /)

/dev/md2
	/dev/lvmstore/lv1 15GB	/ (dom1)
	/dev/lvmstore/lv2 15GB	/ (dom2)
	/dev/lvmstore/lv3 15GB	/ (dom3)
	/dev/lvmstore/lv4 20GB	/ (dom4)
	...		 ... 	...</pre>
<h3>Installation</h3>
<p>The task of making this configuration in Ubuntu can be a bit confusing. How to make this configuration depends on the way you're installing Ubuntu. I've had quite some troubles with LILO, so I recommend that you use GRUB instead! That's also what [6] recommends.</p>
<p>As earlier mentioned, my server is hosted at Hetzner. Here you can only manipulate the installation through a configuration file. This means that the disk configuration has to be performed a bit different. You could of course also make this disk layout with the ordinary Ubuntu installer, but I'll not get into details how to do that in this tutorial. First reboot into rescue mode and execute</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">installimage</pre></div></div>

<p>Now choose to edit the configuration file. First you need to enable software raid (thanks, [5]) and choose GRUB:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SWRAID <span style="color: #000000;">1</span>
BOOTLOADER grub</pre></div></div>

<p>Furthermore I configured the hostname. I made the initial partitioning scheme like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PART <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">/</span>boot ext3  1G
PART <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>     xfs  20G
PART <span style="color: #000000;">3</span> swap  swap  4G</pre></div></div>

<p>And then I installed the system. After this was done, the disk layout needed to be modified heavily to get what we wanted.</p>
<p>Because we are going to modify the harddisk layout on a running system, be aware that you might delete data! Please make sure you have a backup of all important data. Also do not do this if you're not able to restore the server somehow (boot it to rescue mode or similar if something should fail)!</p>
<p>First launch</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cfdisk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda</pre></div></div>

<p>And perform these steps:</p>
<ul>
<li>Select sda3 and delete it</li>
<li>Create a new locigal partition of 4301.83 MB at the beginning and change type to 82 (Linux swap)</li>
<li>Create five new locigal partition of 4301.83 MB at the beginning and don't change the type</li>
<li>Create a partition on the rest of space of type FD (Linux raid autodetect) - it's going to be used for a mirrored LVM</li>
<li>Write  (don't mind about the warning "No primary partitions are marked as bootable" - cfdisk doesn't know the /dev/md0 is bootable)</li>
<li>Quit</li>
</ul>
<p>Now do almost the same with <code>/dev/sdb</code> by</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cfdisk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb</pre></div></div>

<p>And perform these steps:</p>
<ul>
<li>Select sdb3 and delete it</li>
<li>Create six new locigal partition of 4301.83 MB at the beginning and don't change the type</li>
<li>Create a partition on the rest of space of type FD (Linux raid autodetect) - it's going to be used for a mirrored LVM</li>
<li>Write (again, don't mind about the warning - cfdisk doesn't know the /dev/md0 is bootable)</li>
<li>Quit</li>
</ul>
<p>After this, my disk layout was like this:<br />
<a href="http://www.scienco.org/wp-content/dev-sda.png"><img class="aligncenter size-medium wp-image-143" title="/dev/sda" src="http://www.scienco.org/wp-content/dev-sda-300x172.png" alt="" width="300" height="172" /></a></p>
<p><a href="http://www.scienco.org/wp-content/dev-sdb.png"><img class="aligncenter size-medium wp-image-144" title="/dev/sdb" src="http://www.scienco.org/wp-content/dev-sdb-300x172.png" alt="" width="300" height="172" /></a></p>
<p>Use your favorite text editor (vim, nano or whatever) and:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab</pre></div></div>

<p>Change</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2 none swap sw <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda5 none swap sw <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>We also need to get <code>/dev/md2</code> removed from <code>mdadm</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mdadm<span style="color: #000000; font-weight: bold;">/</span>mdadm.conf</pre></div></div>

<p>Comment the line with <code>/dev/md2</code> out.</p>
<p>Now</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2
mdadm <span style="color: #660033;">--manage</span> <span style="color: #660033;">--remove</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2</pre></div></div>

<p>Again: be sure that if something fails, you're able to enter some kind of rescue mode! If you are sure, please reboot to activate the new partiotions etc.</p>
<p>And now we check that /dev/md2 is gone:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>mdstat
mdadm <span style="color: #660033;">--detail</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2
<span style="color: #c20cb9; font-weight: bold;">dmesg</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> md2</pre></div></div>

<p>Now please verify that the new swap is used be using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">free</span></pre></div></div>

<p>to see how much free swap space is available (if it says 0 the system doesn't use the swap). If there's no swap space, try to initialize the new swap by</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mkswap <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda5</pre></div></div>

<p>and then reboot.</p>
<p>To create the mirroring of the LVM-storage, we perform:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #660033;">--create</span> <span style="color: #660033;">--verbose</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2 <span style="color: #660033;">--level</span>=<span style="color: #000000;">1</span> <span style="color: #660033;">--raid-devices</span>=<span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda11 <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb11</pre></div></div>

<p>In order to get the array started on system start-up, execute this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #660033;">--brief</span> <span style="color: #660033;">--examine</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda11 <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mdadm<span style="color: #000000; font-weight: bold;">/</span>mdadm.conf</pre></div></div>

<p>Now we need to create the LVM (the lvmstore is the name, and LVs - logical volumes - will be located at /dev/lvmstore/name-of-lv):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pvcreate <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2
vgcreate lvmstore <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2</pre></div></div>

<p>The output should be something like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># pvcreate /dev/md2</span>
  Physical volume <span style="color: #ff0000;">&quot;/dev/md2&quot;</span> successfully created
root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># vgcreate lvmstore /dev/md2</span>
  Volume group <span style="color: #ff0000;">&quot;lvmstore&quot;</span> successfully created</pre></div></div>

<p>Now you're ready to create LVs. In my case I'm going to create three of 15 GB and one on 20 GB:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># lvcreate -n lv1 -L 15G lvmstore</span>
  Logical volume <span style="color: #ff0000;">&quot;lv1&quot;</span> created
root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># lvcreate -n lv2 -L 15G lvmstore</span>
  Logical volume <span style="color: #ff0000;">&quot;lv2&quot;</span> created
root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># lvcreate -n lv3 -L 15G lvmstore</span>
  Logical volume <span style="color: #ff0000;">&quot;lv3&quot;</span> created
root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># lvcreate -n lv4 -L 20G lvmstore</span>
  Logical volume <span style="color: #ff0000;">&quot;lv4&quot;</span> created
root<span style="color: #000000; font-weight: bold;">@</span>host:~<span style="color: #666666; font-style: italic;"># ls -l /dev/lvmstore</span>
total <span style="color: #000000;">0</span>
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">24</span> <span style="color: #000000;">2008</span>-08-02 <span style="color: #000000;">13</span>:<span style="color: #000000;">55</span> lv1 -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>lvmstore-lv1
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">24</span> <span style="color: #000000;">2008</span>-08-02 <span style="color: #000000;">13</span>:<span style="color: #000000;">55</span> lv2 -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>lvmstore-lv2
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">24</span> <span style="color: #000000;">2008</span>-08-02 <span style="color: #000000;">13</span>:<span style="color: #000000;">55</span> lv3 -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>lvmstore-lv3
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">24</span> <span style="color: #000000;">2008</span>-08-02 <span style="color: #000000;">13</span>:<span style="color: #000000;">55</span> lv4 -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>lvmstore-lv4</pre></div></div>

<p>Please reboot to be sure that everything's alright.</p>
<h3>Post install</h3>
<p>First we'll upgrade the system:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> dist-upgrade
reboot</pre></div></div>

<p>This will reboot the machine in order to use a new kernel.</p>
<p>After the reboot, install Xen and tools for:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ubuntu-xen-server xen-tools xfsprogs</pre></div></div>

<p>Add this to <code>/etc/modules</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">loop <span style="color: #007800;">max_loop</span>=<span style="color: #000000;">64</span></pre></div></div>

<p>Now you need to deactivate a startup-script (by moving it), that makes it impossible for the machine to boot properly - at least everywhere I've tried (thanks to [7] for the solution!):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>loadcpufreq <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>loadcpufreq.backup</pre></div></div>

<p>If you don't do this, the machine probably will not boot. At my server with Hetzner I was able to ping it though, but when I tried to SSH, I got a "Connection Resufed".</p>
<p>Now reboot and verify running the Xen-kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-r</span>
xm list</pre></div></div>

<h3>Sources</h3>
<p>[1]: <a href="http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-virtualization/331444-suggest-swap-size-dom0.html">http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-virtualization/331444-suggest-swap-size-dom0.html</a><br />
[2]: <a href="http://www.gagme.com/greg/linux/raid-lvm.php">http://www.gagme.com/greg/linux/raid-lvm.php</a><br />
[3]: <a href="http://video.dkuug.dk/2007-10-16-xen/mr-xen.pdf">http://video.dkuug.dk/2007-10-16-xen/mr-xen.pdf</a><br />
[4]: <a href="http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64">http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64</a><br />
[5]: <a href="http://www.afterschool.dk/documents/hetzner/raid_hetzner_server/">http://www.afterschool.dk/documents/hetzner/raid_hetzner_server/</a><br />
[6]: <a href="http://wiki.debian.org/Xen">http://wiki.debian.org/Xen</a><br />
[7]: <a href="http://ubuntuforums.org/showthread.php?t=819404">http://ubuntuforums.org/showthread.php?t=819404</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/xen-on-ubuntu-server-804-hardy-heron-with-complex-disk-setup/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Installing FreeBSD 7 from the view of a Debian user</title>
		<link>http://www.scienco.org/2008/installing-freebsd-7-from-the-view-of-a-debian-user/</link>
		<comments>http://www.scienco.org/2008/installing-freebsd-7-from-the-view-of-a-debian-user/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 17:50:04 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=85</guid>
		<description><![CDATA[I've been using both Debian and Ubuntu on both server and desktop for some years now, but I think it's time to try something new so I'm not getting stuck and reject everything that's new (not that I tend to!). I think I'll have a closer look on FreeBSD: installation, updating, etc. - seen from [...]]]></description>
			<content:encoded><![CDATA[<p>I've been using both Debian and Ubuntu on both server and desktop for some years now, but I think it's time to try something new so I'm not getting stuck and reject everything that's new (not that I tend to!). I think I'll have a closer look on FreeBSD: installation, updating, etc. - seen from a Debian/Ubuntu user's point of view.<span id="more-85"></span></p>
<p>On the server-side I've never doubted my choice - I've been very pleased with Debian and later on Ubuntu Server. On the desktop-side I've used Windows, too, and had some habituation to do before feeling home with Debian/Ubuntu: not on the GUI but when configuring the system and when locating errors (application errors, <code>apt-get install</code> failing, <code>xorg.conf</code> etc.). But now I feel free and more well-equipped when using Ubuntu than I do on Windows.</p>
<p>Well, this entry is not about the desktop-side but about the server-side. But why look into FreeBSD when I'm so pleased with Debian/Ubuntu? Well first of all because I've heard a lot of nice things about FreeBSD from both friends and read a lot of praise of FreeBSD. Furthermore I feel that it's time to evolve - try something else so I don't get stuck. I want to learn something more. So now I'm going to play a bit with FreeBSD and let you guys get my first impressions about it. To get some general information about FreeBSD, refer to [1].</p>
<h3>The installation</h3>
<p>The FreeBSD installer looks a bit like the Debian or Ubuntu alternate ones. I'm going to go with a standard installation. Let me say this at once: I think I'll try the installation process a few time so I'll get to know it, avoid mistakes when moving to a production environment, view additional configuration parameters, and first afterwards start playing with the system. Well, as said: I chose standard installation.</p>
<p>When I came to choosing distributions, I only chose the minimal-distribution. I think that's the most suitable for a server - I want control of the components on the server, so I'll install the necessary ones manually after the installation.</p>
<p>I think this is the time for a short sidekick. Whereas Debian/Ubuntu has it's main focus on precompiled packages (.debs), FreeBSD has it's focus on so-called ports. It's just bare naked  source code (including Makefiles etc.). To install a port, the first thing the operating system does is to compile the program and afterwards copy all the files to the right places. This means that I'll the programs get customized for precisely your system, but it takes some extra time to perform installation of application. I might say this now: FreeBSD also offers packages (as opposed to ports) that's precomiled binaries one can use. Well, I like the idea of ports - and the compilation time won't be a problem for be because I'm not going to compile Gnome or similar: I think Apache, PHP, MySQL, Postfix, Courier, and a couple of other would do. So I'm definitely going for ports. If you hoped for packages, I'm sorry - please use your preferred search engine to find something about that. One of the thinks I'm really exited to see, is how well and easy the process of updating installed ports is. It's not required to be <code>apt-get upgrade</code>-easy, but something like it would be top notch!</p>
<p>Well, let's continue with the installation! I chose to install from the CD. Normally I'd install from FTP so get the newest version at once, but I'd really like to review the update/upgrade process of FreeBSD et al., so I'll pick the CD this time.</p>
<p>At a time you have to decide whether to enable "Linux Binary Compatibility". To quote from [2]:</p>
<blockquote><p>At this point, you may be asking yourself why exactly, does FreeBSD need to be able to run Linux binaries? The answer to that question is quite simple. Many companies and developers develop only for Linux, since it is the latest â€œhot thingâ€ in the computing world. That leaves the rest of us FreeBSD users bugging these same companies and developers to put out native FreeBSD versions of their applications. The problem is, that most of these companies do not really realize how many people would use their product if there were FreeBSD versions too, and most continue to only develop for Linux. So what is a FreeBSD user to do? This is where the Linux binary compatibility of FreeBSD comes into play.</p></blockquote>
<p>So whether you should enable it or not is up to you, but if you're in doubt, I'd recommend to enable it. Please refer to [2] for further information about the "Linux Binary Compatibility".</p>
<p>Then I created a normal user to ordinary non-system work (before creating the user, create a group with the same name as your username). I might add, that if you enabled SSH-logins, an ordinary user account cannot <code>su</code> through SSH; for that, the user has to be in the <code>wheel</code>-group (thanks, [3]). You might as well do this while creating this new user like this:<br />
<a href="http://www.scienco.org/wp-content/freebsd-create-user.png"><img class="aligncenter" title="Create a FreeBSD user" src="http://www.scienco.org/wp-content/freebsd-create-user-300x166.png" alt="" width="300" height="166" /></a></p>
<p>Please be aware that FreeBSD is like Debian, not Ubuntu, in root/sudo regards. In Ubuntu you never login as root, you simply <code>sudo</code>. This approach is made to make it more secure for ordinary users. In FreeBSD and Debian you <code>su</code> to become root, do some administrative stuff, end then exit into the world of ordinary user privileges.</p>
<p>After the installation is done, you see the main menu again from where to do a standard installation. At this point eject the CD and reboot the system.</p>
<p>To install the <code>man</code>- and <code>info</code>-pages (thanks again, [3]), you should execute the following as root (either log in or <code>su</code>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">sysinstall</pre></div></div>

<p>In this utility you choose "Configure" -&gt; "Distributions" -&gt; and select "man" and "info" by hitting space -&gt; "OK". Now you can just exit the sysinstall tool.</p>
<p>Well, now the installation is done! Let's see how to upgrade this bastard!</p>
<h3>How to use ports and upgrade the base system</h3>
<p>As mentioned earlier, I'm going to bet everything on ports!</p>
<p>When making system work, as we are going to do now, you must use <code>su</code> and not <code>sudo</code>! Please read [4] for an excellent review of how to use ports (you might as well wait to after reading my short recap of [4]). It may relevant for you to read [3], too. I'm now going to show one approach of getting and updating the ports tree, namely the <code>portsnap</code>-tool, and afterwards I'm going to show how to update the ports tree, how to install, upgrade, and remove new applications, and how to upgrade the binary base system.</p>
<p>Remember we chose the minimal installation, so we don't even got the ports collection (or tree as it's also called) yet.</p>
<p>First let's fetch the ports tree:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portsnap fetch
portsnap extract</pre></div></div>

<p>Or simply</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portsnap fetch extract</pre></div></div>

<p>In the daily administration we don't want to extract it, because we've already got the tree. Instead we want to update it. Therefore you're only going to issue the extract-part right after installation, and after that you need only to execute this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portsnap fetch update</pre></div></div>

<p>And now your ports tree (recall that it's source code for a lot of programs you are able to install) is up to date! But what about the programs from the ports tree you've already installed? They are not updated by the <code>portsnap</code>-command. But before going through that, let's first install a new program. The <code>lsof</code> (list open files) is used in the example in [4] and I'm going to use it here, too. Well, ports are located in <code>/etc/ports</code> - but it's a directory system based on categories, so first we will need to find the source directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">whereis</span> lsof</pre></div></div>

<p>Wonderful - navigate to this directory and let's install it. Assuming you are in the directory returned by the <code>whereis</code>-command, just execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>This will compile the program, but don't install it. The binaries are in the same directory - nothing has been copied! So lets copy the binaries:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>And now you are able to run the program (you might need to log in and out if it doesn't work straightaway):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lsof</pre></div></div>

<p>Because compiling takes up a lot of workspace with temporary files, we clean up afterwards:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> clean</pre></div></div>

<p>Well, nerds are lazy, so an abbreviation of <code>make</code>, <code>make install</code>, and <code>make clean</code> is this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></div></div>

<p>I would recommend sticking to this command so that you remember to <code>make clean</code>. There is a but in this regard: dependencies require the make-files, so if you always clean up, compilation will take longer since the whole dependency tree has to be build, too. So please consider this before cleaning up. This is basically the way to install new applications. It's really not that hard! During compilation, errors may arise. It's important that you don't just think they are irrelevant. They might be crucial.</p>
<p>One of the benefits with <code>apt-get</code> is both it's good at cleaning up and resolving dependency issues. The cleaning up part when removing programs is in both cases with <code>apt-get</code> and ports based on the fact that the maintainer of the program has specified which files are copied when issuing the <code>apt-get install</code> or <code>make install</code>, so that they all can be delete when removing the program. Because of this there's no reason why apt-get should clean up in a better way than the ports' way of doing it. Well, we'll get back to that shortly. Let's first upgrade the <code>lsof</code>. As mentioned in [4], you should read <code>/usr/ports/UPDATING</code> before every update because it describes issues in regards to upgrading certain ports.</p>
<p>Basically there are three different tools to upgrade ports with: <code>portupgrade</code>, <code>portmanager</code>, and <code>portmaster</code>. <code>portmaster</code> does not depend on any other ports, only programs in the base system [4] - that I like! In addition it seems like a reasonable way it handles dependencies (so <code>apt-get</code> gets real competition at this point, too!). So that's the tool I'll use - feel free to choose another. Please refer to "4.5.4.4 Upgrading Ports using Portmaster" in [4] to see how update is done. It's straightforward! And I like the part that it's able to install ports, too (as I said, read [4] - important facts is reveal themselves by reading documentation!). </p>
<p>If you haven't read "4.5.4.4 Upgrading Ports using Portmaster" in [4], you might have difficulties understanding the next part. For a cronjob I'd recommend to update the ports tree (but only the index file - please read on) and mail the <code>portmaster -L</code> output to yourself. Something like a cronjob like (edit the <code>/etc/cronjob</code> - and maybe configure the <code>mail</code> more properly):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">0</span> <span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> root portsnap <span style="color: #660033;">-I</span> cron update <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> portmaster <span style="color: #660033;">-L</span> <span style="color: #000000; font-weight: bold;">|</span> mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;Available updates&quot;</span> your<span style="color: #000000; font-weight: bold;">@</span>host.tld</pre></div></div>

<p>The -I option tells the <code>portsnap</code> to update the index only and not the ports tree itself, and only be used with the update command. In this way it's possible to find out which ports needs to be upgraded without destroying/overwriting your current ports tree. The cron command is like fetch, but it starts by sleeping for a random period of time before making the fetch - this way it's avoided that several machines perform the fetch simultaneously. And update is like before (but remember the -I option). Well, you did of course read the --help and man, so you already knew this, right?</p>
<p>To remove a port you just type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pkg_remove</pre></div></div>

<p>It's actually the same way as remove a package. Well done, FreeBSD!</p>
<p>To update the FreeBSD binary base system, simply use the tool <code>freebsd-update</code>. To get available updates:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">freebsd-update fetch</pre></div></div>

<p>And to apply those:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">freebsd-update <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>So in FreeBSD the ports and the system is updated separately. Actually I like this approach. My fear of ports and keeping FreeBSD updated has almost gone away!</p>
<h3>General impression of FreeBSD</h3>
<p>That I cannot give you after this short term of usage, but I must say that I really like the rocks on which FreeBSD is build! I like the ideas, principles etc., and I'm really looking forward to play with it in the near future! And I have to mention their great documentation, see [5] (I've used a part of it, [4], a bit, but there's a lot of great documentation)! Normally I use Google, but when dealing with FreeBSD I consult the documentation as the first thing. That's actually rather comfortable!</p>
<p>I was bit nervous about maintaining a FreeBSD-system based on ports, that fear is completely gone! Actually the tools like <code>portsnap</code> and <code>portmaster</code> have made me really confident about the whole concept of ports. But when so many people use FreeBSD, FreeBSD must - after all - do something right!</p>
<p>When it all comes down to choose between Ubuntu and FreeBSD, I have a hard time recommending one on behalf of the other. FreeBSD seems to do everything right, reliable and secure. No easy solutions. And the documentation is great! I like the whole architecture. So what's the drawback compared to Ubuntu? Well, you have to work a little harder to make it as user-friendly: install bash etc. But on the other hand - I'm going to use it for a reliable server. So Ubuntu is easy and great with a lot of reasonable standard choices, but compared to FreeBSD, at some points it seems like Ubuntu not that idealistic, e.g. about placing configuration files consistent.</p>
<p>So what am I going to do? I think it's time for me to try FreeBSD for real!</p>
<h3>Sources</h3>
<p>[1]: <a href="http://en.wikipedia.org/wiki/FreeBSD">http://en.wikipedia.org/wiki/FreeBSD</a><br />
[2]: <a href="http://www.freebsd.org/doc/en/books/handbook/linuxemu.html">http://www.freebsd.org/doc/en/books/handbook/linuxemu.html</a><br />
[3]: <a href="http://www.afterschool.dk/documents/freebsd/freebsd-7-0-install/">http://www.afterschool.dk/documents/freebsd/freebsd-7-0-install/</a><br />
[4]: <a href="http://www.freebsd.org/doc/en/books/handbook/ports-using.html">http://www.freebsd.org/doc/en/books/handbook/ports-using.html</a><br />
[5]: <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/">http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/installing-freebsd-7-from-the-view-of-a-debian-user/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Xen vs. VMware ESXi vs. VMware Server</title>
		<link>http://www.scienco.org/2008/xen-vs-vmware-esxi-vs-vmware-server/</link>
		<comments>http://www.scienco.org/2008/xen-vs-vmware-esxi-vs-vmware-server/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 21:12:29 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMware ESXi]]></category>
		<category><![CDATA[VMware Workstation]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=59</guid>
		<description><![CDATA[The case is that I have a server on which I want to run some sort of virtualization - I don't think it's appropriate to discuss why virtualization is a go (if you think so, search the web for articles regarding this subject - there are more than plenty discussing this matter). I need at least to host a web server and a mail server - and it would be great to be able to have some sort of playground, too. My mind's almost made up in regards to the software for the web server and mail server: Ubuntu Server (or maybe FreeBSD - time will show :-)). But what about the virtualization software?]]></description>
			<content:encoded><![CDATA[<p>Yesterday I wrote an entry regarding ESXi. More precisely I described how to try VMware ESXi in VMware Workstation. My argument was on one side to try ESXi out (I've never installed nor tried it) and on the other side investigate whether it was a product I would use.</p>
<p>The case is that I have a server on which I want to run some sort of virtualization - I don't think it's appropriate to discuss why virtualization is a go (if you think so, search the web for articles regarding this subject - there are more than plenty discussing this matter). I need at least to host a web server and a mail server - and it would be great to be able to have some sort of playground, too. My mind's almost made up in regards to the software for the web server and mail server: Ubuntu Server (or maybe FreeBSD - time will show <img src='http://www.scienco.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). But what about the virtualization software?<span id="more-59"></span></p>
<p>Besides ESXi I'm comtemplating Xen and VMware Server. Why those three - why not Microsoft's new software, Hyper-V? Well, I'm not going to use Microsoft servers so I don't really want to mix this into the environment. Besides that, Hyper-V is quite new compared to the others and still misses some features (and testing, I guess - but it's a statement without proof).</p>
<p>Since this server with virtualization is a hobby-project I don't want to spend too much money on software - preferably none. On top of this I like the idea of open source software. Because of this, my interest for ESXi came the moment I read that I would become free (as in money, not beer).</p>
<p>My server is hosted at a Hetzner (http://www.hetzner.de/), so in order to install ESXi I need to order  something called LARA at a price of 25â‚¬ (it's a  way of making it possible to install custom software like ESXi since they "only" provides recoverbility of different Linux flavours). As mentioned this is needed to install ESXi, whereas both Xen and VMware Server run on ordinary server software, e.g. Ubuntu Server, which doesn't require a LARA-setup (and hence not the 25â‚¬).</p>
<h3>Comparison</h3>
<p>The already mentioned arguments are just practical matter - what about the software? I have certain requirements such as mirroring of my data (raid 1), but this would yield an expend of several euro each month as it would cost if it should be done in real hardware raid. Because of that I'm willing to offer CPU-time and instead use software raid, i.e. mdadm in the world of Linux and FreeBSD.</p>
<p>Well, they all have both advantages and disadvantages in regards to my requirements:</p>
<ul>
<li>VMware ESXi, see [1]
<ul>
<li>Advantages
<ul>
<li>Only a 32 MB footprint ought to yield a good performance</li>
<li>The technology (ESX) is widely used and mature (but refer to the disadvantages to view this in perspective)</li>
</ul>
</li>
<li>Disadvantages
<ul>
<li>Not open source</li>
<li>Would require a LARA-setup to install on a hosted server</li>
<li>Doesn't support software raid</li>
<li>To quote [1]:<br />
<blockquote><p>VMware states that the ESX Server product runs on "bare metal". In contrast to other VMware products, it does not run atop a third-party operating system, but instead includes its own kernel. In ESX version 3 and older, a Linux kernel is started first and is used to load a variety of specialized virtualization components, including VMware's 'vmkernel' component.</p></blockquote>
</li>
<li>The full virtualization technique is ancient [2] - or to quote [2] for some of the explanation:<br />
<blockquote><p>Of course, those with the most market share will continue to sell their solutions as "more mature" and/or "enterprise ready" while continuing to improve their tools. Unfortunately, they will continue to lean on an outdated, albeit refined technology core. The core may continue to evolve, but the approach is fundamentally less efficient, and will therefore never achieve the performance of the more logical solution. It reminds me of the ice farmers' response to the refrigerator - rather than evolving their business, they tried to find better, more efficient ways to make ice, and ultimately went out of business because the technology simply wasnâ€™t as good.</p></blockquote>
</li>
</ul>
</li>
</ul>
</li>
<li>VMware Server
<ul>
<li>Advantages
<ul>
<li>Looks easy and straight-forward with the flashy tools and wizards - seems very user friendly</li>
<li>The technology is widely used and mature (but refer to the disadvantages to view this in perspective)</li>
</ul>
</li>
<li>Disadvantages
<ul>
<li>The same as for VMware ESXi (quotes inclusive), exept for the LARA-requirement</li>
<li>Requires an underlaying operating system (but if this doesn't run other services this doesn't seem to be a huge problem)</li>
</ul>
</li>
</ul>
</li>
<li>Xen, see [3]
<ul>
<li>Advantages
<ul>
<li>Open source</li>
<li>The virtualization technique is called integrated virtualization or paravirtualization. This means that unlike with VMware ESXi and Server, the virtualized operating systems are aware that they are being virtualized. This means that there's no need for a SBE-mechanism (Scan-Before-Execution) to handle special or privileged CPU instructions. This is an expensive operation because every instruction has to be scanned before the execution of it, and making that expensive scan unnecessary yields greater performance</li>
</ul>
</li>
<li>Disadvantages
<ul>
<li>As far as I've experienced, the learning-curve can seem more steep than both the one of VMware ESXi and Server (but I've also used VMware Workstation for some time). But that something is harder doesn't mean that it isn't as good <img src='http://www.scienco.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . But I mainly think it's because of quite a lot new concepts - after getting my hands dirty, I'm actually very impressed of the simplicity of Xen! For reference, navigate to [4] and review the installtion process - it's not that complex after all.</li>
<li>Requires an underlaying operating system (but if this doesn't run other services this doesn't seem to be a huge problem)</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Conclusion</h3>
<p>After quite a lot reading on the web (much more than refered to in this blog entry), I've finally decided!</p>
<p>If I had hardware raid, the battle between ESXi and Xen was very, very close! I would not be able to distinctly answer whether I would use ESXi or Xen. In this regard I see ESXi as an old, experienced giant and Xen as a new actor (although they in no ways are inmature!). If the short-term period is weighted the most, I'd go with ESXi, but if I should you think a on the future, I'd pick Xen.</p>
<p>With software raid there's really no doubt after this reseach: Xen is here to stay - and I look forward to join this field of evolution!</p>
<p>Disclaimer: virtualization is a huge area, and I've not nearly said enough about it, nor did I compared the products in-depth for this to be a complete comparison! But besides the points in this entry, I've read a lot on the web and had a lecture in virtualization. Altogether I've been convienced to go for it with Xen, based on my requirements and needs. Maybe yours a different or have read other sites saying something else. After all there is not a definte right answer for which virtualization software to use, but the least you can do is some research on the basis of your requirements, needs, hardware etc. (and since you're reading this, you've probably already started <img src='http://www.scienco.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
<p>Within a week I'll post a detailed guide of how to install Xen on Ubuntu Server 8.04 with Ubuntu Server 8.04, FreeBSD, and Windows as guests - with a complex disk setup including software raid mirroring (raid 1) and LVM.</p>
<p>Once again: if I've missed or misunderstood something, please make me aware of it by leaving a comment!</p>
<h3>Sources</h3>
<p>[1]: <a href="http://en.wikipedia.org/wiki/ESXi">http://en.wikipedia.org/wiki/ESXi</a><br />
[2]: <a href="http://servervirtualization.blogs.techtarget.com/2007/07/23/is-xen-ready-for-the-data-center-is-that-the-right-question/">http://servervirtualization.blogs.techtarget.com/.../is-xen-ready-.../</a><br />
[3]: <a href="http://en.wikipedia.org/wiki/Xen">http://en.wikipedia.org/wiki/Xen</a><br />
[4]: <a href="http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64">http://www.howtoforge.com/high-performance-xen-on-ubuntu-8.04-amd64</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/xen-vs-vmware-esxi-vs-vmware-server/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>ESXi in VMware Workstation</title>
		<link>http://www.scienco.org/2008/esxi-in-vmware-workstation/</link>
		<comments>http://www.scienco.org/2008/esxi-in-vmware-workstation/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 08:41:45 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMware ESXi]]></category>
		<category><![CDATA[VMware Workstation]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=57</guid>
		<description><![CDATA[Yesterday VMware ESXi became free (not as i beer but as in money), and I had to try it - initially in VMware Workstation 6. You need Intel VT (or AMD-V) to run ESXi! In order to make it work create a machine with a 20GB SCSI disk (defaults: non-independent etc.) and chose the downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday VMware ESXi became free (not as i beer but as in money), and I had to try it - initially in VMware Workstation 6. You need Intel VT (or AMD-V) to run ESXi!<span id="more-57"></span></p>
<p>In order to make it work create a machine with a 20GB SCSI disk (defaults: non-independent etc.) and chose the downloaded ISO-file with ESXi - the other options of the machine is not important because the vmx-file is to be overwritten, but you have to create the disk. Please be sure that VT is enabled - if not VMware will complain (to enable it go to your BIOS, enable it, shut down the computer entirely wait a few seconds and turn it on again). Now close the tab in Workstation , save a copy of the vmx-file, and open the original vmx-file in notepad (or equivalent) and replace its contents with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config.version = <span style="color: #ff0000;">&quot;8&quot;</span>
virtualHW.version = <span style="color: #ff0000;">&quot;6&quot;</span>
scsi0.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
scsi0.virtualDev = <span style="color: #ff0000;">&quot;lsilogic&quot;</span>
memsize = <span style="color: #ff0000;">&quot;1024&quot;</span>
scsi0:<span style="color: #000000;">0</span>.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
scsi0:<span style="color: #000000;">0</span>.fileName = <span style="color: #ff0000;">&quot;Other.vmdk&quot;</span>
ide1:<span style="color: #000000;">0</span>.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
ide1:<span style="color: #000000;">0</span>.fileName = <span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\V</span>Mware-VMvisor-InstallerCD-3.5.0_Update_2-103909.i386.iso&quot;</span>
ide1:<span style="color: #000000;">0</span>.deviceType = <span style="color: #ff0000;">&quot;cdrom-image&quot;</span>
floppy0.autodetect = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
ethernet0.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
ethernet0.virtualDev = <span style="color: #ff0000;">&quot;e1000&quot;</span>
ethernet0.wakeOnPcktRcv = <span style="color: #ff0000;">&quot;FALSE&quot;</span>
usb.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
ehci.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
sound.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
sound.fileName = <span style="color: #ff0000;">&quot;-1&quot;</span>
sound.autodetect = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
svga.autodetect = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
pciBridge0.present = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
mks.keyboardFilter = <span style="color: #ff0000;">&quot;allow&quot;</span>
displayName = <span style="color: #ff0000;">&quot;esxi 3.5&quot;</span>
guestOS = <span style="color: #ff0000;">&quot;rhel3&quot;</span>
nvram = <span style="color: #ff0000;">&quot;Other.nvram&quot;</span>
deploymentPlatform = <span style="color: #ff0000;">&quot;windows&quot;</span>
virtualHW.productCompatibility = <span style="color: #ff0000;">&quot;hosted&quot;</span>
tools.upgrade.policy = <span style="color: #ff0000;">&quot;useGlobal&quot;</span>
&nbsp;
monitor_control.restrict_backdoor = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
monitor_control.vt32 = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
ide1:<span style="color: #000000;">0</span>.autodetect = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
floppy0.fileName = <span style="color: #ff0000;">&quot;A:&quot;</span>
isolation.tools.hgfs.disable = <span style="color: #ff0000;">&quot;TRUE&quot;</span>
&nbsp;
ethernet0.addressType = <span style="color: #ff0000;">&quot;generated&quot;</span>
uuid.location = <span style="color: #ff0000;">&quot;56 4d ed e0 c0 75 12 c6-f7 8d a4 27 12 c8 bc 05&quot;</span>
uuid.bios = <span style="color: #ff0000;">&quot;56 4d ed e0 c0 75 12 c6-f7 8d a4 27 12 c8 bc 05&quot;</span>
scsi0:<span style="color: #000000;">0</span>.redo = <span style="color: #ff0000;">&quot;&quot;</span>
pciBridge0.pciSlotNumber = <span style="color: #ff0000;">&quot;17&quot;</span>
scsi0.pciSlotNumber = <span style="color: #ff0000;">&quot;16&quot;</span>
ethernet0.pciSlotNumber = <span style="color: #ff0000;">&quot;32&quot;</span>
sound.pciSlotNumber = <span style="color: #ff0000;">&quot;33&quot;</span>
ehci.pciSlotNumber = <span style="color: #ff0000;">&quot;34&quot;</span>
ethernet0.generatedAddress = <span style="color: #ff0000;">&quot;00:0c:29:c8:bc:05&quot;</span>
ethernet0.generatedAddressOffset = <span style="color: #ff0000;">&quot;0&quot;</span>
tools.remindInstall = <span style="color: #ff0000;">&quot;TRUE&quot;</span></pre></div></div>

<p>Now change change scsi0:0.fileName, ide1:0.fileName, nvram, ethernet0.generatedAddress, uuid.location, and uuid.bios to the correct values (as in the copy of the vmx-file). Then open the machine in VMware Workstation and change the network to "Host-only". And voila - now you should be able to install ESXi!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/esxi-in-vmware-workstation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lenovo X60 Tablet xorg.conf for Ubuntu 8.04</title>
		<link>http://www.scienco.org/2008/lenovo-x60-tablet-xorgconf-for-ubuntu-804/</link>
		<comments>http://www.scienco.org/2008/lenovo-x60-tablet-xorgconf-for-ubuntu-804/#comments</comments>
		<pubDate>Mon, 19 May 2008 08:23:18 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.scienco.org/2008/linux/lenovo-x60-tablet-xorgconf-for-ubuntu-804/</guid>
		<description><![CDATA[I just recently got my tablet features working in Ubuntu, so I thought I'd share my xorg.conf.]]></description>
			<content:encoded><![CDATA[<p>Just posting my xorg.conf; it works for me (sorry for the indenting)!<span id="more-55"></span> Please intially remember:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> wacom-tools xserver-xorg-input-wacom</pre></div></div>

<p>And to test:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wacdump <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>input<span style="color: #000000; font-weight: bold;">/</span>wacom</pre></div></div>

<p>And now the conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Generic Keyboard&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;kbd&quot;</span>
	Option		<span style="color: #ff0000;">&quot;XkbRules&quot;</span>	<span style="color: #ff0000;">&quot;xorg&quot;</span>
	Option		<span style="color: #ff0000;">&quot;XkbModel&quot;</span>	<span style="color: #ff0000;">&quot;pc105&quot;</span>
	Option		<span style="color: #ff0000;">&quot;XkbLayout&quot;</span>	<span style="color: #ff0000;">&quot;dk&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Configured Mouse&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;vmmouse&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Synaptics Touchpad&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;synaptics&quot;</span>
	Option		<span style="color: #ff0000;">&quot;SendCoreEvents&quot;</span>	<span style="color: #ff0000;">&quot;true&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Device&quot;</span>		<span style="color: #ff0000;">&quot;/dev/psaux&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Protocol&quot;</span>		<span style="color: #ff0000;">&quot;auto-dev&quot;</span>
	Option		<span style="color: #ff0000;">&quot;HorizEdgeScroll&quot;</span>	<span style="color: #ff0000;">&quot;0&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
	Identifier	<span style="color: #ff0000;">&quot;stylus&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Device&quot;</span>      <span style="color: #ff0000;">&quot;/dev/input/wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Type&quot;</span>        <span style="color: #ff0000;">&quot;stylus&quot;</span>
    Option      <span style="color: #ff0000;">&quot;ForceDevice&quot;</span> <span style="color: #ff0000;">&quot;ISDV4&quot;</span>
    Option      <span style="color: #ff0000;">&quot;USB&quot;</span>         <span style="color: #ff0000;">&quot;on&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
	Identifier	<span style="color: #ff0000;">&quot;eraser&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Device&quot;</span>      <span style="color: #ff0000;">&quot;/dev/input/wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Type&quot;</span>        <span style="color: #ff0000;">&quot;eraser&quot;</span>
    Option      <span style="color: #ff0000;">&quot;ForceDevice&quot;</span> <span style="color: #ff0000;">&quot;ISDV4&quot;</span>
    Option      <span style="color: #ff0000;">&quot;USB&quot;</span>         <span style="color: #ff0000;">&quot;on&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
	Identifier	<span style="color: #ff0000;">&quot;cursor&quot;</span>
	Driver		<span style="color: #ff0000;">&quot;wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Device&quot;</span>	  <span style="color: #ff0000;">&quot;/dev/input/wacom&quot;</span>
	Option		<span style="color: #ff0000;">&quot;Type&quot;</span>        <span style="color: #ff0000;">&quot;cursor&quot;</span>
    Option      <span style="color: #ff0000;">&quot;Mode&quot;</span>        <span style="color: #ff0000;">&quot;relative&quot;</span>
    Option      <span style="color: #ff0000;">&quot;ForceDevice&quot;</span> <span style="color: #ff0000;">&quot;ISDV4&quot;</span>
    Option      <span style="color: #ff0000;">&quot;USB&quot;</span>         <span style="color: #ff0000;">&quot;on&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;Device&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Configured Video Device&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;Monitor&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Configured Monitor&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;Screen&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Default Screen&quot;</span>
	Monitor		<span style="color: #ff0000;">&quot;Configured Monitor&quot;</span>
	Device		<span style="color: #ff0000;">&quot;Configured Video Device&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;ServerLayout&quot;</span>
	Identifier	<span style="color: #ff0000;">&quot;Default Layout&quot;</span>
	Screen		<span style="color: #ff0000;">&quot;Default Screen&quot;</span>
	InputDevice	<span style="color: #ff0000;">&quot;Synaptics Touchpad&quot;</span>
	Inputdevice	<span style="color: #ff0000;">&quot;stylus&quot;</span>	<span style="color: #ff0000;">&quot;SendCoreEvents&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
	Inputdevice	<span style="color: #ff0000;">&quot;cursor&quot;</span>	<span style="color: #ff0000;">&quot;SendCoreEvents&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
	Inputdevice	<span style="color: #ff0000;">&quot;eraser&quot;</span>	<span style="color: #ff0000;">&quot;SendCoreEvents&quot;</span> <span style="color: #666666; font-style: italic;">#added by mikl</span>
EndSection</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2008/lenovo-x60-tablet-xorgconf-for-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

