<?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>delx &#187; linux</title>
	<atom:link href="http://delx.net.au/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://delx.net.au/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 01 Jul 2010 11:59:00 +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>Encrypted file systems on Debian/Ubuntu Linux</title>
		<link>http://delx.net.au/blog/2009/08/encrypted-file-systems-on-debianubuntu-linux/</link>
		<comments>http://delx.net.au/blog/2009/08/encrypted-file-systems-on-debianubuntu-linux/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 15:06:57 +0000</pubDate>
		<dc:creator>delx</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://delx.net.au/blog/?p=179</guid>
		<description><![CDATA[Recently I set up an encrypted file system so I could do rsync backups to a secured location. What you end up with is a mountable file system that you can use to securely store data. Debian offers an easy way to set up encrypted file systems using the LUKS standard with the cryptsetup package. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I set up an encrypted file system so I could do rsync backups to a secured location. What you end up with is a mountable file system that you can use to securely store data. Debian offers an easy way to set up encrypted file systems using the LUKS standard with the cryptsetup package. You&#8217;ll need to enter a decryption passphrase to mount the volume whenever the system boots.</p>
<p><span id="more-179"></span></p>
<h4>Package installation</h4>
<p>Install the required packages:</p>
<pre># aptitude install e2fsprogs cryptsetup</pre>
<h4>Partitioning</h4>
<p>Use your favourite partitioning tool, for example <tt>fdisk</tt> or <tt>cfdisk</tt> to set aside a whole partition with enough space to store your data.</p>
<h4>Erase</h4>
<p>This step is optional. For complete security you want the contents of the disk to be random before you start using it. Use the <tt>badblocks</tt> tool to do this.</p>
<pre>
# badblocks -c 10240 -s -w -t random -v /dev/sdX9
</pre>
<h4>Format</h4>
<p>The <tt>luksformat</tt> tool will format a partition to be used with LUKS (Linux Unified Key Setup) and then create a filesystem on it.</p>
<pre># luksformat -t ext3 /dev/sdX9</pre>
<h4>crypttab and fstab</h4>
<p>Now all that remains is to a line in each of these config files.</p>
<p>Add this line to <tt>/etc/crypttab</tt>:</p>
<pre>myname /dev/sdX9 none luks</pre>
<p>The <tt>crypttab</tt> file is examined by the system during boot. Each line maps a real encrypted device file (<tt>/dev/sdX9</tt>) to a virtual decrypted device file (<tt>/dev/mapper/myname</tt>). Once you&#8217;ve added done this run the following command to actually set up the mapping:</p>
<pre># /etc/init.d/cryptdisks restart</pre>
<p>Now you can set up that virtual device file to be mounted like any other. For example, the following command would mount your filesystem:</p>
<pre># mount /dev/mapper/myname /mnt</pre>
<p>Note that you should probably use partition UUIDs (<tt>UUID=XXXXX</tt>) in place of device file names (<tt>/dev/sdX9</tt>) in your <tt>crypttab</tt> for a more robust system. The easiest way to find these is by running:</p>
<pre># ls -l /dev/disks/by-uuid</pre>
<p>Add a line like this to <tt>/etc/fstab</tt></p>
<pre>/dev/mapper/myname /path/to/mountpoint ext3 defaults 0 2</pre>
]]></content:encoded>
			<wfw:commentRss>http://delx.net.au/blog/2009/08/encrypted-file-systems-on-debianubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Keyboard on Linux</title>
		<link>http://delx.net.au/blog/2009/04/apple-keyboard-on-linux/</link>
		<comments>http://delx.net.au/blog/2009/04/apple-keyboard-on-linux/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 06:20:11 +0000</pubDate>
		<dc:creator>delx</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://delx.net.au/blog/?p=159</guid>
		<description><![CDATA[The Apple aluminium keyboards are very nice. I recently bought one for an Ubuntu Linux machine, and it requires some special configuration to work as expected. This post describes how to fix the function keys and swap command (windows or &#8216;super&#8217;) keys with the alt (or option) keys. This command will fix the function keys, [...]]]></description>
			<content:encoded><![CDATA[<p>The Apple aluminium keyboards are very nice. I recently bought one for an Ubuntu Linux machine, and it requires some special configuration to work as expected.</p>
<p>This post describes how to fix the function keys and swap command (windows or &#8216;super&#8217;) keys with the alt (or option) keys.</p>
<p><span id="more-159"></span></p>
<p><img src="http://delx.net.au/blog/wp-content/wp-uploads/2009/04/apple_aluminium_keyboardcompare.jpg" alt="Apple Aluminium Keyboard" width="400" height="292" class="size-full wp-image-160" /></p>
<p>This command will fix the function keys, it saves you pressing fn-F1 whenever you want F1. The first command is for older kernels, the second is for version 2.6.28 or later.</p>
<pre>
# echo 2 > /sys/module/hid/parameters/pb_fnmode
# echo 2 > /sys/module/hid_apple/parameters/fnmode
</pre>
<p>Then add that line to your <tt>/etc/rc.local</tt> file, somewhere before the <tt>exit 0</tt> at the end, so that it gets run on startup.</p>
<p>Next to swap the Command/Alt keys using xmodmap. I&#8217;m aware you can do this from the Gnome Keyboard Settings panel, but I&#8217;ve found this method works better. Particularly when combined with <a href="http://synergy2.sf.net">synergy</a>.</p>
<p>Create a file called <tt>~/.xmodmaprc</tt> with this inside:</p>
<pre>
clear mod1
keycode 115 = Alt_L
keycode 116 = Alt_R
keycode 64 = Super_L
keycode 113 = Super_R
add mod1 = Alt_L Alt_R
</pre>
<p>On another computer I&#8217;ve found this worked:</p>
<pre>
clear mod1
keycode 133 = Alt_L
keycode 134 = Alt_R
keycode 64 = Super_L
keycode 108 = Super_R
add mod1 = Alt_L Alt_R
</pre>
<p>Now run to activate the new keys, run:</p>
<pre>$ xmodmap ~/.xmodmaprc</pre>
<p>Don&#8217;t forget to add it to your list of startup programs. If you&#8217;re using Gnome, look at System->Preferences->Startup Applications<br />
Otherwise you can just add it to <tt>~/.xsession</tt></p>
<p>To find the keycodes above I used the <tt>xev</tt> program. Try running it from a console. It shows you all X11 events that the xev window receives, including key presses/releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://delx.net.au/blog/2009/04/apple-keyboard-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
