<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.burghardt.pl/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Krzysztof Burghardt’s blog</title>
	
	<link>http://blog.burghardt.pl</link>
	<description>Create. Break. Fix. Repeat.</description>
	<lastBuildDate>Mon, 05 Jul 2010 07:35:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="burghardt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.burghardt.pl/feed/" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://www.burghardt.pl/feed/" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fwww.burghardt.pl%2Ffeed%2F" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>ESE Key Daemon 1.2.7 released</title>
		<link>http://blog.burghardt.pl/2010/07/ese-key-daemon-1-2-7-released/</link>
		<comments>http://blog.burghardt.pl/2010/07/ese-key-daemon-1-2-7-released/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 07:35:52 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[multimedia]]></category>

		<guid isPermaLink="false">http://blog.burghardt.pl/?p=432</guid>
		<description><![CDATA[<p>New version of ESE Key Daemon was released today.</p>
<p>New features include the ability to handle multiple key combinations and distinguish between key presses and releases. A problem with the handling of the last line in a configuration file when there is no newline on the last line is gone. Numeric keys are now also allowed in [...]]]></description>
			<content:encoded><![CDATA[<p>New version of <a href="/2007/12/ese-key-daemon/">ESE Key Daemon</a> was released today.</p>
<p>New features include the ability to handle multiple key combinations and distinguish between key presses and releases. A problem with the handling of the last line in a configuration file when there is no newline on the last line is gone. Numeric keys are now also allowed in the configuration file.</p>
<p>Download: <a href="http://www.burghardt.pl/files/esekeyd-1.2.7.tar.gz">esekeyd-1.2.7.tar.gz</a> (<a href="http://www.burghardt.pl/files/esekeyd-1.2.7.tar.gz.asc">.asc</a>)</p>
<p>MD5: 5937ad6d7815dbc6ab6983411a9f37d4<br />
SHA1: 07671be42b61973a3270aaf1b41c3467568ae7ac</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2010/07/ese-key-daemon-1-2-7-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian GNU/Linux on Dell Inspiron 1764</title>
		<link>http://blog.burghardt.pl/2010/04/debian-gnulinux-on-dell-inspiron-1764/</link>
		<comments>http://blog.burghardt.pl/2010/04/debian-gnulinux-on-dell-inspiron-1764/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 18:17:59 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[AMD64]]></category>
		<category><![CDATA[BCM4353]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Inspiron]]></category>
		<category><![CDATA[Radeon]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=387</guid>
		<description><![CDATA[<p>Installing, configuring and using Debian GNU/Linux on Dell Inspiron 1764 (N0476409) notebook.</p>
<p></p>
Hardware overview

Intel Core i5-520M (2.4GHz, 4 Threads, turbo Boost up to 2.93GHz, 3M cache)
17.3&#8243; WLED High Definition+ (1600&#215;900) TFT Display
1GB ATI Mobility Radeon HD 5450
4096MB 1067MHz Dual Channel DDR3 SDRAM (2&#215;2048)
500GB (5400RPM) Serial ATA Hard Drive
DVD +/- RW Drive (read/write CD &#038; DVD)
Dell Wireless 1520 [...]]]></description>
			<content:encoded><![CDATA[<p>Installing, configuring and using Debian GNU/Linux on <a href="http://www1.euro.dell.com/uk/en/home/Laptops/inspiron-1764/pd.aspx?refid=inspiron-1764&#038;cs=ukdhs1&#038;s=dhs">Dell Inspiron 1764</a> (<a href="http://www.google.com/search?q=N0476409">N0476409</a>) notebook.</p>
<p><span id="more-387"></span></p>
<h2>Hardware overview</h2>
<ul>
<li>Intel Core i5-520M (2.4GHz, 4 Threads, turbo Boost up to 2.93GHz, 3M cache)</li>
<li>17.3&#8243; WLED High Definition+ (1600&#215;900) TFT Display</li>
<li>1GB ATI Mobility Radeon HD 5450</li>
<li>4096MB 1067MHz Dual Channel DDR3 SDRAM (2&#215;2048)</li>
<li>500GB (5400RPM) Serial ATA Hard Drive</li>
<li>DVD +/- RW Drive (read/write CD &#038; DVD)</li>
<li>Dell Wireless 1520 (802.11a/b/g/n)</li>
<li>Dell Bluetooth 365</li>
<li>Integrated 1,3MP webcam</li>
</ul>
<h2>Devices that works with Linux</h2>
<ul>
<li>CPU: both cores and HT works, recent Linux kernels support speedstep,</li>
<li>USB: works (even with Debian Installer images),</li>
<li>DVD+/-RW: works (even with Debian Installer images),</li>
<li>Graphic: basic features (2D, hardware accelerated 3D rendering) works with <strong>proprietary drivers only</strong>, most other features (CAL, POWERplay, multihead) unsupported; <strong>no FLOSS alternative</strong>,</li>
<li>Sound: works, but I need to pass options to module to make sound work properly,</li>
<li>Ethernet: works (even with Debian Installer images),</li>
<li>Wireless LAN: basic features (STA mode) supported by <strong>proprietary drivers only</strong>, other features (monitor mode and packet injection) not supported; <strong>no FLOSS alternative</strong>,</li>
<li>Bluetooth: works (as HCI only after reset with hid2hci),</li>
<li>Card reader: works (tested with MicroSD and Memory Stick PRO Duo, both with adapters),</li>
<li>Webcam: works.</li>
</ul>
<p></p>
<p>Also &#8220;Suspend to RAM&#8221; works using sysfs method of hibernate script. &#8220;Suspend to disk&#8221; works using ususpend method.</p>
<h2>Devices that does not work with Linux</h2>
<ul>
<li>none :-D</li>
</ul>
<h2>Devices</h2>
<ul>
<li><a href='/wp-content/uploads/2010/04/dmesg.txt' title='Linux kernel messages'>Linux kernel messages</a></li>
<li><a href='/wp-content/uploads/2010/04/lspci.txt' title='PCI devices list'>PCI devices list</a></li>
<li><a href='/wp-content/uploads/2010/04/lsusb.txt' title='USB devices list'>USB devices list</a></li>
<li><a href='/wp-content/uploads/2010/04/cpuinfo.txt' title='Processor details'>Processor details</a></li>
</ul>
<h2>Configuration</h2>
<h3>Graphic</h3>
<p>Download and install <a href="http://support.amd.com/us/gpudownload/Pages/index.aspx">fglrx</a> driver. <a href="http://www.google.com/search?q=fglrx+install">Google</a> is full of instruction how to install it, so I skip this step.</p>
<p>When driver is installed and fglrx is loaded into kernel its time to configure X.Org. Probably aticonfig would be best choice, but it fails on Mobility Radeon HD 5000 series cards with message:</p>
<pre>
# aticonfig --initial
aticonfig: No supported adapters detected
</pre>
<p>Download <a href='/wp-content/uploads/2010/04/xorg.txt'>my xorg.conf</a> and put it into <em>/etc/X11</em> directory. Then start X-server using <em>startx</em> command. My default layout include Inspiron&#8217;s built-in TFT screen, ATI Mobility Radeon HD 5450, ALPS touchpad and any other mice connected to it.</p>
<p>You will probably see &#8220;AMD unsupported hardware&#8221; watermark in lower right corner of the screen. There is no configuration option to remove it. Removal is possible by patching <em>fglrx_drv.so</em> file. <a href="http://www.phoronix.com/forums/member.php?u=6147">Kano</a> posted small script to replace call to EnableLogo with NOPs on <a href="http://www.phoronix.com/forums/showthread.php?t=19875">Phoronix Forums&#8217; thread &#8220;Unsupported Hardware watermark&#8221;</a>:</p>
<div class="codecolorer-container bash default" 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"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #007800;">DRIVER</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xorg<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>drivers<span style="color: #000000; font-weight: bold;">/</span>fglrx_drv.so<br />
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>objdump <span style="color: #660033;">-d</span> <span style="color: #007800;">$DRIVER</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'/call/&amp;&amp;/EnableLogo/{print &quot;\\x&quot;$2&quot;\\x&quot;$3&quot;\\x&quot;$4&quot;\\x&quot;$5&quot;\\x&quot;$6}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp;<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;s/<span style="color: #007800;">$x</span>/\x90\x90\x90\x90\x90/g&quot;</span> <span style="color: #007800;">$DRIVER</span><br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<h3>Sound</h3>
<p>Create file <em>/etc/modprobe.d/sound</em> with following content:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">alias snd-card-0 snd-hda-intel<br />
options snd-hda-intel model=dell index=0</div></div>
<p>Reload alsa driver (or reboot).</p>
<h3>Wireless LAN</h3>
<p>Drivers need to be compiled from sources. First prepare your system for kernel module building. Install <em>build-essential</em> and <em>module-assistant</em> packages.Then prepare kernel headers:</p>
<pre>
# aptitude install build-essential module-assistant
# m-a prepare
</pre>
<p>When kernel headers are ready download <a href="http://www.broadcom.com/support/802.11/linux_sta.php">802.11 Linux STA driver</a> for Broadcom&#8217;s IEEE 802.11a/b/g/n devices (this includes BCM4311, BCM4312, BCM4313, BCM4321 and BCM4322). Compile it. Install. And finally load into running kernel:</p>
<pre>
# cd /usr/src
# wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_64-v5.60.48.36.tar.gz
# mkdir hybrid-portsrc-x86_64-v5.60.48.36
# cd hybrid-portsrc-x86_64-v5.60.48.36
# tar zxf ../hybrid-portsrc-x86_64-v5.60.48.36.tar.gz
# make
# mkdir /lib/modules/`uname -r`/local
# cp wl.ko /lib/modules/`uname -r`/local
# depmod -A
# modprobe -v wl
</pre>
<p>Command <em>dmesg | tail</em> should output something similar to this:</p>
<pre>
wlan0: Broadcom BCM4353 802.11 Hybrid Wireless Controller 5.60.48.36
</pre>
<h3>Bluetooth</h3>
<p>Dell Bluetooth 365 is detected as HCI on kernel <a href="http://packages.debian.org/lenny-backports/linux-headers-2.6.32-bpo.4-amd64">2.6.32-bpo.4-amd64</a> only if previously reset with hid2hci (get a copy form <a href="http://packages.debian.org/lenny-backports/bluez">bluez 4.6</a>). This is actually <a href="http://idebian.wordpress.com/2008/07/06/manage-hid-bluetooth-devices-in-linux/">a feature, not a bug</a>. Use recent hid2hci to put device into HCI mode:</p>
<pre>
# hid2hci -m dell -v 413c -p 8162
Attempting to switch device 413c:8162 to HCI mode was successful
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2010/04/debian-gnulinux-on-dell-inspiron-1764/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>nCipher HSM with OpenSSL</title>
		<link>http://blog.burghardt.pl/2010/03/ncipher-hsm-with-openssl/</link>
		<comments>http://blog.burghardt.pl/2010/03/ncipher-hsm-with-openssl/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 22:36:50 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[CHIL]]></category>
		<category><![CDATA[HSM]]></category>
		<category><![CDATA[nCipher]]></category>
		<category><![CDATA[OpenSSL]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=370</guid>
		<description><![CDATA[<p>I just finished playing with some nCipher&#8217;s HSM. Unfortunately there is no integration guide for OpenSSL that cover CHIL interface and nCipher hardware security modules.</p>
<p>nCipher&#8217;s installation guide is quite good, but after you finish installing hardware, drivers and daemons, you are on your own.</p>
<p>I found only two helpful sources: Andrea Campi&#8217;s blog entry about nCipher NetHSM [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished playing with some <a href="http://iss.thalesgroup.com/">nCipher&#8217;s</a> <a href="http://en.wikipedia.org/wiki/Hardware_security_module">HSM</a>. Unfortunately there is no integration guide for <a href="http://www.openssl.org/">OpenSSL</a> that cover CHIL interface and nCipher hardware security modules.</p>
<p>nCipher&#8217;s installation guide is quite good, but after you finish installing hardware, drivers and daemons, you are on your own.</p>
<p>I found only two helpful sources: Andrea Campi&#8217;s blog entry about <a href="http://blog.webcom.it/articles/2006/04/07/ncipher-nethsm-with-openssl-tutorial/">nCipher NetHSM and OpenSSL</a> and Marek Marcola&#8217;s <a href="http://www.mail-archive.com/openssl-users@openssl.org/msg47199.html">post on openssl-users mailing list</a>.</p>
<p>Both guides ends on key generation and self-signed certificates. Its enough to get CHIL enabled application to work with nCipher&#8217;s HSM, but will not help you to convert any existing OpenSSL (not an CHIL-aware) application to use HSM.</p>
<p><span id="more-370"></span></p>
<h2>CHIL enabled OpenSSL</h2>
<p>When you have driver, hardserver and chil library for your HSM installed the next step is to install OpenSSL with CHIL support enabled. Modern Linux distribution may have CHIL already enabled. If so, there should be <em>libchil.so</em> library in <em>/usr/lib/ssl/engines</em> directory.</p>
<p>If <em>libchil.so</em> is missing follow OpenSSL installation steps as described in <a href="http://iss.thalesgroup.com/Resources/~/media/Files/Integration%20Guides/Apache22x.ashx">Apache2.2.x, OpenSSL 0.9.8x and nCipher Modules Integration Guide</a>.</p>
<p>When OpenSSL in installed, add <em>/opt/nfast/toolkits/hwcrhk</em> to LD_LIBRARY_PATH:</p>
<pre>
$ export LD_LIBRARY_PATH=/opt/nfast/toolkits/hwcrhk
</pre>
<p>To check if OpenSSL is able to communicate with HSM trough CHIL interface run:</p>
<pre>
$ openssl engine -t chil
(chil) CHIL hardware engine support
     [ available ]
</pre>
<p>If CHIL is <strong>available</strong> benchmark HSM with:</p>
<pre>
$ openssl speed rsa -engine chil -elapsed -multi 50
</pre>
<h2>Hardware accelerated cryptography</h2>
<p>Use <a href="http://www.openssl.org/docs/crypto/engine.html">engine</a> interface to switch to cryptography implementation from hardware security module.</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">#include &lt;openssl/engine.h&gt;</span><br />
<br />
ENGINE <span style="color: #339933;">*</span>hwEngine <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">int</span> enable_chil<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; ENGINE_load_builtin_engines<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>hwEngine <span style="color: #339933;">=</span> ENGINE_by_id<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;CHIL&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>ENGINE_set_default<span style="color: #009900;">&#40;</span>hwEngine<span style="color: #339933;">,</span> ENGINE_METHOD_ALL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">2</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>When application finish its cryptography operations, it should free engine.</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333;">void</span> disable_chil<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>hwEngine<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ENGINE_finish<span style="color: #009900;">&#40;</span>hwEngine<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; hwEngine <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ENGINE_cleanup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<h2>Hardware key protection/storage</h2>
<p>If you want to make your private keys more secure you should use hardware key protection (or even storage).</p>
<p>Hardware protected keys are stored on local filesystem, but encrypted by key stored only in HSM. To generate such key use:</p>
<pre>
$ /opt/nfast/bin/generatekey hwcrhk
</pre>
<p>Answer some questions (Protected by? module, Key type? RSA, Key size? 4096, Key identifier? keyname) and your encrypted (by module, as you choose in question above) private key is saved in <em>/opt/nfast/kmdata/local/key_hwcrhk_rsa-keyname</em>.</p>
<p>When using locally stored encryption keys you load them as in this example (I use <a href="http://www.openssl.org/docs/crypto/evp.html">EVP</a> interface for high-level cryptographic functions):</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">EVP_PKEY <span style="color: #339933;">*</span>pkey <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">int</span> load_key<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; fp <span style="color: #339933;">=</span> fopen<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;filename.key&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>fp <span style="color: #339933;">==</span> NULL<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; pkey <span style="color: #339933;">=</span> PEM_read_PrivateKey<span style="color: #009900;">&#40;</span>fp<span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> NULL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>When you have CHIL keys, loading them is also very simple:</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333;">void</span> load_key_chil<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; pkey <span style="color: #339933;">=</span> ENGINE_load_private_key<span style="color: #009900;">&#40;</span>hwEngine<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;rsa-keyname&quot;</span><span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> NULL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>When key is no longer in use destroy it with:</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333;">void</span> free_key<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; EVP_PKEY_free<span style="color: #009900;">&#40;</span>pkey<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>If application just need to do some hardware accelerated RSA or it need to use hardware protected keys those code pieces along with CHIL-enabled OpenSSL is all you need.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2010/03/ncipher-hsm-with-openssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integration of AA Google 404 with Atahualpa</title>
		<link>http://blog.burghardt.pl/2009/11/integration-of-aa-google-404-with-atahualpa/</link>
		<comments>http://blog.burghardt.pl/2009/11/integration-of-aa-google-404-with-atahualpa/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:41:55 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Atahualpa]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=361</guid>
		<description><![CDATA[<p>AskApache Google 404 default 404.php does not work properly with Atahualpa theme. To fix those problems create another 404.php file in /themes/atahualpa with this content:</p>
<p></p>
&#60;?php

ob_start&#40;&#41;;

include&#40;TEMPLATEPATH . '/functions/bfa_get_options.php'&#41;;
get_header&#40;&#41;;

if &#40;function_exists&#40;'aa_google_404'&#41;&#41;
&#160; &#160; aa_google_404&#40;&#41;;
else
&#123;
?&#62;
&#160; &#160; &#60;h2&#62;&#60;?php _e&#40;'Not Found','atahualpa'&#41;; ?&#62;&#60;/h2&#62;
&#160; &#160; &#60;p&#62;&#60;?php _e&#40;&#34;Sorry, but you are looking for something that isn't here.&#34;,&#34;atahualpa&#34;&#41;; ?&#62;&#60;/p&#62;
&#60;?php
&#125;

bfa_center_content&#40;$bfa_ata&#91;'center_content_bottom'&#93;&#41;;

get_footer&#40;&#41;;

exit&#40;&#41;;

?&#62;
<p>When it is done, choose wp-content/themes/atahualpa/404.php as 404 File [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/askapache-google-404/">AskApache Google 404</a> default 404.php does not work properly with <a href="http://wordpress.org/extend/themes/atahualpa">Atahualpa</a> theme. To fix those problems create another 404.php file in <em>/themes/atahualpa</em> with this content:</p>
<p><span id="more-361"></span></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<a href="http://www.php.net/ob_start"><span style="color: #990000;">ob_start</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/functions/bfa_get_options.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'aa_google_404'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; aa_google_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Not Found'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'atahualpa'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;<br />
&nbsp; &nbsp; &lt;p&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Sorry, but you are looking for something that isn't here.&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;atahualpa&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
bfa_center_content<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'center_content_bottom'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>When it is done, choose <em>wp-content/themes/atahualpa/404.php</em> as <strong>404 File Handling</strong> and enable AA Google 404.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/11/integration-of-aa-google-404-with-atahualpa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual destinations are faster than Camel routing</title>
		<link>http://blog.burghardt.pl/2009/10/virtual-destinations-are-faster-than-camel-routing/</link>
		<comments>http://blog.burghardt.pl/2009/10/virtual-destinations-are-faster-than-camel-routing/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 20:26:08 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ActiveMQ]]></category>
		<category><![CDATA[Camel]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=328</guid>
		<description><![CDATA[<p>Routing messages from one input queue to two output queues in ActiveMQ can be done in two different ways. Apache Camel, a powerful rule-based routing engine often used with ActiveMQ, is a typical choice. Virtual composite queue is another solution. Which to choose? The faster.</p>
<p></p>
Apache Camel
<p>Camel configuration I use:</p>
&#60;beans
 &#160; &#160;xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
 &#160; &#160;xsi:schemaLocation=&#34;http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd&#34;&#62;

&#160; &#160; &#60;camelContext [...]]]></description>
			<content:encoded><![CDATA[<p>Routing messages from one input queue to two output queues in <a href="http://activemq.apache.org/">ActiveMQ</a> can be done in two different ways. <a href="http://camel.apache.org/">Apache Camel</a>, a powerful rule-based routing engine often used with <a href="http://activemq.apache.org/">ActiveMQ</a>, is a typical choice. <a href="http://activemq.apache.org/virtual-destinations.html">Virtual composite queue</a> is another solution. Which to choose? The faster.</p>
<p><span id="more-328"></span></p>
<h2>Apache Camel</h2>
<p>Camel configuration I use:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;beans</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;camelContext</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;camel&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://camel.apache.org/schema/spring&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;route<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;from</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;activemq:INPUT-QUEUE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;activemq:OUTPUT-1-QUEUE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;activemq:OUTPUT-2-QUEUE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/route<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/camelContext<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;activemq&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.apache.activemq.camel.component.ActiveMQComponent&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;connectionFactory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.apache.activemq.ActiveMQConnectionFactory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;brokerURL&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;vm://localhost?create=false&amp;amp;waitForStart=10000&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;userName&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${activemq.username}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;password&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${activemq.password}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/beans<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Benchmark took 3 minutes 31 seconds to send 10 thousand messages through Camel:</p>
<pre>
$ time ./amqinject INPUT-QUEUE 10000
0.651u 0.490s 3:31.43 0.5%      0+0k 0+0io 0pf+0w
</pre>
<p>Unfortunately &#8220;Number Of Pending Messages&#8221; was always about 1024 and amqinject gets blocked in send() call:</p>
<pre>
INFO | Usage Manager memory limit reached on queue://INPUT-QUEUE. Producers will be throttled to the rate at which messages are removed from this destination to prevent flooding it. See http://activemq.apache.org/producer-flow-control.html for more info
</pre>
<h2>Virtual Composite Queue</h2>
<p>Virtual destinations are configured in &lt;broker&gt; tag. Here is my configuration:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;destinations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;queue</span> <span style="color: #000066;">physicalName</span>=<span style="color: #ff0000;">&quot;INPUT-QUEUE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;queue</span> <span style="color: #000066;">physicalName</span>=<span style="color: #ff0000;">&quot;OUTPUT-1-QUEUE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;queue</span> <span style="color: #000066;">physicalName</span>=<span style="color: #ff0000;">&quot;OUTPUT-2-QUEUE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/destinations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;destinationInterceptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;virtualDestinationInterceptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;virtualDestinations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compositeQueue</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;INPUT-QUEUE&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;forwardTo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;queue</span> <span style="color: #000066;">physicalName</span>=<span style="color: #ff0000;">&quot;OUTPUT-1-QUEUE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;queue</span> <span style="color: #000066;">physicalName</span>=<span style="color: #ff0000;">&quot;OUTPUT-2-QUEUE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/forwardTo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compositeQueue<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/virtualDestinations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/virtualDestinationInterceptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/destinationInterceptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Amqinject never blocked and it took only <strong>2 minutes 29 seconds</strong> to complete:</p>
<pre>
% time ./amqinject INPUT-QUEUE 10000
0.718u 0.539s 2:29.33 0.8%      0+0k 0+0io 0pf+0w
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/10/virtual-destinations-are-faster-than-camel-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aktualizacja OpenWRT</title>
		<link>http://blog.burghardt.pl/2009/10/aktualizacja-openwrt/</link>
		<comments>http://blog.burghardt.pl/2009/10/aktualizacja-openwrt/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 23:11:34 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Polish]]></category>
		<category><![CDATA[Asus]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[WL-500g]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=327</guid>
		<description><![CDATA[<p>W styczniu opisałem jak zainstalować dopasowaną do własnych potrzeb dystrybucję OpenWRT na routerze ASUS WL-500g Premium. Pora na aktualizację.</p>
<p></p>
Kopia zapasowa
<p>Na wszelki wypadek, gdyby aktualizacja się nie powiodła warto wykonać kopię bezpieczeństwa aktualnego systemu. Informacje na temat wykonywania kopii całego oprogramowania (kernel + squashfs + jffs2) znajdziemy w wiki pod hasłem &#8220;BackupAndRestore&#8220;.</p>
Aktualizacja źródeł
<p>Zgodnie z instrukcją na stronie [...]]]></description>
			<content:encoded><![CDATA[<p>W styczniu opisałem jak zainstalować dopasowaną do własnych potrzeb dystrybucję OpenWRT na routerze <a href="/2009/01/openwrt-na-miare-naszych-mozliwosci-i-potrzeb">ASUS WL-500g Premium</a>. Pora na aktualizację.</p>
<p><span id="more-327"></span></p>
<h2>Kopia zapasowa</h2>
<p>Na wszelki wypadek, gdyby aktualizacja się nie powiodła warto wykonać kopię bezpieczeństwa aktualnego systemu. Informacje na temat wykonywania kopii całego oprogramowania (kernel + squashfs + jffs2) znajdziemy w <a href="http://nuwiki.openwrt.org/">wiki</a> pod hasłem &#8220;<a href="http://nuwiki.openwrt.org/oldwiki/BackupAndRestore">BackupAndRestore</a>&#8220;.</p>
<h2>Aktualizacja źródeł</h2>
<p>Zgodnie z instrukcją na stronie <a href="https://dev.openwrt.org/wiki/GetSource">zatytułowanej &#8220;GetSource&#8221;</a> pobieramy źródła. Jeśli mamy jeszcze poprzednie używamy <em>svn switch &#8211;relocate</em>, aby zmienić protokół z <em>https://</em> na <em>svn://</em>, a następnie wydajemy polecenie <em>svn up</em>.</p>
<h2>Nakładanie łatek</h2>
<p>Łatka zwiększająca domyślny limit wielkości obszaru rootfs nie jest już potrzebna. Aktualny limit jest ustawiony wyżej niż ustawiała go łatka.</p>
<p>Łatka włączająca wsparcie dla <a href="http://ocf-linux.sourceforge.net/">OCF</a> w OpenSSL wygląda tak:</p>
<div class="codecolorer-container diff default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Index: package/openssl/Makefile<br />
===================================================================<br />
<span style="color: #888822;">--- package/openssl/Makefile &nbsp; &nbsp;<span style="">&#40;</span>wersja 18079<span style="">&#41;</span></span><br />
<span style="color: #888822;">+++ package/openssl/Makefile &nbsp; &nbsp;<span style="">&#40;</span>kopia robocza<span style="">&#41;</span></span><br />
<span style="color: #440088;">@@ -81,6 +81,8 @@</span><br />
&nbsp;define Build/Configure<br />
&nbsp; &nbsp; <span style="">&#40;</span>cd $<span style="">&#40;</span>PKG_BUILD_DIR<span style="">&#41;</span>; \<br />
&nbsp; &nbsp; &nbsp; &nbsp; ./Configure linux-openwrt \<br />
<span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --with-cryptodev \</span><br />
<span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --with-cryptodev-digests \</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --prefix=/usr \<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --openssldir=/etc/ssl \<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="">&#40;</span>TARGET_CPPFLAGS<span style="">&#41;</span> \</div></div>
<h2>Konfiguracja źródeł</h2>
<p>Uruchamiamy <em>make menuconfig</em> i wczytujemy poprzednio użyty plik konfiguracyjny.</p>
<p>Następnie w menu wybieramy <strong>Advanced configuration options (for developers)</strong>, a w podmenu <strong>Use ccache</strong> oraz <strong>Toolchain Options</strong>, a w nim <strong>Enable Stack-Smashing Protection support</strong>.</p>
<p>Aby używać najnowszej wersji sterownika WiFi oraz najnowszego firmware wybieramy w menu głównym <strong>Kernel modules</strong>, a następnie <strong>Wireless Drivers</strong>. W tym podmenu wybieramy <strong>kmod-b43</strong> oraz upewniamy się, że <strong>odznaczona pozostaje</strong> opcja <em>kmod-b43legacy</em>.</p>
<p>W tym samym podmenu możemy wybrać <strong>b43 firmware version</strong>. Wybieramy <strong>4.178.10.4 (experimental)</strong>.</p>
<h2>Kompilacja i instalacja</h2>
<p>Kompilację i instalację przeprowadzamy zgodnie z <a href="/2009/01/openwrt-na-miare-naszych-mozliwosci-i-potrzeb/">wcześniejszą instrukcją</a>.</p>
<h2>Problemy</h2>
<p>Jedyny, i w dodatku prosty do usunięcia problem jaki napotkałem to&#8230;</p>
<h3>OPKG: Could not obtain administrative lock</h3>
<p>Jeśli po wydaniu polecenia <em>opkg update</em> zobaczymy komunikat:</p>
<pre>
Collected errors:
 * Could not obtain administrative lock
</pre>
<p>Należy utworzyć katalog <em>/usr/lib/opkg</em>. Jeśli katalog istnieje należy usunąć z niego plik <em>lock</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/10/aktualizacja-openwrt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from ActiveMQ-CPP/CMS version 2.2 to 3.0</title>
		<link>http://blog.burghardt.pl/2009/08/migrating-from-activemq-cppcms-version-2-2-to-3-0/</link>
		<comments>http://blog.burghardt.pl/2009/08/migrating-from-activemq-cppcms-version-2-2-to-3-0/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 00:02:55 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ActiveMQ]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[TCP]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=326</guid>
		<description><![CDATA[<p>Migrating from ActiveMQ-CPP/CMS version 2.2.6 to 3.0.1 is very easy. There are only two minor problems to deal with.</p>
<p></p>
First problem: exceptions
<p>No idea what &#8220;N3cms12CMSExceptionE&#8221; is? Use getCause() on cms::CMSException
objects to get std::exception*. Do not call what() directly. Do not try to call what() from any base classes.</p>
catch &#40;cms::CMSException&#38; e&#41; &#123;
&#160; &#160; cout &#60;&#60; e.getCause&#40;&#41;-&#62;what&#40;&#41; &#60;&#60; endl;
&#125;
<p>And [...]]]></description>
			<content:encoded><![CDATA[<p>Migrating from <a href="http://activemq.apache.org/">ActiveMQ</a>-CPP/<a href="http://activemq.apache.org/cms/">CMS</a> version 2.2.6 to 3.0.1 is very easy. There are only two minor problems to deal with.</p>
<p><span id="more-326"></span></p>
<h2>First problem: exceptions</h2>
<p>No idea what &#8220;N3cms12CMSExceptionE&#8221; is? Use <em>getCause()</em> on <em>cms::CMSException</em><br />
objects to get <em>std::exception*</em>. Do not call <em>what()</em> directly. Do not try to call <em>what()</em> from any base classes.</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">catch</span> <span style="color: #008000;">&#40;</span>cms<span style="color: #008080;">::</span><span style="color: #007788;">CMSException</span><span style="color: #000040;">&amp;</span> e<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> e.<span style="color: #007788;">getCause</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>what<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>And now &#8220;N3cms12CMSExceptionE&#8221; is &#8220;No Matching Factory Registered for format := tcp&#8221;.</p>
<h2>Second problem: library initialization</h2>
<p>&#8220;No Matching Factory Registered for format := tcp&#8221; suggests that library was not initialized properly or some protocol-related modules was not loaded. Version 3.0 (and above) requires explicit initialization of ActiveMQ library.</p>
<p>To fix this problem include <em>activemq/library/ActiveMQCPP.h</em> and call <em>ActiveMQCPP::initializeLibrary()</em>.</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339900;">#include &lt;activemq/library/ActiveMQCPP.h&gt;</span><br />
<span style="color: #666666;">// ...</span><br />
activemq<span style="color: #008080;">::</span><span style="color: #007788;">library</span><span style="color: #008080;">::</span><span style="color: #007788;">ActiveMQCPP</span><span style="color: #008080;">::</span><span style="color: #007788;">initializeLibrary</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/08/migrating-from-activemq-cppcms-version-2-2-to-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Szwajcarski nóż^Wpendrive oficerski</title>
		<link>http://blog.burghardt.pl/2009/07/szwajcarski-nozwpendrive-oficerski/</link>
		<comments>http://blog.burghardt.pl/2009/07/szwajcarski-nozwpendrive-oficerski/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 20:46:52 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Polish]]></category>
		<category><![CDATA[GRUB]]></category>
		<category><![CDATA[GRUB4DOS]]></category>
		<category><![CDATA[PenDrive]]></category>
		<category><![CDATA[QEMU]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=325</guid>
		<description><![CDATA[<p>Szwajcarskie noże oficerskie słyną ze swej funkcjonalności. Odkąd zaczęto produkować wersje z wbudowaną pamięcią flash na USB zastanawiałem się, jak zapewnić oprogramowaniu zainstalowanemu na przenośnej pamięci równie dużą funkcjonalność.</p>
<p></p>
PenDrive do zadań specjalnych
<p>Plan minimum to możliwość uruchamiania z pamięci klucza USB przynajmniej:</p>

Programu rozruchowego GRUB
Ultimate Boot CD
Parted Magic OS

<p>Dodatkowo przydatna byłaby dystrybucja typu LiveCD (Debian Live?) oraz możliwość [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pl.wikipedia.org/wiki/Szwajcarski_nóż_oficerski">Szwajcarskie noże oficerskie</a> słyną ze swej funkcjonalności. Odkąd zaczęto produkować <a href="http://victorinox.com.pl/?p=1:25">wersje z wbudowaną pamięcią flash na USB</a> zastanawiałem się, jak zapewnić oprogramowaniu zainstalowanemu na przenośnej pamięci równie dużą funkcjonalność.</p>
<p><span id="more-325"></span></p>
<h2>PenDrive do zadań specjalnych</h2>
<p>Plan minimum to możliwość uruchamiania z pamięci klucza USB przynajmniej:</p>
<ul>
<li>Programu rozruchowego <a href="http://www.gnu.org/software/grub/">GRUB</a></li>
<li><a href="http://www.ultimatebootcd.com/">Ultimate Boot CD</a></li>
<li><a href="http://www.partedmagic.com/">Parted Magic OS</a></li>
</ul>
<p>Dodatkowo przydatna byłaby dystrybucja typu LiveCD (<a href="http://debian-live.alioth.debian.org/">Debian Live</a>?) oraz możliwość uruchamiania <a href="http://www.debian.org/devel/debian-installer/">instalatora Debiana</a>.</p>
<h2>Przygotowanie pamięci</h2>
<p>Przygotowanie dysku USB rozpoczynamy od usunięcia aktualnej tablicy partycji. W wyniku wykonania tego kroku dane na dysku nie będą już dostępne. Mój dysk jest w systemie widoczny jako <em>/dev/sda</em>.</p>
<pre>
# dd if=/dev/zero of=/dev/sda bs=512 count=1
</pre>
<p>Gdy tablica partycji jest już czysta, tworzymy partycję startową. W tym celu użyjemy programu <em>mkdiskimage</em> z pakietu <a href="http://packages.debian.org/syslinux-common">syslinux-common</a>. Użycie tego narzędzia pozwala na stworzenie dysku, który będzie można uruchamiać zarówno jako <strong>USB-HDD</strong>, jak i jako <strong>USB-ZIP</strong>. Partycja startowa będzie oznaczona numerem 2, dzięki czemu systemy Windows, nie będą jej używały.</p>
<pre>
# mkdiskimage -2 -z /dev/sda 1024
</pre>
<p>Ostatni parametr to wielkość partycji. W moim przypadku 1024, czyli największy rozmiar, który jest obsługiwany przez wszystkie systemy <a href="http://pl.wikipedia.org/wiki/BIOS">BIOS</a>. Możemy stworzyć mniejszą partycję, jeśli mamy mniejszą <a href="http://pl.wikipedia.org/wiki/Pamięć_flash">pamięć flash</a>. Stworzenie większej, może spowodować problemy z uruchamianiem systemu z tej partycji.</p>
<h2>Instalacja GRUB-a</h2>
<p>Kolejnym krokiem będzie instalacja <a href="http://sourceforge.net/projects/grub4dos/">GRUB4DOS</a>. Po pobraniu i rozpakowaniu programu wydajemy, w katalogu z programem, polecenia:</p>
<pre>
# ./bootlace.com /dev/sda
# ./bootlace.com --floppy /dev/sda2
</pre>
<p>Aby dokończyć instalację, montujemy partycję <em>/dev/sda2</em> i kopiujemy na nią plik <em>grldr</em>:</p>
<pre>
# mount /dev/sda2 /mnt
# cp grldr /mnt
</pre>
<h2>Instalacja Ultimate Boot CD i Parted Magic OS</h2>
<p>W tym przypadku ciężko mówić nawet o instalacji. Po prostu umieszczamy pliki <em>ubcd.iso</em> i <em>pmagic-4.1.iso</em> na nośniku (obok skopiowanego wcześniej <em>grldr</em>).</p>
<h2>Łączenie elementów układanki w działającą całość</h2>
<p>Pewnie już każdy zastanawia się jak to ma niby zadziałać? GRUB i obrazy ISO płyt CD!? Odpowiedź jest prosta: <em>menu.lst</em>.</p>
<p>Po rozpakowaniu GRUB4DOS otrzymamy plik <em>menu.lst</em>, w którym odnajdziemy m.in. takie wpisy:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">title Parted Magic ISO<br />
fallback 7<br />
find --set-root /pmagic.iso<br />
map /pmagic.iso (0xff) || map --mem /pmagic.iso (0xff)<br />
map --hook<br />
chainloader (0xff)<br />
savedefault --wait=2<br />
<br />
title Ultimate Boot CD ISO<br />
fallback 8<br />
find --set-root /ubcd.iso<br />
map /ubcd.iso (0xff) || map --mem /ubcd.iso (0xff)<br />
map --hook<br />
chainloader (0xff)<br />
savedefault --wait=2</div></div>
<p>Oto cała magia GRUB4DOS. Potrafi on załadować system z bootowalnego obrazu ISO.</p>
<h2>Testowanie z pomocą QEMU</h2>
<p>Aby przetestować działanie PenDrive-a bez konieczności restartowania komputera użyjemy <a href="http://pl.wikipedia.org/wiki/QEMU">QEMU</a>. Po odmontowaniu systemu plików wydajemy polecenie:</p>
<pre>
$ qemu -monitor stdio -kernel-kqemu -m 1024 -hda /dev/sda
</pre>
<p>Użyte parametry włączają linię komend QEMU na konsoli, z której go uruchomiliśmy; 1024MB pamięci RAM w maszynie wirtualnej; oraz użycie <em>kqemu</em> również dla kodu jądra.</p>
<p>Plan minimum wykonany. Uruchamianie instalatora Debiana i dystrybucji Live jest bardziej skomplikowane, ale również możliwe.</p>
<h2>Debian-Installer</h2>
<p>Niestety ISO aktualnej wersji stabilnej (&#8220;<a href="http://www.debian.org/releases/lenny/">Lenny</a>&#8220;) nie potrafi wystartować w ten sposób, dlatego użyjemy <em>hd-media/boot.img.gz</em> dla <a href="http://ftp.pl.debian.org/debian/dists/lenny/main/installer-i386/current/images/hd-media/">i386</a> (lub <a href="http://ftp.pl.debian.org/debian/dists/lenny/main/installer-amd64/current/images/hd-media/">amd64</a>).</p>
<p>Plik ten należy poddać dekompresji i skopiować na PenDrive-a:</p>
<pre>
# gunzip boot.img.gz
# cp boot.img /mnt/debian-installer.img
</pre>
<p>Do <em>menu.lst</em> należy dodać następujący wpis:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">title Debian-Installer<br />
find --set-root /debian-installer.img || root (fd0)<br />
map /debian-installer.img (fd0)<br />
map --hook<br />
chainloader (fd0)+1<br />
rootnoverify (fd0)<br />
map --floppies=1</div></div>
<p>Oprócz <em>hd-media/boot.img.gz</em> na nośniku potrzebne jest jeszcze zwykłe ISO instalatora Debiana. Można wybrać dowolny obraz z dostępnych (netinst, cd1 a nawet dvd1, jeśli mamy około 4GB wolnego miejsca). Obraz może znajdować się na innej partycji.</p>
<h2>Debian Live</h2>
<p>Instalacja Debian Live na PenDrive jest bardziej skomplikowana. Zaczynamy od <a href="http://cdimage.debian.org/cdimage/release/current-live/i386/iso-cd/">wybrania &#8220;smaku&#8221; dystrybucji Live</a>. Do wyboru mamy: Gnome, KDE, XFCE, LXDE, Rescue oraz standard.</p>
<p>Gdy pobraliśmy już plik ISO. Za pomocą <em>mount -o loop</em> lub <a href="http://pl.wikipedia.org/wiki/Midnight_Commander">Midnight Commandera</a> kopiujemy plik <em>live/filesystem.squashfs</em> do katalogu <em>live</em> na dysku USB, a pozostałe pliki z płyty CD do jednego katalogu (np. <em>/tmp/debian-live</em>).</p>
<p>Z wszystkich plików (poza <em>live/filesystem.squashfs</em>!) tworzymy nowy plik ISO komendą:</p>
<pre>
mkisofs -o /tmp/debian-live.iso -J -l -cache-inodes -allow-multidot -no-emul-boot -boot-load-size 4 -boot-info-table -r -b isolinux/isolinux.bin -c isolinux/boot.cat -m isolinux/isolinux.bin /tmp/debian-live
</pre>
<p>Plik <em>/tmp/debian-live.iso</em> kopiujemy na PenDrive-a, a do <em>menu.lst</em> dodajemy następujący wpis:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">title Debian Live<br />
find --set-root /debian-live.iso || root (fd0)<br />
map /debian-live.iso (0xff) || map --mem /debian-live.iso (0xff)<br />
map --hook<br />
chainloader (0xff)</div></div>
<h2>Partycja &#8220;na dane&#8221; oraz ukrywanie partycji numer 2</h2>
<p>Na koniec powinniśmy stworzyć partycję <em>/dev/sda1</em> zajmującą całe pozostałe miejsce oraz nadać partycjom etykiety, aby łatwiej było je rozróżnić. Na koniec warto ukryć partycję <em>/dev/sda1</em>. Wszystkiego tego dokonamy uruchamiając komputer z&#8230; naszego PenDrive-a za pomocą Parted Magic OS.</p>
<h2>Windows</h2>
<p>W podobny sposób można z PenDrive-a uruchamiać obrazy płyt CD (<a href="http://en.wikipedia.org/wiki/BartPE">BartPE</a>) z Windows XP przygotowane programem <a href="http://www.nu2.nu/pebuilder/">PE Builder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/07/szwajcarski-nozwpendrive-oficerski/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Optimizing GNOME for Netbooks</title>
		<link>http://blog.burghardt.pl/2009/05/optimizing-gnome-for-netbooks/</link>
		<comments>http://blog.burghardt.pl/2009/05/optimizing-gnome-for-netbooks/#comments</comments>
		<pubDate>Mon, 04 May 2009 20:17:49 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Netbook]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=306</guid>
		<description><![CDATA[<p>GNOME can be easily optimized for Netbooks using configuration editor. Disabling animations, thumbnails and splash screen speeds up GNOME while scaling down icons saves space on desktop.</p>
<p>Metacity will give the user less feedback by using wireframes, avoiding animations, or other means if /apps/metacity/general/reduced_resources is set to true. This can be set with gconf-editor or from shell [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnome.org/">GNOME</a> can be easily optimized for Netbooks using <a href="http://en.wikipedia.org/wiki/gconf-editor">configuration editor</a>. Disabling animations, thumbnails and splash screen speeds up GNOME while scaling down icons saves space on desktop.</p>
<p><a href="http://en.wikipedia.org/wiki/Metacity">Metacity</a> will give the user less feedback by using wireframes, avoiding animations, or other means if <em>/apps/metacity/general/reduced_resources</em> is set to <em>true</em>. This can be set with <em>gconf-editor</em> or from shell with <em>gconftool</em>:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>metacity<span style="color: #000000; font-weight: bold;">/</span>general<span style="color: #000000; font-weight: bold;">/</span>reduced_resources <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">true</span></div></div>
<p><span id="more-306"></span></p>
<p>When Metacity run on reduced resources it&#8217;s time to disable animations in panels and desktop:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>panel<span style="color: #000000; font-weight: bold;">/</span>global<span style="color: #000000; font-weight: bold;">/</span>enable_animations <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>panel<span style="color: #000000; font-weight: bold;">/</span>toplevels<span style="color: #000000; font-weight: bold;">/</span>bottom_panel_screen0<span style="color: #000000; font-weight: bold;">/</span>enable_animations <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>panel<span style="color: #000000; font-weight: bold;">/</span>toplevels<span style="color: #000000; font-weight: bold;">/</span>panel_0<span style="color: #000000; font-weight: bold;">/</span>enable_animations <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>interface<span style="color: #000000; font-weight: bold;">/</span>enable_animations <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span></div></div>
<p>Disabling splash screen:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>gnome-session<span style="color: #000000; font-weight: bold;">/</span>options<span style="color: #000000; font-weight: bold;">/</span>show_splash_screen <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span></div></div>
<p>Disabling logout effect and shading and shading the background colors:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>background<span style="color: #000000; font-weight: bold;">/</span>color_shading_type <span style="color: #660033;">-t</span> str <span style="color: #ff0000;">&quot;solid&quot;</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>gnome-session<span style="color: #000000; font-weight: bold;">/</span>options<span style="color: #000000; font-weight: bold;">/</span>logout_effect <span style="color: #660033;">-t</span> str <span style="color: #ff0000;">&quot;black&quot;</span></div></div>
<p>Finally Nautilus shouldn&#8217;t generate any images or documents thumbnails:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>nautilus<span style="color: #000000; font-weight: bold;">/</span>preferences<span style="color: #000000; font-weight: bold;">/</span>show_icon_text <span style="color: #660033;">-t</span> str <span style="color: #ff0000;">&quot;never&quot;</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>nautilus<span style="color: #000000; font-weight: bold;">/</span>preferences<span style="color: #000000; font-weight: bold;">/</span>show_image_thumbnails <span style="color: #660033;">-t</span> str <span style="color: #ff0000;">&quot;never&quot;</span></div></div>
<p>Disable sounds on user events and playing sound from files under mouse:</p>
<div class="codecolorer-container bash default" 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">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>nautilus<span style="color: #000000; font-weight: bold;">/</span>preferences<span style="color: #000000; font-weight: bold;">/</span>preview_sound <span style="color: #660033;">-t</span> str <span style="color: #ff0000;">&quot;never&quot;</span><br />
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> &nbsp;<span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>sound<span style="color: #000000; font-weight: bold;">/</span>event_sounds <span style="color: #660033;">-t</span> bool <span style="color: #c20cb9; font-weight: bold;">false</span></div></div>
<p>When everything is disabled time to scale down icons in GNOME menu. This can be done in configuration file named <strong>~/.gtkrc-2.0</strong>. To scale down icons create file with this content:</p>
<div class="codecolorer-container bash default" 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">gtk-menu-images = <span style="color: #000000;">1</span><br />
gtk-button-images = <span style="color: #000000;">1</span><br />
gtk-icon-sizes = <span style="color: #ff0000;">&quot;panel-menu=16,16:panel=16,16:gtk-button=16,16:gtk-large-toolbar=16,16&quot;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/05/optimizing-gnome-for-netbooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD with X.Org on QEMU</title>
		<link>http://blog.burghardt.pl/2009/03/freebsd-with-xorg-on-qemu/</link>
		<comments>http://blog.burghardt.pl/2009/03/freebsd-with-xorg-on-qemu/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 19:03:03 +0000</pubDate>
		<dc:creator>Krzysztof Burghardt</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[DBus]]></category>
		<category><![CDATA[HAL]]></category>
		<category><![CDATA[QEMU]]></category>
		<category><![CDATA[X.Org]]></category>

		<guid isPermaLink="false">http://www.burghardt.pl/?p=296</guid>
		<description><![CDATA[<p>X.Org form ports works fine with cirrus driver, but starts in 800&#215;600 only. Small tweak to configuration file is needed to run X in higher resolutions.</p>
<p></p>
Install X.Org and drivers
<p>First install xorg, xf86-video-cirrus and xf86-input-keyboard ports.</p>
DBus and HAL
<p>Installing DBus and HAL allow X Server to guess hardware configuration and work without any configuration file.</p>
<p>If your console get [...]]]></description>
			<content:encoded><![CDATA[<p>X.Org form ports works fine with <strong>cirrus</strong> driver, but starts in 800&#215;600 only. Small tweak to configuration file is needed to run X in higher resolutions.</p>
<p><span id="more-296"></span></p>
<h2>Install X.Org and drivers</h2>
<p>First install <strong>xorg</strong>, <strong>xf86-video-cirrus</strong> and <strong>xf86-input-keyboard</strong> ports.</p>
<h2>DBus and HAL</h2>
<p>Installing DBus and HAL allow X Server to guess hardware configuration and <a href="http://www.kirya.net/weblog/2009/02/07/my-new-xorgconf/">work without any configuration file</a>.</p>
<p>If your console get flooded by messages like this after enabling HAL:</p>
<pre>
acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x20 ascq=0x00
</pre>
<p>disable CD-ROM polling in HAL with command:</p>
<pre>
# hal-disable-polling --device /dev/acd0
</pre>
<p>Automatically configured X-Window starts in resolution as small as 800&#215;600.</p>
<h2>Configuring X</h2>
<p>Create <em>xorg.conf.new</em> skeleton with:</p>
<pre>
# X -configure
</pre>
<h3>Tweak <em>xorg.conf.new</em></h2>
<p>Add those settings to get more then 800&#215;600:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Section &quot;Monitor&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp;HorizSync &nbsp; &nbsp; &nbsp; 31.5 - 48.5<br />
&nbsp; &nbsp; &nbsp; &nbsp;VertRefresh &nbsp; &nbsp; 50.0 - 90.0<br />
&nbsp; &nbsp; &nbsp; &nbsp;Option &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;DPMS&quot;<br />
EndSection<br />
<br />
Section &quot;Device&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp;Driver &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;cirrus&quot;<br />
EndSection</div></div>
<p>If you want to set specific resolution (1024&#215;768 in this example) use:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Section &quot;Screen&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp;DefaultDepth 16<br />
&nbsp; &nbsp; &nbsp; &nbsp;SubSection &quot;Display&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Depth &nbsp; &nbsp; 16<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Modes &nbsp; &nbsp; &quot;1024x768&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp;EndSubSection<br />
EndSection</div></div>
<h3>Testing X.Org setup</h3>
<p>To test your setup run:</p>
<pre>
# X -config xorg.conf.new
</pre>
<p>Finally move <em>xorg.conf.new</em> to <em>xorg.conf</em>:</p>
<pre>
# mv xorg.conf.new /etc/X11/xorg.conf
</pre>
<p>Now X.Org is configured. Login as plain user and run <strong>startx</strong> to start X-Window session.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burghardt.pl/2009/03/freebsd-with-xorg-on-qemu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
