<?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>BenV&#039;s notes &#187; Hardware</title>
	<atom:link href="http://notes.benv.junerules.com/category/all/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.benv.junerules.com</link>
	<description>Rants and notes</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:36:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Linux and a Xerox Phaser 6125N</title>
		<link>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/</link>
		<comments>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 00:35:07 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[pokemon os]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xerox]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=579</guid>
		<description><![CDATA[A while ago a friend hinted me of this printer. We were both looking for a somewhat affordable network laser printer, color preferred. However, I was wondering if this thing would work properly under linux. Openprinter claims the device is excellent as a paperweight, so that made me doubtful. So today I took my pokemon [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago a friend hinted me of <a href="http://www.office.xerox.com/product-resources/6125/N/enus.html">this printer</a>. We were both looking for a somewhat affordable network laser printer, color preferred. However, I was wondering if this thing would work properly under linux. <span id="more-579"></span>Openprinter claims the device is excellent as a <a href="http://www.openprinting.org/show_printer.cgi?recnum=Xerox-Phaser_6125">paperweight</a>, so that made me doubtful.<br />
So today I took my pokemon laptop over to his place, and while enjoying a nice glass of excellent 18 year old Glenlivet, we shook cups up and down. And glasses.</p>
<p>The <a href="http://www.linuxquestions.org/questions/linux-hardware-18/xerox-phaser-6125-n-688361/">instructions for ubuntu</a> were a good starting point. I&#8217;ll summarize:</p>
<ol>
<li>Download <a href="http://www.fujixerox.com.au/support/downloaddriver?productId=307&#038;operatingSystemCode=Linux">these drivers for the FX DocuPrint C525A</a>.</li>
<li>Unzip and use <span style="color:#FF00FF">alien</a> to convert the package to a .deb, and install it.
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #c20cb9; font-weight: bold;">unzip</span> dpc525a_linux_.0.0.tar.zip; alien Fuji_Xerox-DocuPrint_C525_A_AP-<span style="color: #000000;">1.0</span>-<span style="color: #000000;">1</span>.i386.rpm; <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> fuji-xerox-docuprint-c525-a-ap_1.0-<span style="color: #000000;">2</span>_i386.deb</div></div>
</li>
<li>Go to http://localhost:631/admin and add a new network printer.</li>
<li>Select a protocol (either Jetdirect or LPD) and enter the IP address of the printer</li>
<li>Select the PPD file you installed from the .deb archive (<span style="color:#FFFF00">/usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd</span>) or select the driver through the menu system</li>
<li>In cups go set the default printer options and make sure to set the optional tray module to <span style="color:#00FFFF">250 Sheet Feeder</span>.</li>
</ol>
<h3>Issues I ran into</h3>
<p>That&#8217;s all pretty default as the linked installation guide says. However, in my first attempt I used the JetDirect protocol on port 9100 (using an IP address, not a hostname). While this worked, everything was dirt slow. Going to the options page of a print dialog took almost a minute!<br />
After some messing around I decided to try other protocols. The other protocol that worked was LPD/LPR. But not only did it work, but it&#8217;s fast! Click *BAF* Bluescreen1!!&#8230; uhh, I mean, print dialog <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Anyway, instead of using an URI like <em>socket://192.168.1.123:9100</em> simply use <code class="codecolorer bash vibrant"><span class="bash">lpd:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.123:<span style="color: #000000;">515</span></span></code>. Let me repeat this so that people who skip over this post also read it: <span style="color:#FF0000">Use lpd://192.168.1.123:515 instead of socket://blabla, this works a lot faster!</span>.</p>
<p>Once I got the printer in CUPS I also ran into the issue that the printer would respond but give an error on the printer itself. This was because I forgot to properly select the Tray Module, make sure it&#8217;s set to the 250 Feeder like in this picture:<br />
<div id="attachment_586" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125-tray-module.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125-tray-module-300x181.png" alt="Xerox 6125N tray module selection" title="Xerox 6125N tray module selection" width="300" height="181" class="size-medium wp-image-586" /></a><p class="wp-caption-text">Xerox 6125N tray module selection</p></div></p>
<p>Another issue, cups doesn&#8217;t seem to give all options for this printer in their default options dialog. This is bad, because you need to change the default paper source. Default it&#8217;s set to the bypass tray, which means you have to manually insert the paper when printing. Very annoying. However, using other tools give you more options. Using <span style="color:#FFFF00">system-config-printer</span> for instance gives the chance to change it. Make sure you put it to auto or tray 1 like this:<br />
<div id="attachment_591" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125n-paper-source.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125n-paper-source-300x155.png" alt="Xerox 6125N Paper source selection" title="Xerox 6125N Paper source selection" width="300" height="155" class="size-medium wp-image-591" /></a><p class="wp-caption-text">Xerox 6125N Paper source selection</p></div></p>
<p>When you finally manage to get those options set, the printer works perfectly under linux.<br />
Have fun printing!</p>
<p>Oh yeah, here&#8217;s a slackware package in case you don&#8217;t want to mess with aliens and pokemon os <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=Fuji_Xerox-DocuPrint_C525_A_AP-1.0-1.i386.tgz" title="Downloaded 24 times">Slackware package for Xerox Phaser 6125N cups driver</a> - Version 1.0 - SHA: 5f8b6478f93a6484d4834990448b152fb10d9cdd</p>
<p>And now, back to my Glenlivet&#8230; mmmmmmm<br />
<div id="attachment_597" class="wp-caption alignnone" style="width: 102px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/glenlivet-18yo.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/glenlivet-18yo.png" alt="Glenlivet 18 year old" title="Glenlivet 18 year old" width="92" height="347" class="size-full wp-image-597" /></a><p class="wp-caption-text">Glenlivet 18 year old</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New server, slackware64 and Xen 3.4</title>
		<link>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/</link>
		<comments>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 00:06:00 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[coloclue]]></category>
		<category><![CDATA[slackware64]]></category>
		<category><![CDATA[x86_64]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=274</guid>
		<description><![CDATA[You read it right, time for fun! First we build ourselves a nice cute little server in a 2U rack case made by Chenbro (sounds like Xenbro to me ). Inside we stash a quad core Phenom X2 810, 2 western digital 1TB disks from the &#8220;green&#8221; series and of course 8GB of DDR1333. Could [...]]]></description>
			<content:encoded><![CDATA[<p>You read it right, time for fun!</p>
<p>First we build ourselves a nice cute little server in a 2U rack case made by Chenbro (sounds like Xenbro to me <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
Inside we stash a quad core Phenom X2 810, 2 western digital 1TB disks from the &#8220;green&#8221; series and of course 8GB of DDR1333.<br />
Could be faster, but this should do for not too much coin. (about 600 euros).<br />
<span id="more-274"></span></p>
<p>We (which is me and lotjuh plus some friends) want this machine as a toy machine that we can all play with which we&#8217;re going to put in a rack at <a href="http://coloclue.net/">Coloclue</a>.<br />
Basically everyone pays a tiny amount of money each month and gets himself a domU on the machine that he can do whatever he wants with, like messing around with<br />
vpn tunnels and ipv6 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, after putting the stuff inside it looked a bit like this:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54016.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54016-300x225.jpg" alt="suc54016" title="suc54016" width="300" height="225" class="aligncenter size-medium wp-image-275" /></a></p>
<p>Power on, it works! (duh)<br />
Work through the BIOS, making sure to disable the halt on errors prompt and such nonsense. 512MB for integrated video? No thanks, too bad the minimum is still 128MB.<br />
And how come every time I run through a BIOS I find new (and undocumented) settings like &#8220;Enable C1E support&#8221;? Apparently this is some kind of new AMD power saving stuff,<br />
but from the comments I found it seems like a tickless kernel has issues with it, so I&#8217;ll leave it off.</p>
<p>Boot from PXE, slackware64-current, go go go. Created a little md0 raid1 boot partition, ran setup using NFS and a few minutes later it boots into slackware 64.<br />
That was easy. (And fast!)<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54018.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54018-300x225.jpg" alt="suc54018" title="suc54018" width="300" height="225" class="aligncenter size-medium wp-image-276" /></a></p>
<p>Now for the more interesting stuff. First, let&#8217;s get rid of lilo and put the latest grub on the machine. It&#8217;s just such a nicer bootloader, once you get it properly installed that is.<br />
It does support autoconf these days, so I figured I could use my slackbuild script for it. Slackbuild immediately cursed at me for not having the packages dir, so that was fixed as well <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I also put the site config in place while I was at it.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># svn co svn://svn.sv.gnu.org/grub/trunk/grub2 grub2-svn</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># cd grub2-svn</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>grub2-svn<span style="color: #666666; font-style: italic;"># slackbuild.pl</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>grub2-svn<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/grub2-1.97-svn-x86_64-1.tgz</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro<span style="color: #666666; font-style: italic;"># grub-install /dev/md0</span><br />
Installation finished. No error reported.<br />
This is the contents of the device map <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>grub<span style="color: #000000; font-weight: bold;">/</span>device.map.<br />
Check <span style="color: #000000; font-weight: bold;">if</span> this is correct or not. If any of the lines is incorrect,<br />
fix it and re-run the script <span style="color: #000000; font-weight: bold;">`</span>grub-install<span style="color: #ff0000;">'.<br />
<br />
(hd0) &nbsp; /dev/sda<br />
(hd1) &nbsp; /dev/sdb</span></div></div>
<p>Well, that went smooth. Now for the config file, this is usually more tricky.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro<span style="color: #666666; font-style: italic;"># grub-mkconfig &gt; /boot/grub/grub.cfg</span><br />
Generating grub.cfg ...<br />
Found linux image: <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-huge-2.6.29.6<br />
Found linux image: <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-generic-2.6.29.6<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>Looking good&#8230;. seems like it even added the mdraid module in the config, grub is improving these days <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Time for a reboot to see if it lied to us. *reboot*<br />
Well, guess what&#8230;. it actually worked. Amazing.</p>
<p>Time for Xen!<br />
We have 2 HDDs in there which I split up in a 20 GB boot partition and the rest. Both partitions are mirrored using raid-1 so a disk could basically disappear and the system should still be fine.<br />
The bigger partition will be fed into LVM so we can make nice little chunks there to hand out to the domUs.<br />
Other than that everyone can decide for themselves whatever the hell they want to run on it, as long as it runs under Xen.<br />
Here we go:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># cd /usr/src</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># mkdir xen</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># cd xen/</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># tar zxvf xen-3.4.1.tar.gz </span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># cd xen-3.4.1</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make xen</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make install-xen</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>That went smooth over here, and installed the xen hypervisor. (you should now have a /boot/xen.gz, which is a symlink to xen-3.4.1.gz).<br />
However, we also need a dom0 kernel and the xen tools to run and control the installation.<br />
First the tools:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make tools</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> .. <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make install-tools</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Easy again. You should now have stuff like &#8216;<span style="color:#FF00FF">xm</span>&#8216; installed.<br />
This also created the <span style="color:#FF0055">/etc/xen</span> directory where we can muck around with the configuration later.</p>
<p>Now for the most challenging part: the kernel.<br />
What usually bites me is getting the kernel config worked out to my wishes, xen seems to wreck havoc with mine most of the times.<br />
Of course you could try to go for the default kernel, but I hate messing around with modules and initrds, so I usually try to make a megahuge kernel.<br />
Let&#8217;s go!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make linux-2.6-xen0-prep</span></div></div>
<p>This fetches the kernel sources from hg and prepares them with initial configs etc. It might ask you some stuff, answer them to the best of your abilities, or simply accept the default.<br />
It doesn&#8217;t matter much if you messed up the questions, you have a chance to fix it. And fix the rest of the kernel as well while you&#8217;re at it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># cd build-linux-2.6.18-xen0_x86_64/</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #000000; font-weight: bold;">/</span>build-linux-2.6.18-xen0_x86_64<span style="color: #666666; font-style: italic;"># make menuconfig</span></div></div>
<p>You are now presented with the usual kernel config dialogs. Have fun running through all of them as I did and halfway noticing the lack of <span style="color:#0055FF">EXT4</span> support.<br />
<span style="color:#FF0000">RAAAH!</span><br />
Kernel 2.6.18.8 for you&#8230; it&#8217;s ancient. But still default for the xen dom0. I wouldn&#8217;t mind that much, if it at least included support for my hardware (another machine we have with Xen required a patch to get AHCI up and running for that controller) and supported my filesystems. Meh.<br />
So after the conclusion that 2.6.18 wouldn&#8217;t work, I went for something better: 2.6.29.6 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.29-6.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.6.tar.bz2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># tar jxvf linux-2.6.29.6.tar.bz2 </span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>KABOOM<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># mkdir xen-patches</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># cd xen-patches</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-patches<span style="color: #666666; font-style: italic;"># tar jxvf ../xen-patches-2.6.29-6.tar.bz2 </span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-patches<span style="color: #666666; font-style: italic;"># cd ../linux-2.6.29.6</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># for k in ../xen-patches/* ; do echo Patch $k: ; &nbsp;patch -p1 &lt; $k ; done</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>WHOOSH<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>If all went well you now have a patched 2.6.29.6 kernel source. Make sure it didn&#8217;t barf though, but if you used the correct kernel version this should apply cleanly.<br />
Retry on the config!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># make menuconfig</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>yadieyada, don<span style="color: #ff0000;">'t forget to enable Xen dom0 support* ]<br />
root@xenbro:/usr/src/xen/linux-2.6.29.6# time make bzImage modules modules_install<br />
&nbsp;[ *crunch crunch* ]</span></div></div>
<p>Time for some coffee.<br />
When it&#8217;s done (took about 7 minutes on this machine with my huge list of options) we still need to put it in place and add it to grub&#8217;s menu.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># cp vmlinux /boot/vmlinuz-xen-2.6.29.6 </span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># vim /boot/grub/grub.cfg</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Add this somewhere logical</span><br />
menuentry <span style="color: #ff0000;">&quot;xen-3.4.1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod raid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod mdraid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod ext2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">root</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>md0<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; search <span style="color: #660033;">--no-floppy</span> <span style="color: #660033;">--fs-uuid</span> <span style="color: #660033;">--set</span> 2f8afc00-ec48-4d1f-b4fa-5787e18f2387<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; multiboot <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1.gz <span style="color: #007800;">dom0_mem</span>=512M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-xen-2.6.29.6 <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 ro<br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>If you did everything allright, yay, it boots with Xen! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Of course over here it died shortly after booting the kernel because it couldn&#8217;t mount its root filesystem, but that&#8217;s nothing new with this stuff <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Time to debug the problem. After rebuilding my kernel about 4 times and fighting with grub, I started to seriously wonder what the hell its problem was.<br />
Raid (md) support, check.<br />
Ext4 support, check.<br />
Both in grub and the kernel they were present. Maybe xen in the way? Seems unlikely.<br />
The fact that the kernel gets booted proves to me that grub at least &#8220;gets&#8221; it.<br />
Finally I created an initrd to see if that would help. It didn&#8217;t, except for the fact that it gave me a nice little shell to dick around with.<br />
This showed me that md0 would indeed not mount, probably because it wasn&#8217;t started. After starting it manually using some busybox command (raidgetthefuckstarted /dev/md0 or something)<br />
I could mount it and exit the emergency shell, the system booted.<br />
After I recreated the initrd to include raid support (doh) it actually managed to boot without outsider help. Goody.<br />
The command for this was: (note that I gave my kernel the -BenV local version string)</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># mkinitrd -c -k 2.6.29.6-BenV -m ext4 -f ext4 -R -r /dev/md0</span></div></div>
<p>And the grub config entry now looks like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">menuentry <span style="color: #ff0000;">&quot;GNU/Linux, Xen 3.4.1 / Linux 2.6.29.6&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod raid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod mdraid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod ext2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">root</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>md0<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; search <span style="color: #660033;">--no-floppy</span> <span style="color: #660033;">--fs-uuid</span> <span style="color: #660033;">--set</span> 2f8afc00-ec48-4d1f-b4fa-5787e18f2387<br />
&nbsp; &nbsp; &nbsp; &nbsp; multiboot <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1.gz <span style="color: #007800;">dom0_mem</span>=512M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-xen-2.6.29.6 <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 ro<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>initrd-xen-2.6.29.6.gz<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>Well, good enough for today. Bedtime!</p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/xenbro.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/xenbro-1024x624.png" alt="xenbro" title="xenbro" width="1024" height="624" class="alignleft size-large wp-image-288" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
