<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8315362200231419927</id><updated>2011-11-02T03:13:40.385+08:00</updated><category term='linux'/><category term='projects'/><category term='typography'/><category term='musings'/><category term='osmium'/><category term='software'/><category term='hardware'/><category term='science'/><title type='text'>defenestrations &amp; lapidations</title><subtitle type='html'>seeking meaningful prose</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-4518617605287016551</id><published>2011-08-22T19:56:00.001+08:00</published><updated>2011-08-22T19:57:21.149+08:00</updated><title type='text'>SFTP with Unicode support in proftpd</title><content type='html'>Debian sid’s proftpd (1.3.4) still seems to have iffy Unicode support, so one way to get UTF8 working reliably in proftpd is to use an SFTP connection. The first thing to do is ensure a UTF8 locale is in use:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;$ locale&lt;br /&gt;LANG=en_GB.utf8&lt;/blockquote&gt;If you do not see “.utf8” appended to the LANG shell variable, execute the following:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# export LC_ALL=en_GB.utf8&lt;br /&gt;# export LANG=en_GB.utf8&lt;/blockquote&gt;To ensure this is applied at every boot, add it to &lt;span style="font-family: monospace;"&gt;/etc/profile&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The rest is easy. Users with an ssh account and a defined shell in /etc/passwd already have SFTP access once proftpd is started. But what about non-shell accounts (i.e. FTP-only users)? &lt;span style="font-family: monospace;"&gt;/bin/false&lt;/span&gt; certainly won’t give SFTP access, so we use &lt;a href="http://sublimation.org/scponly/"&gt;scponly&lt;/a&gt; instead. From the man page:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;scponly is an alternative "shell" (of sorts) for system administrators who would like to provide access to remote users to both read and write local files without providing any remote execution privileges. Functionally, it is best described as a wrapper to the trusted suite of ssh applications.&lt;/blockquote&gt;To change a user’s shell to scponly:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# usermod -s /usr/bin/scponly username&lt;/blockquote&gt;It’s that easy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-4518617605287016551?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/4518617605287016551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=4518617605287016551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4518617605287016551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4518617605287016551'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2011/08/sftp-with-unicode-support-in-proftpd.html' title='SFTP with Unicode support in proftpd'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-5452391833227645462</id><published>2011-04-13T01:21:00.001+08:00</published><updated>2011-04-13T01:22:18.297+08:00</updated><title type='text'>Smbclient to NFS</title><content type='html'>So I finally switched from &lt;b&gt;smbclient&lt;/b&gt; to &lt;b&gt;NFS&lt;/b&gt;. For the longest time smbclient had been giving me Gigabit-like writes (~70MB/s), but Fast-Ethernet-like reads (7MB/s), and I could never figure out why.&lt;br /&gt;&lt;br /&gt;Today, with some &lt;b&gt;Wireshark&lt;/b&gt;ing, I finally narrowed down the issue: READ ANDX packet sizes being limited to 4096 bytes for any samba transfer between my home server and desktop (both running on Arch, kernel 2.6.38, &lt;b&gt;smbclient&lt;/b&gt; 3.5.8-2). No amount of tweaking for any option, including but not limited to SO_*BUF, succeeded in changing the negotiated packet size to anything higher than 4096.&lt;br /&gt;&lt;br /&gt;The last time I used NFS, it gave really bursty transfer performance, which left me rather displeased. The reason for that is now determined to be a sub-optimal mdadm/disk configuration (see previous post). With raid performance closer to what it should be, I am getting more consistent NFS transfer performance: 70MB/s reads, 100MB/s writes. A bug in the r8169 realtek driver module (firmware rtl_nic/rtl8168d-1, rtl_nic/rtl8168d-2) left me with a system that crashed on any network file transfer, so I used the r8168 driver instead.&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# mv /lib/modules/2.6.38-ARCH/kernel/drivers/net/r8169.ko.gz /lib/modules/2.6.38-ARCH/kernel/drivers/net/r8169.ko.gz.bk&lt;br /&gt;# yaourt -S r8168&lt;br /&gt;# modprobe -r r8169; modprobe r8168&lt;br /&gt;# depmod -a&lt;br /&gt;# mkinitcpio -p kernel26&lt;/blockquote&gt;Check that eth0 is using the correct driver:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# ethtool -i eth0&lt;/blockquote&gt;Then add &lt;span style="font-family: monospace;"&gt;r8168&lt;/span&gt; to the MODULES() list in &lt;i&gt;/etc/rc.conf&lt;/i&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-5452391833227645462?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/5452391833227645462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=5452391833227645462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5452391833227645462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5452391833227645462'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2011/04/smbclient-to-nfs.html' title='Smbclient to NFS'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-5860798636475876498</id><published>2011-04-12T13:45:00.003+08:00</published><updated>2011-09-02T16:58:28.976+08:00</updated><title type='text'>Linux disk performance tweaking parameters</title><content type='html'>A quick reference and note to self. Will be fleshed out in greater detail in future.&lt;br /&gt;&lt;br /&gt;NCQ queue depth: /sys/block/sd*/device/queue_depth&lt;br /&gt;readahead blocks: /sbin/blockdev --getra /dev/md* (or /dev/sd*)&lt;br /&gt;stripe cache size: /sys/block/md*/md/stripe_cache_size&lt;br /&gt;&lt;br /&gt;[edit] A fuller version has been posted on &lt;a href="http://ubuntuforums.org/showpost.php?p=11105148&amp;amp;postcount=7"&gt;Ubuntu forums&lt;/a&gt;. The tuneraid script I use is as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;###############################################################################&lt;br /&gt;#  simple script to set some parameters to increase performance on a mdadm&lt;br /&gt;# raid5 or raid6. Ajust the ## parameters ##-section to your system!&lt;br /&gt;#&lt;br /&gt;#  WARNING: depending on stripesize and the number of devices the array might&lt;br /&gt;# use QUITE a lot of memory after optimization!&lt;br /&gt;#&lt;br /&gt;#  27may2010 by Alexander Peganz&lt;br /&gt;#  31jul211 modified by Mathias B&lt;br /&gt;###############################################################################&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## parameters ##&lt;br /&gt;MDDEV=md127			# e.g. md51 for /dev/md51&lt;br /&gt;CHUNKSIZE=512		# in KB&lt;br /&gt;BLOCKSIZE=4			# of file system in KB&lt;br /&gt;NCQ=enable			# disable, enable. ath. else keeps current setting&lt;br /&gt;NCQDEPTH=31			# 31 should work for almost anyone&lt;br /&gt;FORCECHUNKSIZE=true	# force max sectors kb to chunk size &amp;gt; 512&lt;br /&gt;DOTUNEFS=true		# run tune2fs, ONLY SET TO true IF YOU USE EXT[34]&lt;br /&gt;RAIDLEVEL=raid5		# raid5, raid6&lt;br /&gt;logfile="/home/kureshii/tuneraid.log"&lt;br /&gt;&lt;br /&gt;## code ##&lt;br /&gt;# test for priviledges&lt;br /&gt;if [ "$(whoami)" != 'root' ]; then&lt;br /&gt;	echo $(date): Need to be root &amp;gt;&amp;gt; "$logfile"&lt;br /&gt;	exit 1&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;# set number of parity devices&lt;br /&gt;NUMPARITY=1&lt;br /&gt;[[ $RAIDLEVEL == "raid6" ]] &amp;amp;&amp;amp; NUMPARITY=2&lt;br /&gt;echo "Using $NUMPARITY parity devices ($RAIDLEVEL)"&lt;br /&gt;# get all devices&lt;br /&gt;DEVSTR="`grep \"^$MDDEV : \" /proc/mdstat` eol"&lt;br /&gt;while \&lt;br /&gt; [ -z "`expr match \"$DEVSTR\" '\(\&lt;sd[a-z]1\[[12]\?[0-9]\]\((s)\)\? !="eol" "$devstr"="" "`expr="" #="" $(date):="" $[1+$numparity]="" ${#devs}="" '\(\&lt;sd[a-z]1\[[12]\?[0-9]\]\((s)\)\)'`"="" '\(\&lt;sd[a-z]1\[[12]\?[0-9]\]\)'`"="" -lt="" -n="" [="" \"$curdev\"="" \)'`"="" ];="" ]="" active="" and="" curdev="`echo $DEVSTR|cut -f -1 -d \ `" devices="" devs="" devstr="`echo $DEVSTR|cut -f 2- -d \ `" do="" done="" echo="" elif="" fi="" get="" if="" list="" makes="" match="" more="" need="" number="" numdevs="${#DEVS}" numsparedevs="${#SPAREDEVS}" of="" sense="" sparedevs="" spares="" test="" then="" while=""&gt;&amp;gt; "$logfile"&lt;br /&gt;	exit 1&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;echo "Found $NUMDEVS devices with $NUMSPAREDEVS spares"&lt;br /&gt;&lt;br /&gt;# set read ahead&lt;br /&gt;RASIZE=$[$NUMDEVS*($NUMDEVS-$NUMPARITY)*2*$CHUNKSIZE]   # in 512b blocks&lt;br /&gt;echo read ahead size per device: $RASIZE blocks \($[$RASIZE/2]kb\)&lt;br /&gt;MDRASIZE=$[$RASIZE*$NUMDEVS]&lt;br /&gt;echo read ahead size of array: $MDRASIZE blocks \($[$MDRASIZE/2]kb\)&lt;br /&gt;blockdev --setra $RASIZE /dev/sd[$DEVS]&lt;br /&gt;#blockdev --setra $RASIZE /dev/sd[$SPAREDEVS]&lt;br /&gt;blockdev --setra $MDRASIZE /dev/$MDDEV&lt;br /&gt;&lt;br /&gt;# set stripe cache size&lt;br /&gt;STRCACHESIZE=$[$RASIZE/8]                               # in pages per device&lt;br /&gt;echo stripe cache size of devices: $STRCACHESIZE pages \($[$STRCACHESIZE*4]kb\)&lt;br /&gt;echo $STRCACHESIZE &amp;gt; /sys/block/$MDDEV/md/stripe_cache_size&lt;br /&gt;&lt;br /&gt;# set max sectors kb&lt;br /&gt;DEVINDEX=0&lt;br /&gt;MINMAXHWSECKB=$(cat /sys/block/sd${DEVS:0:1}/queue/max_hw_sectors_kb)&lt;br /&gt;until [ $DEVINDEX -ge $NUMDEVS ]; do&lt;br /&gt;	DEVLETTER=${DEVS:$DEVINDEX:1}&lt;br /&gt;	MAXHWSECKB=$(cat /sys/block/sd$DEVLETTER/queue/max_hw_sectors_kb)&lt;br /&gt;	if [ $MAXHWSECKB -lt $MINMAXHWSECKB ]; then&lt;br /&gt;		MINMAXHWSECKB=$MAXHWSECKB&lt;br /&gt;	fi&lt;br /&gt;	DEVINDEX=$[$DEVINDEX+1]&lt;br /&gt;done&lt;br /&gt;if [ $CHUNKSIZE -le $MINMAXHWSECKB ] &amp;amp;&amp;amp; ( [ $CHUNKSIZE -le 512 ] || [[ $FORCECHUNKSIZE == "true" ]] ); then&lt;br /&gt;	echo Setting max sectors KB to match chunk size&lt;br /&gt;	DEVINDEX=0&lt;br /&gt;	until [ $DEVINDEX -ge $NUMDEVS ]; do&lt;br /&gt;		DEVLETTER=${DEVS:$DEVINDEX:1}&lt;br /&gt;		echo "Set max sectors KB to $CHUNKSIZE on $DEVLETTER"&lt;br /&gt;		echo $CHUNKSIZE &amp;gt; /sys/block/sd$DEVLETTER/queue/max_sectors_kb&lt;br /&gt;		DEVINDEX=$[$DEVINDEX+1]&lt;br /&gt;	done&lt;br /&gt;	DEVINDEX=0&lt;br /&gt;	until [ $DEVINDEX -ge $NUMSPAREDEVS ]; do&lt;br /&gt;		DEVLETTER=${SPAREDEVS:$DEVINDEX:1}&lt;br /&gt;		echo "Set max sectors KB to $CHUNKSIZE on $DEVLETTER"&lt;br /&gt;		echo $CHUNKSIZE &amp;gt; /sys/block/sd$DEVLETTER/queue/max_sectors_kb&lt;br /&gt;		DEVINDEX=$[$DEVINDEX+1]&lt;br /&gt;	done&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;# enable/disable NCQ&lt;br /&gt;DEVINDEX=0&lt;br /&gt;if [[ $NCQ == "enable" ]] || [[ $NCQ == "disable" ]]; then&lt;br /&gt;	if [[ $NCQ == "disable" ]]; then&lt;br /&gt;		NCQDEPTH=1&lt;br /&gt;	fi&lt;br /&gt;	until [ $DEVINDEX -ge $NUMDEVS ]; do&lt;br /&gt;		DEVLETTER=${DEVS:$DEVINDEX:1}&lt;br /&gt;		echo Setting NCQ queue depth to $NCQDEPTH on $DEVLETTER&lt;br /&gt;		echo $NCQDEPTH &amp;gt; /sys/block/sd$DEVLETTER/device/queue_depth&lt;br /&gt;		DEVINDEX=$[$DEVINDEX+1]&lt;br /&gt;	done&lt;br /&gt;	DEVINDEX=0&lt;br /&gt;	until [ $DEVINDEX -ge $NUMSPAREDEVS ]; do&lt;br /&gt;		DEVLETTER=${SPAREDEVS:$DEVINDEX:1}&lt;br /&gt;		echo Setting NCQ queue depth to $NCQDEPTH on $DEVLETTER&lt;br /&gt;		echo $NCQDEPTH &amp;gt; /sys/block/sd$DEVLETTER/device/queue_depth&lt;br /&gt;		DEVINDEX=$[$DEVINDEX+1]&lt;br /&gt;	done&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;# tune2fs&lt;br /&gt;if [[ $DOTUNEFS == "true" ]]; then&lt;br /&gt;	STRIDE=$[$CHUNKSIZE/$BLOCKSIZE]&lt;br /&gt;	STRWIDTH=$[$CHUNKSIZE/$BLOCKSIZE*($NUMDEVS-$NUMPARITY)]&lt;br /&gt;	echo setting stride to $STRIDE blocks \($CHUNKSIZE KB\)&lt;br /&gt;	echo setting stripe-width to $STRWIDTH blocks \($[$STRWIDTH*$BLOCKSIZE] KB\)&lt;br /&gt;	echo tune2fs -E stride=$STRIDE,stripe-width=$STRWIDTH /dev/$MDDEV&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;# exit&lt;br /&gt;echo $(date): Success &amp;gt;&amp;gt; "$logfile"&lt;br /&gt;exit 0&lt;br /&gt;&lt;/sd[a-z]1\[[12]\?[0-9]\]\((s)\)\?&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-5860798636475876498?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/5860798636475876498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=5860798636475876498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5860798636475876498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5860798636475876498'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2011/04/linux-disk-tweaking-parameters.html' title='Linux disk performance tweaking parameters'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-7281201703072137082</id><published>2011-03-31T22:25:00.005+08:00</published><updated>2011-08-22T22:05:42.209+08:00</updated><title type='text'>Cyborg RAT 7 in Arch Linux</title><content type='html'>Earlier, I had written &lt;a href="http://kureshii.blogspot.com/2010/02/logitech-mx-revolution-in-arch-linux.html"&gt;a guide to getting the Logitech MX Revolution working in Linux&lt;/a&gt;. Some time ago the friction-free scroll mode broke down on me, so I decided to switch to a new mouse: the RAT 7 (this happened quite some time ago; I just got lazy in writing this). I won’t argue my purchase decision — you either like it or you don’t — but if you have one and want to get it working, then read on.&lt;br /&gt;&lt;br /&gt;Details of how to use &lt;i&gt;xbindkeys&lt;/i&gt; and &lt;i&gt;xmacro&lt;/i&gt; are detailed in the above-linked guide, and I will not repeat it here.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The cursor doesn’t respond!&lt;/b&gt;&lt;br /&gt;From &lt;a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-mouse/+bug/615892/comments/13"&gt;a very informative bug report&lt;/a&gt;&amp;nbsp;on &lt;i&gt;xorg-xserver-input-mouse&lt;/i&gt;, the problem was tracked down to the mode selection button next to the left-click button. Apparently, it sends a release event for button 13, followed by a click event for button 14, each time you press it. In this manner, it cycles through buttons 13, 14 and 15 with repeated presses. X server jams during the start-up process when the mouse does this, and the only fix I know of now is to disable those 3 buttons. This can be done with xinput (detailed in the bug report, but session-specific), or in &lt;i&gt;/etc/X11/xorg.conf&lt;/i&gt;. Edit the InputDevice section to look something like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;Section "InputDevice"&lt;br /&gt;&lt;br /&gt;# generated from default&lt;br /&gt;Identifier     "Mouse0"&lt;br /&gt;Driver         "mouse"&lt;br /&gt;Option         "Protocol" "auto"&lt;br /&gt;Option         "Device" "/dev/psaux"&lt;br /&gt;Option         "Emulate3Buttons" "no"&lt;br /&gt;Option         "ZAxisMapping" "4 5"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "InputClass"&lt;br /&gt;Identifier "Mouse Remap"&lt;br /&gt;MatchProduct "Saitek Cyborg R.A.T.7 Mouse"&lt;br /&gt;MatchDevicePath "/dev/input/event*"&lt;br /&gt;Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 &lt;b&gt;0 0 0&lt;/b&gt; 16 17 18 19 20 21"&lt;br /&gt;EndSection&lt;/div&gt;&lt;br /&gt;ZAxisMapping sets the scroll directions for the scroll wheel, and is not needed to un-jam the mouse. the important line here is Option "ButtonMapping", which disables buttons 13–15 (in &lt;b&gt;bold&lt;/b&gt;). Reboot X server (or your system), and that’s all there is to it.&lt;br /&gt;&lt;br /&gt;The MatchProduct string is obtained using &lt;span style="font-family: monospace;"&gt;xinput --list&lt;/span&gt;, and should match exactly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Custom key mappings&lt;/b&gt;&lt;br /&gt;For those who want custom button mappings as well, this is the &lt;i&gt;.xbindkeysrc&lt;/i&gt; I use for the RAT 7:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;###########################&lt;br /&gt;# xbindkeys configuration # For Cyborg RAT 7 Mouse&lt;br /&gt;###########################&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#Ctrl-PgDn: Thumbwheel right&lt;br /&gt;#using xte (old version): #"xte 'keydown Control_L' 'key Page_Down' 'keyup Control_L'"&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Page_Down KeyStrRelease Page_Down KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;&amp;nbsp; &amp;nbsp; m:0x0 + b:10&lt;br /&gt;&lt;br /&gt;#Ctrl-PgUp: Thumbwheel left&lt;br /&gt;#using xte (old version): "xte 'keydown Control_L' 'key Page_Up' 'keyup Control_L'"&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Page_Up KeyStrRelease Page_Up KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;&amp;nbsp; &amp;nbsp; m:0x0 + b:11&lt;br /&gt;&lt;br /&gt;#Ctrl-F4: Red "Snipe" button&lt;br /&gt;#using xte (old version): "xte 'keydown Control_L' 'key F4' 'keyup Control_L'"&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress F4 KeyStrRelease F4 KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;&amp;nbsp; &amp;nbsp; m:0x0 + b:12&lt;br /&gt;&lt;br /&gt;#Alt-Left: Rear thumb button&lt;br /&gt;"echo 'KeyStrPress Alt_L KeyStrPress Left KeyStrRelease Left KeyStrRelease Alt_L' | xmacroplay :0"&lt;br /&gt;&amp;nbsp; &amp;nbsp; m:0x0 + b:8&lt;br /&gt;&lt;br /&gt;#Alt-Right: Front thumb button&lt;br /&gt;"echo 'KeyStrPress Alt_L KeyStrPress Right KeyStrRelease Right KeyStrRelease Alt_L' | xmacroplay :0"&lt;br /&gt;&amp;nbsp; &amp;nbsp; m:0x0 + b:9&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# End of xbindkeys configuration&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Addendum (22/08/11):&lt;/b&gt; Here’s an alternate &lt;i&gt;.xbindkeyrc&lt;/i&gt; using xdotool in place of xmacro:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;###########################&lt;br /&gt;# xbindkeys configuration # For Cyborg RAT 7 Mouse&lt;br /&gt;###########################&lt;br /&gt;#&lt;br /&gt;# Version: 0.1.3&lt;br /&gt;#&lt;br /&gt;#Ctrl-PgDn: Thumbwheel right&lt;br /&gt;"xdotool key ctrl+Next"&lt;br /&gt;    m:0x0 + b:10&lt;br /&gt;    Control+Mod2 + Next&lt;br /&gt;&lt;br /&gt;#Ctrl-PgUp: Thumbwheel left&lt;br /&gt;"xdotool key ctrl+Prior"&lt;br /&gt;    m:0x0 + b:11&lt;br /&gt;    Control+Mod2 + Prior&lt;br /&gt;&lt;br /&gt;#Ctrl-F4: Red "Snipe" button&lt;br /&gt;"xdotool key ctrl+F4"&lt;br /&gt;    m:0x0 + b:12&lt;br /&gt;    Control+Mod2 + F4&lt;br /&gt;&lt;br /&gt;#Alt-Left: Rear thumb button&lt;br /&gt;"xdotool key alt+Left"&lt;br /&gt;    m:0x0 + b:8&lt;br /&gt;    Alt+Mod2 + Left&lt;br /&gt;&lt;br /&gt;#Alt-Right: Front thumb button&lt;br /&gt;"xdotool key alt+Right"&lt;br /&gt;    m:0x0 + b:9&lt;br /&gt;    Alt+Mod2 + Right&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# End of xbindkeys configuration&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-7281201703072137082?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/7281201703072137082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=7281201703072137082' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7281201703072137082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7281201703072137082'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2011/03/cyborg-rat-7-in-arch-linux.html' title='Cyborg RAT 7 in Arch Linux'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-8384289724542801199</id><published>2011-03-31T15:00:00.011+08:00</published><updated>2011-04-01T03:54:19.175+08:00</updated><title type='text'>Bootable Arch flash drive with separate data partition</title><content type='html'>This deceptively simple thing is much more trouble than it seems. Its difficulty can be distilled down to two main reasons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Removable device woes&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Windows only being able to read from the first partition on a device that is identified as a removable drive.&lt;br /&gt;More on the removable media bit from &lt;a href="http://msdn.microsoft.com/en-us/windows/hardware/gg487419.aspx#EWD"&gt;WHDC – FAQ for Driver and Hardware Developer&lt;/a&gt;:&lt;br /&gt;&lt;blockquote style="border: dotted; padding: 4px;"&gt;The removable media device setting is a flag contained within the SCSI Inquiry Data response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a removable media device. An RMB of one indicates that the device is a removable media device. Drivers obtain this information by using the &lt;b&gt;StorageDeviceProperty&lt;/b&gt; request.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BIOS troubles&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;“Error 18: Selected cylinder exceeds maximum supported by BIOS” when attempting to boot from the second partition with GRUB bootloader.&lt;/li&gt;&lt;/ul&gt;This second reason is curious indeed, since my 4GB flash drive (on which this was attempted) has a cylinder count within the 1024-cylinder limit commonly prescribed:&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# fdisk -l /dev/sdc&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc: 4004 MB, 4004511744 bytes&lt;br /&gt;124 heads, 62 sectors/track, 1017 cylinders, total 7821312 sectors&lt;br /&gt;Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;Disk identifier: 0x000bc9f3&lt;br /&gt;&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sdc1            2048     3911679     1954816    b  W95 FAT32&lt;br /&gt;/dev/sdc2   *     3911680     7821311     1954816   83  Linux&lt;/blockquote&gt;Can anyone shed some light on this?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In any case, moving on, we find that we need a bootloader that can circumvent this. Here, &lt;b&gt;GRUB&lt;/b&gt; exits stage left, and &lt;a href="http://syslinux.zytor.com/wiki/index.php/EXTLINUX"&gt;&lt;b&gt;extlinux&lt;/b&gt;&lt;/a&gt; enters stage right. With much reference to &lt;a href="http://archlinux.me/brain0/"&gt;brain0&lt;/a&gt;’s comprehensive &lt;a href="http://archlinux.me/brain0/2010/05/29/arch-linux-usb-install-and-resuce-media/"&gt;Arch Linux USB Install and Rescue Media&lt;/a&gt;&amp;nbsp;article, I managed to get Arch install media put into the second partition (&lt;i&gt;/dev/sdc2&lt;/i&gt;). I quote the relevant section for my future reference here:&lt;br /&gt;&lt;blockquote style="border: thin dotted; padding: 5px;"&gt;The bootable flag needs to be set on sdb2, the boot partition. Now create filesystems on the partitions:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# mkfs.vfat -n SOMELABEL /dev/sdb1&lt;br /&gt;# mkfs.ext2 /dev/sdb2&lt;br /&gt;# tune2fs -i0 -c0 -m0 /dev/sdb2&lt;br /&gt;# e2label /dev/sdb2 ARCH_201005&lt;/div&gt;Notice the label of the Linux partition: While it is arbitrary, it must&amp;nbsp;&lt;b&gt;match the label in the bootloader configuration&lt;/b&gt;, which is ARCH_201005 by default. We are finished with the FAT part now: The way we set it up, even Windows will be able to recognize and use it properly. Now, mount the archiso image and the Linux partition:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# mkdir -p /mnt/{archiso,usbboot}&lt;br /&gt;# mount -o loop,ro archlinux-2010.05-netinstall-dual.iso /mnt/archiso&lt;br /&gt;# mount /dev/sdb2 /mnt/usbboot&lt;/div&gt;Copy all the contents of the archiso image onto the USB and umount the ISO:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# cp -a /mnt/archiso/* /mnt/usbboot/&lt;br /&gt;# umount /mnt/archiso&lt;/div&gt;All that is left to do is set up a bootloader. We will use extlinux, as we will be able to reuse all existing configuration from isolinux. First, install the syslinux package, if you don’t have it already:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# pacman -S syslinux&lt;/div&gt;Now, remove the old isolinux bootloader, rename the configuration file, install the extlinux bootloader and umount:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# rm /mnt/usbboot/boot/isolinux/isolinux.bin&lt;br /&gt;# mv /mnt/usbboot/boot/isolinux/isolinux.cfg /mnt/usbboot/boot/isolinux/extlinux.conf&lt;br /&gt;# extlinux --install /mnt/usbboot/boot/isolinux/&lt;br /&gt;# umount /mnt/usbboot&lt;/div&gt;For simplicity, I didn’t rename the &lt;i&gt;isolinux&lt;/i&gt; folder here, although the bootloader is technically not isolinux anymore. Feel free to rename it to &lt;i&gt;extlinux&lt;/i&gt; if you feel the urge. One last step is setting up a MBR that will recognize the active flag of the second partition and boot its boot sector:&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# cat /usr/lib/syslinux/mbr.bin &amp;gt; /dev/sdb&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;We can do much more than this though. The install media (&lt;i&gt;archiso.img&lt;/i&gt;) boots without a root partition on the host, but we can also install a fully functional Arch system alongside the install media, and choose between the two at boot via &lt;b&gt;extlinux&lt;/b&gt;. I couldn’t get the booted install media to install to its own partition, so you will need to &lt;a href="https://wiki.archlinux.org/index.php/Fast_Arch_Install_from_existing_Linux_System"&gt;install from another partition&lt;/a&gt;&amp;nbsp;(or try&amp;nbsp;&lt;a href="https://wiki.archlinux.org/index.php/Install_from_Existing_Linux"&gt;alternative method without rebooting&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Important points to remember during this install:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Do not reformat the partition into which you are installing Arch or you will wipe the existing install media.&lt;/li&gt;&lt;li&gt;Do not set up the GRUB bootloader, since we went to all that effort to use extlinux.&lt;/li&gt;&lt;/ol&gt;We’re not done yet. The Arch install iso image was compiled with USB boot support, but the new kernel (which we just installed) was not. We will &lt;span style="font-family: monospace;"&gt;&lt;a href="https://wiki.archlinux.org/index.php/Change_Root#Changing_Root"&gt;chroot&lt;/a&gt;&lt;/span&gt; into the new setup (mounted on &lt;i&gt;/bootmnt&lt;/i&gt; or &lt;i&gt;/mnt&lt;/i&gt;; check!) from the install media setup, and recompile the initramfs with support for USB boot.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# mount -t proc proc /bootmnt/proc&lt;br /&gt;# mount -t sysfs sys /bootmnt/sys&lt;br /&gt;# mount -o bind /dev /bootmnt/dev&lt;br /&gt;# chroot /bootmnt&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# nano /etc/mkinitcpio.conf&lt;/div&gt;&lt;br /&gt;Edit &lt;i&gt;/etc/mkinitcpio.conf&lt;/i&gt; to include &lt;a href="https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_a_USB_key#USB_Support"&gt;USB boot support&lt;/a&gt;. Ensure that ‘usb’ is placed before ‘autodetect’ in the hooks list. The HOOKS line should look like:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;HOOKS="base udev usb autodetect pata scsi sata filesystems"&lt;/div&gt;&lt;br /&gt;Now we remake the initramfs image:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# mkinitcpio -p kernel26&lt;br /&gt;==&amp;gt; Building image "default"&lt;br /&gt;==&amp;gt; Running command: /sbin/mkinitcpio -k 2.6.37-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img&lt;br /&gt;:: Begin build&lt;br /&gt;:: Parsing hook [base]&lt;br /&gt;:: Parsing hook [udev]&lt;br /&gt;:: Parsing hook [usb]&lt;br /&gt;:: Parsing hook [autodetect]&lt;br /&gt;:: Parsing hook [pata]&lt;br /&gt;:: Parsing hook [scsi]&lt;br /&gt;:: Parsing hook [sata]&lt;br /&gt;:: Parsing hook [filesystems]&lt;br /&gt;:: Generating module dependencies&lt;br /&gt;:: Generating image '/boot/kernel26.img'...SUCCESS&lt;br /&gt;==&amp;gt; SUCCESS&lt;br /&gt;==&amp;gt; Building image "fallback"&lt;br /&gt;==&amp;gt; Running command: /sbin/mkinitcpio -k 2.6.37-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect&lt;br /&gt;:: Begin build&lt;br /&gt;:: Parsing hook [base]&lt;br /&gt;:: Parsing hook [udev]&lt;br /&gt;:: Parsing hook [usb]&lt;br /&gt;:: Parsing hook [pata]&lt;br /&gt;:: Parsing hook [scsi]&lt;br /&gt;:: Parsing hook [sata]&lt;br /&gt;:: Parsing hook [filesystems]&lt;br /&gt;:: Generating module dependencies&lt;br /&gt;:: Generating image '/boot/kernel26-fallback.img'...SUCCESS&lt;br /&gt;==&amp;gt; SUCCESS&lt;/div&gt;&lt;br /&gt;Still not done yet. Let’s make some &lt;i&gt;fstab&lt;/i&gt; changes.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;#nano /etc/fstab&lt;/div&gt;&lt;br /&gt;On a flash drive install, we want to &lt;a href="https://wiki.archlinux.org/index.php/SSD#Tips_for_Minimizing_SSD_Read.2FWrites"&gt;minimise writes&lt;/a&gt; to the system. Hence, we add the &lt;span style="font-family: monospace;"&gt;noatime&lt;/span&gt; mount option to the root mount, and also put &lt;i&gt;/tmp&lt;/i&gt; on tmpfs. It would also be nice to make the data partition (the first partition, the FAT32 one) accessible in our Arch boot, so let’s do it.&lt;br /&gt;&lt;blockquote style="border: thin dotted; padding: 5px;"&gt;&lt;pre&gt;# cat /etc/fstab&lt;br /&gt;#&lt;br /&gt;# /etc/fstab: static file system information&lt;br /&gt;#&lt;br /&gt;#file system      dir         type    options        dump pass&lt;br /&gt;devpts            /dev/pts    devpts  defaults       0    0&lt;br /&gt;shm               /dev/shm    tmpfs   nodev,nosuid   0    0&lt;br /&gt;tmpfs             /tmp        tmpfs   defaults       0    0&lt;br /&gt;UUID=964f5668-ddfe-4b6e-b3c8-aa1f1a854310 / ext2 defaults,noatime  0      1&lt;br /&gt;LABEL=CRUSTOR     /crustor    vfat    user,defaults  0    0&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;Here, I mounted the data partition by label, but you can do it by UUID too.&lt;br /&gt;Once &lt;i&gt;fstab&lt;/i&gt; changes are made, on to &lt;i&gt;extlinux.conf&lt;/i&gt; changes.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;#nano /boot/extlinux/extlinux.conf&lt;/div&gt;&lt;br /&gt;We want to add boot options for regular Arch, and optionally the fallback image as well. These look like below in &lt;i&gt;extlinux.conf&lt;/i&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;LABEL archboot&lt;br /&gt;TEXT HELP&lt;br /&gt;Boot into the Arch Linux installation.&lt;br /&gt;ENDTEXT&lt;br /&gt;MENU LABEL Arch Linux&lt;br /&gt;LINUX /boot/vmlinuz26&lt;br /&gt;APPEND root=/dev/disk/by-uuid/964f5668-ddfe-4b6e-b3c8-aa1f1a854310 ro&lt;br /&gt;INITRD /boot/kernel26.img&lt;/div&gt;&lt;br /&gt;Note the &lt;span style="font-family: monospace;"&gt;/dev/disk/by-uuid/&lt;/span&gt; line. This ensures that the flash drive will be able to boot properly in various PCs and setups. &lt;span style="font-family: monospace;"&gt;/dev/sda*&lt;/span&gt; format is not used here since it varies depending on the number of disks on the host system.&lt;br /&gt;&lt;br /&gt;The final result should look like this (comments and less important lines stripped):&lt;br /&gt;&lt;blockquote style="border: thin dotted; font-family: monospace; padding: 5px;"&gt;# cat /boot/extlinux/extlinux.conf&lt;br /&gt;DEFAULT archboot&lt;br /&gt;PROMPT 0&lt;br /&gt;TIMEOUT 50&lt;br /&gt;UI vesamenu.c32&lt;br /&gt;&lt;br /&gt;MENU WIDTH 78&lt;br /&gt;MENU ROWS 8&lt;br /&gt;MENU TITLE Arch Linux&lt;br /&gt;MENU BACKGROUND /boot/splash.png&lt;br /&gt;&lt;br /&gt;LABEL archboot&lt;br /&gt;MENU LABEL Arch Linux&lt;br /&gt;LINUX /boot/vmlinuz26&lt;br /&gt;APPEND root=/dev/disk/by-uuid/964f5668-ddfe-4b6e-b3c8-aa1f1a854310 ro&lt;br /&gt;INITRD /boot/kernel26.img&lt;br /&gt;&lt;br /&gt;LABEL archfallback&lt;br /&gt;MENU LABEL Arch Linux Fallback&lt;br /&gt;LINUX /boot/vmlinuz26&lt;br /&gt;APPEND root=/dev/disk/by-uuid/964f5668-ddfe-4b6e-b3c8-aa1f1a854310 ro&lt;br /&gt;INITRD /boot/kernel26-fallback.img&lt;br /&gt;&lt;br /&gt;LABEL archiso&lt;br /&gt;MENU LABEL Arch Linux LiveUSB&lt;br /&gt;KERNEL /boot/vmlinuz26_archiso&lt;br /&gt;APPEND initrd=/boot/archiso.img archisolabel=archboot tmpfs_size=75% locale=en_US.UTF-8&lt;br /&gt;IPAPPEND 0&lt;br /&gt;&lt;br /&gt;LABEL existing&lt;br /&gt;MENU LABEL Boot existing OS&lt;br /&gt;KERNEL chain.c32&lt;br /&gt;APPEND hd0 0&lt;br /&gt;&lt;br /&gt;LABEL reboot&lt;br /&gt;MENU LABEL Reboot&lt;br /&gt;KERNEL reboot.c32&lt;br /&gt;&lt;br /&gt;LABEL off&lt;br /&gt;MENU LABEL Power Off&lt;br /&gt;COMBOOT poweroff.com&lt;br /&gt;&lt;br /&gt;ONTIMEOUT archboot&lt;/blockquote&gt;Yes, I did change the partition label, which is why &lt;span style="font-family: monospace;"&gt;archisolabel&lt;/span&gt; is different.&lt;br /&gt;&lt;br /&gt;And we’re done. Exit from &lt;span style="font-family: monospace;"&gt;chroot&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;# exit&lt;br /&gt;# umount /bootmnt/proc&lt;br /&gt;# umount /bootmnt/sys&lt;br /&gt;# umount /bootmnt/dev&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;Try booting into it now and hope everything goes well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-8384289724542801199?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/8384289724542801199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=8384289724542801199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/8384289724542801199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/8384289724542801199'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2011/03/bootable-flash-drive-with-separate-data.html' title='Bootable Arch flash drive with separate data partition'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-4037652299073214359</id><published>2010-10-08T23:32:00.000+08:00</published><updated>2010-10-08T23:32:06.278+08:00</updated><title type='text'>Pity</title><content type='html'>&lt;blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;“This is pity, he thought, and then he lifted his head in wonder. He thought that there must be something terribly wrong with a world in which this monstrous feeling is called a virtue.”&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right;"&gt;—Ayn Rand, &lt;i&gt;The Fountainhead&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-4037652299073214359?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/4037652299073214359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=4037652299073214359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4037652299073214359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4037652299073214359'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/10/pity.html' title='Pity'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-3671080795478213588</id><published>2010-07-12T18:38:00.005+08:00</published><updated>2010-07-12T18:52:44.320+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Google Sketchup in Arch Linux x86_64</title><content type='html'>&lt;b&gt;What’s needed&lt;/b&gt;&lt;br /&gt;From winetricks:&lt;br /&gt;vcrun6&lt;br /&gt;vcrun2005&lt;br /&gt;dotnet20&lt;br /&gt;&lt;br /&gt;From AUR:&lt;br /&gt;lib32-nvidia-utils-96xx (conflicts with lib32-libgl)&lt;br /&gt;do not remove optional dependencies after removing lib32-libgl!&lt;br /&gt;&lt;br /&gt;registry key edits (regedit):&lt;br /&gt;[HKEY_CURRENT_USER\Software\Google\SketchUp7\GLConfig\Display]&lt;br /&gt;&lt;br /&gt;"HW_OK"=dword:00000001&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then run the installation files.&lt;br /&gt;Most of the requirements needed in wine seem to be based around the Visual C++ runtime components, and 32-bit OpenGL compatibility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-3671080795478213588?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/3671080795478213588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=3671080795478213588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3671080795478213588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3671080795478213588'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/07/google-sketchup-in-arch-linux-x8664.html' title='Google Sketchup in Arch Linux x86_64'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-7749186532800496673</id><published>2010-06-28T19:35:00.011+08:00</published><updated>2010-07-06T16:12:41.608+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='typography'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>SmartyASS: SmartyPants for Advanced Substation Alpha scripts</title><content type='html'>Inspired by &lt;a href="http://daringfireball.net/projects/smartypants/"&gt;SmartyPants&lt;/a&gt;&amp;nbsp;(from John Gruber), I decided to modify its code in order to fix typography in &lt;a href="http://en.wikipedia.org/wiki/Advanced_SubStation_Alpha#Advanced_SubStation_Alpha"&gt;ASS&lt;/a&gt;-formatted scripts. This script does pretty much the same thing as SmartyPants, but leaves non-dialogue text and ASS tags alone, working its magic only on dialogue text.&lt;br /&gt;&lt;br /&gt;Naturally, it also faces the same limitations as SmartyPants: apostrophes at the start of sentences cannot be properly replaced. Users are advised to verify the output after running this script. But as a bonus, it removes italic tags.&lt;br /&gt;&lt;br /&gt;To use, just run the command “SmartyASS.pl &amp;lt;path-to-ASS-file&amp;gt;” in the directory containing SmartyASS.pl (or in any directory, if the directory containing SmartyASS.pl is in the $PATH environment variable). It can be used as a shell script, possibly requiring some editing of the first line to point at the correct path of the perl binary.&lt;br /&gt;&lt;br /&gt;SmartyASS requires &lt;a href="http://www.perl.org/"&gt;perl&lt;/a&gt; to run. Which version of it I do not know; I am only a one-day perl coder.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.box.net/shared/ucxq0b6bto"&gt;SmartyASS.pl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-7749186532800496673?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/7749186532800496673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=7749186532800496673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7749186532800496673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7749186532800496673'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/06/smartyass-smartypants-for-ass-scripts.html' title='SmartyASS: SmartyPants for Advanced Substation Alpha scripts'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-3003155680887476561</id><published>2010-05-05T21:27:00.009+08:00</published><updated>2010-07-05T14:23:53.268+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='science'/><title type='text'>A brief summary of branches of Physics</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_1OMRX4v1npo/TDF6Y2AiEdI/AAAAAAAAEMg/3pCdA7X2u7A/s1600/Nature_of_Physical_Reality-Causalit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_1OMRX4v1npo/TDF6Y2AiEdI/AAAAAAAAEMg/3pCdA7X2u7A/s320/Nature_of_Physical_Reality-Causalit.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;The Nature of Physical Reality, Henry Margenau&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;This table should be distributed to all Physics first-year undergraduates; Thereupon they are made to memorise it and reproduce it on demand.&lt;br /&gt;The experienced physicist will find this a trivial exercise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-3003155680887476561?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/3003155680887476561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=3003155680887476561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3003155680887476561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3003155680887476561'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/05/brief-summary-of-branches-in-physics.html' title='A brief summary of branches of Physics'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_1OMRX4v1npo/TDF6Y2AiEdI/AAAAAAAAEMg/3pCdA7X2u7A/s72-c/Nature_of_Physical_Reality-Causalit.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-2381321767440882359</id><published>2010-02-27T10:33:00.003+08:00</published><updated>2010-05-05T22:03:08.701+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Boosting Western Digital Advanced Format drive performance in Linux</title><content type='html'>Once again, a little hdparm trickery seems to be the trick to getting the &lt;a href="http://www.wdc.com/en/products/products.asp?driveid=336"&gt;WD Caviar Green&lt;/a&gt;&amp;nbsp;&amp;#8220;EARS&amp;#8221;&amp;nbsp;series to perform as expected.&lt;br /&gt;&lt;br /&gt;From the &lt;a href="http://en.wikipedia.org/wiki/Hdparm"&gt;hdparm&lt;/a&gt; man page:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;-m&lt;br /&gt;&lt;br /&gt;Get/set sector count for multiple sector I/O on the drive. A setting of &lt;b&gt;0&lt;/b&gt; disables this feature. Multiple sector mode (aka IDE Block Mode), is a feature of most modern IDE hard drives, permitting the transfer of multiple sectors per I/O interrupt, rather than the usual one sector per interrupt. When this feature is enabled, it typically reduces operating system overhead for disk I/O by 30-50%. On many systems, it also provides increased data throughput of anywhere from 5% to 50%. Some drives, however (most notably the WD Caviar series), seem to run slower with multiple mode enabled. Your mileage may vary. Most drives support the minimum settings of 2, 4, 8, or 16 (sectors). Larger settings may also be possible, depending on the drive. A setting of 16 or 32 seems optimal on many systems. Western Digital recommends lower settings of 4 to 8 on many of their drives, due tiny (32kB) drive buffers and non-optimized buffering algorithms. The &lt;b&gt;-i&lt;/b&gt; flag can be used to find the maximum setting supported by an installed drive (look for MaxMultSect in the output). Some drives claim to support multiple mode, but lose data at some settings. Under rare circumstances, such failures can result in &lt;b&gt;massive filesystem corruption&lt;/b&gt;.&lt;/div&gt;&lt;br /&gt;The WD10EARS has a MaxMultSect value of 16.&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;code&gt;$ hdparm -i /dev/sdc&lt;br /&gt;&lt;br /&gt;/dev/sdc:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Model=WDC WD10EARS-00Y5B1, FwRev=80.00A80, SerialNo=WD-WMAV51402824&lt;br /&gt;&amp;nbsp;Config={ HardSect NotMFM HdSw&amp;gt;15uSec SpinMotCtl Fixed DTR&amp;gt;5Mbs FmtGapReq }&lt;br /&gt;&amp;nbsp;RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50&lt;br /&gt;&amp;nbsp;BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off&lt;br /&gt;&amp;nbsp;CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1953525168&lt;br /&gt;&amp;nbsp;IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}&lt;br /&gt;&amp;nbsp;PIO modes: &amp;nbsp;pio0 pio3 pio4&lt;br /&gt;&amp;nbsp;DMA modes: &amp;nbsp;mdma0 mdma1 mdma2&lt;br /&gt;&amp;nbsp;UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6&lt;br /&gt;&amp;nbsp;AdvancedPM=no WriteCache=enabled&lt;br /&gt;&amp;nbsp;Drive conforms to: Unspecified: &amp;nbsp;ATA/ATAPI-1,2,3,4,5,6,7&lt;br /&gt;&lt;br /&gt;&amp;nbsp;* signifies the current active mode&lt;br /&gt;&lt;br /&gt;$ hdparm -m /dev/sdc&lt;br /&gt;&lt;br /&gt;/dev/sdc:&lt;br /&gt;multcount     =  0 (off)&lt;br /&gt;$ hdparm -m 16 /dev/sdc&lt;br /&gt;&lt;br /&gt;/dev/sdc:&lt;br /&gt;setting multcount to 16&lt;br /&gt;Use of -m is VERY DANGEROUS.&lt;br /&gt;Only the old IDE drivers work correctly with -m with kernels up to at least 2.6.29.&lt;br /&gt;libata drives may fail and get hung if you set this flag.&lt;br /&gt;Please supply the --yes-i-know-what-i-am-doing flag if you really want this.&lt;br /&gt;Program aborted.&lt;br /&gt;$ hdparm --yes-i-know-what-i-am-doing -m 16 /dev/sdc&lt;br /&gt;&lt;br /&gt;/dev/sdc:&lt;br /&gt;setting multcount to 16&lt;br /&gt;multcount     = 16 (on)&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;Before&amp;nbsp;&amp;#8220;-m 16&amp;#8221;: 40-50MB/s writes&lt;br /&gt;After&amp;nbsp;&amp;#8220;-m 16&amp;#8221;: 90MB/s writes&lt;br /&gt;&lt;br /&gt;Now that's more like it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-2381321767440882359?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/2381321767440882359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=2381321767440882359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/2381321767440882359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/2381321767440882359'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/02/boosting-linux-performance-on-western.html' title='Boosting Western Digital Advanced Format drive performance in Linux'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-3001869042556616171</id><published>2010-02-27T10:15:00.002+08:00</published><updated>2010-07-29T15:04:49.966+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Linux and Western Digital Advanced Format Drives</title><content type='html'>As some hard drive buyers might be aware, &lt;a href="http://www.anandtech.com/show/2888"&gt;4K-sector&lt;/a&gt; hard drives have already appeared in the market. Anandtech has &lt;a href="http://www.anandtech.com/storage/showdoc.aspx?i=3691"&gt;a quick primer on these Advanced Format drives&lt;/a&gt;, and how they're different.&lt;br /&gt;&lt;br /&gt;One point to nitpick on, though: while Linux is capable of creating aligned partitions, not all its partitioning tools do so by default. &lt;a href="http://en.wikipedia.org/wiki/Gparted"&gt;GParted&lt;/a&gt; creates an msdos &lt;a href="http://en.wikipedia.org/wiki/Partition_table"&gt;partition table&lt;/a&gt; on new drives by default, and it starts at LBA 63. The result of this is a noticeable slowdown in file transfer to and from the Advanced Format drive.&lt;br /&gt;&lt;br /&gt;At the time of this post, the only drives available with 4K-sectors are the &lt;a href="http://www.wdc.com/en/products/products.asp?DriveID=773"&gt;Western Digital Caviar Green Series&lt;/a&gt;, designated with the model name “EARS” (the older models are labelled “EADS”). If you are using one of these new drives under Linux, you should personally ensure that the partition starts on a &lt;a href="http://en.wikipedia.org/wiki/Modular_arithmetic"&gt;mod-8&lt;/a&gt; LBA in order to avoid unpleasant performance loss. &lt;a href="http://community.wdc.com/t5/Desktop/Problem-with-WD-Advanced-Format-drive-in-LINUX-WD15EARS/m-p/7573/highlight/true#M369"&gt;A quick guide is available&lt;/a&gt; over at the WDC forums.&lt;br /&gt;&lt;br /&gt;A summarised snippet of the code:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;code&gt;parted /dev/DEVICE_NAME&lt;br /&gt;(parted) mklabel gpt&lt;br /&gt;(parted) unit s&lt;br /&gt;(parted) mkpart primary ext4 40 -1&lt;br /&gt;(parted) quit&lt;br /&gt;&lt;br /&gt;mkfs.ext4 -T largefile4 /dev/DEVICE_NAME&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;I have written a short snippet on boosting performance of Advanced Format drives in Linux by aligning partitions in &lt;a href="http://kureshii.blogspot.com/2010/02/boosting-linux-performance-on-western.html"&gt;the next post&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-3001869042556616171?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/3001869042556616171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=3001869042556616171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3001869042556616171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3001869042556616171'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/02/linux-and-western-digital-advanced.html' title='Linux and Western Digital Advanced Format Drives'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-4129460263034047831</id><published>2010-02-06T23:27:00.005+08:00</published><updated>2011-03-31T22:15:37.758+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Logitech MX Revolution in Arch Linux</title><content type='html'>There is a multitude of guides out there describing various ways of getting the &lt;a href="http://www.logitech.com/en-nz/mice_pointers/mice/devices/130"&gt;Logitech MX Revolution&lt;/a&gt; mouse working in various flavours of Linux. I figured one more guide wouldn't hurt.&lt;br /&gt;&lt;br /&gt;Here, I describe one method using &lt;i&gt;xbindkeys&lt;/i&gt; and &lt;i&gt;xmacro&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;xbindkeys&lt;/h4&gt;From the man page: XbindKeys is a program that grab keys and mouse button events in X and starts associated shell command.&lt;br /&gt;&lt;br /&gt;In other words, &lt;i&gt;xbindkeys&lt;/i&gt; lets you map keystrokes and mouse buttons to shell commands. What is less obvious is the fact that there are programs that can emulate keystrokes and mouse buttons as well; we will cover this later. What we want to do now is to create a file that defines this mapping.&lt;br /&gt;&lt;br /&gt;Begin by installing &lt;i&gt;xbindkeys&lt;/i&gt;. In Arch Linux, this is done with the following command:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;code&gt;pacman -S xbindkeys&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;Next, we create a sample xbindkeys configuration file in your home directory, and open it.&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;code&gt;xbindkeys --defaults &amp;gt; ~/.xbindkeysrc&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;This is what it looks like:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;# For the benefit of emacs users: -*- shell-script -*-&lt;br /&gt;###########################&lt;br /&gt;# xbindkeys configuration #&lt;br /&gt;###########################&lt;br /&gt;#&lt;br /&gt;# Version: 1.8.3&lt;br /&gt;#&lt;br /&gt;# If you edit this file, do not forget to uncomment any lines&lt;br /&gt;# that you change.&lt;br /&gt;# The pound(#) symbol may be used anywhere for comments.&lt;br /&gt;#&lt;br /&gt;# To specify a key, you can use 'xbindkeys --key' or&lt;br /&gt;# 'xbindkeys --multikey' and put one of the two lines in this file.&lt;br /&gt;#&lt;br /&gt;# The format of a command line is:&lt;br /&gt;#    "command to start"&lt;br /&gt;#       associated key&lt;br /&gt;#&lt;br /&gt;#&lt;br /&gt;# A list of keys is in /usr/include/X11/keysym.h and in&lt;br /&gt;# /usr/include/X11/keysymdef.h&lt;br /&gt;# The XK_ is not needed.&lt;br /&gt;#&lt;br /&gt;# List of modifier:&lt;br /&gt;#   Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),&lt;br /&gt;#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# The release modifier is not a standard X modifier, but you can&lt;br /&gt;# use it if you want to catch release events instead of press events&lt;br /&gt;&lt;br /&gt;# By defaults, xbindkeys does not pay attention with the modifiers&lt;br /&gt;# NumLock, CapsLock and ScrollLock.&lt;br /&gt;# Uncomment the lines above if you want to pay attention to them.&lt;br /&gt;&lt;br /&gt;#keystate_numlock = enable&lt;br /&gt;#keystate_capslock = enable&lt;br /&gt;#keystate_scrolllock= enable&lt;br /&gt;&lt;br /&gt;# Examples of commands:&lt;br /&gt;&lt;br /&gt;"xbindkeys_show" &lt;br /&gt;control+shift + q&lt;br /&gt;&lt;br /&gt;# set directly keycode (here control + f with my keyboard)&lt;br /&gt;"xterm"&lt;br /&gt;c:41 + m:0x4&lt;br /&gt;&lt;br /&gt;# specify a mouse button&lt;br /&gt;"xterm"&lt;br /&gt;control + b:2&lt;br /&gt;&lt;br /&gt;#"xterm -geom 50x20+20+20"&lt;br /&gt;#   Shift+Mod2+alt + s&lt;br /&gt;#&lt;br /&gt;## set directly keycode (here control+alt+mod2 + f with my keyboard)&lt;br /&gt;#"xterm"&lt;br /&gt;#  alt + c:0x29 + m:4 + mod2&lt;br /&gt;#&lt;br /&gt;## Control+Shift+a  release event starts rxvt&lt;br /&gt;#"rxvt"&lt;br /&gt;#  release+control+shift + a&lt;br /&gt;#&lt;br /&gt;## Control + mouse button 2 release event starts rxvt&lt;br /&gt;#"rxvt"&lt;br /&gt;#  Control + b:2 + Release&lt;br /&gt;&lt;br /&gt;##################################&lt;br /&gt;# End of xbindkeys configuration #&lt;br /&gt;##################################&lt;/div&gt;&lt;br /&gt;It is clear that the key bindings follow the following format:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;"[shell command to run]"&lt;br /&gt;[keystroke to capture]&lt;br /&gt;[keysym (alternate key descriptor)]&lt;/div&gt;&lt;br /&gt;An example:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;#Middle-click&lt;br /&gt;"echo 'ButtonPress 2 ButtonRelease 2' | xmacroplay :0"&lt;br /&gt;m:0x0 + c:225&lt;br /&gt;XF86Search &lt;/div&gt;&lt;br /&gt;In the above example, key 225 (the search key, which can be found on some multimedia keyboards with more than the standard 108 keys) is also known by the key symbol 0x1008ff1b, or XF86Search. "m" stands for modifier, and is used it you want to add a modifier key (Ctrl, Alt, Shift, and so on) to the keystroke.&lt;br /&gt;&lt;br /&gt;You can safely do without the key symbol in the above key binding definitions as well, for example:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;#Ctrl-Alt-PgUp&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Alt_L KeyStrPress Page_Down KeyStrRelease Page_Down KeyStrRelease Alt_L KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:6&lt;/div&gt;&lt;br /&gt;Here, "b" stands for button, and we'll be using this to capture mouse button input. For defined keys, use the "c" descriptor instead, as in the earlier example. For moer key binding definitions, use the command &lt;code&gt;xmodmap -pk&lt;/code&gt; (you will need to install &lt;i&gt;xmodmap&lt;/i&gt; first.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In contrast with the key bindings, the mouse bindings are much simpler. A list of mouse button bindings for the Logitech MX Revolution is shown below.&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;1: Left click&lt;br /&gt;2: Scrollwheel click (middle-click)&lt;br /&gt;3: Right click&lt;br /&gt;4: Scrollwheel up&lt;br /&gt;5: Scrollwheel down&lt;br /&gt;6: Scrollwheel tilt left&lt;br /&gt;7: Scrollwheel tilt right&lt;br /&gt;8: Thumb button down&lt;br /&gt;9: Thumb button up&lt;br /&gt;13: Thumbwheel down&lt;br /&gt;15: Thumbwheel up&lt;br /&gt;17: Thumbwheel click&lt;/div&gt;&lt;br /&gt;To find out how mouse buttons for other mice are mapped, install and run &lt;i&gt;xev&lt;/i&gt;. On execution, &lt;i&gt;xev&lt;/i&gt; creates a window with a black-bordered box. Move your mouse cursor inside the box and press one of the buttons. In the console output, look for a section like&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;ButtonPress event, serial 34, synthetic NO, window 0x3a00001,&lt;br /&gt;root 0x142, subw 0x0, time 12161652, (111,59), root:(1851,1005),&lt;br /&gt;state 0x0, &lt;b&gt;button 5&lt;/b&gt;, same_screen YES                            &lt;br /&gt;&lt;br /&gt;ButtonRelease event, serial 34, synthetic NO, window 0x3a00001,&lt;br /&gt;root 0x142, subw 0x0, time 12161652, (111,59), root:(1851,1005),&lt;br /&gt;state 0x1000, &lt;b&gt;button 5&lt;/b&gt;, same_screen YES&lt;/div&gt;&lt;br /&gt;That tells you which number the button is binded to.&lt;br /&gt;&lt;br /&gt;With the above information, it is easy to create key bindings for xbindkeys to capture. Next, we figure out how to run shell commands that will emulate key presses. We will do this with &lt;i&gt;xmacro&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;xmacro&lt;/h4&gt;To simulate key presses or mouse clicks with &lt;i&gt;xmacro&lt;/i&gt;, we use commands in the following format:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="font-family: Georgia;"&gt;&lt;br /&gt;&lt;/span&gt; echo 'KeyStrPress &lt;keystroke 1=""&gt; KeyStrPress &lt;keystroke2&gt; KeyStrRelease &lt;keystroke 2=""&gt; KeyStrRelease &lt;keystroke 1=""&gt;' | xmacroplay :0&lt;br /&gt;&lt;/keystroke&gt;&lt;/keystroke&gt;&lt;/keystroke2&gt;&lt;/keystroke&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;The section between the single-quotes (' ') describes the command which is sent to &lt;i&gt;xmacro&lt;/i&gt; to be run.&lt;br /&gt;&lt;br /&gt;I used the following key mappings in my &lt;span class="Apple-style-span" style="font-family: monospace;"&gt;.xbindkeysrc&lt;/span&gt;:&lt;br /&gt;&lt;div style="border: thin dotted; padding: 5px;"&gt;#Middle-click&lt;br /&gt;"echo 'ButtonPress 2 ButtonRelease 2' | xmacroplay :0"&lt;br /&gt;m:0x0 + c:225&lt;br /&gt;XF86Search&lt;br /&gt;&lt;br /&gt;#Ctrl-Alt-PgUp&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Alt_L KeyStrPress Page_Down KeyStrRelease Page_Down KeyStrRelease Alt_L KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:6&lt;br /&gt;&lt;br /&gt;#Ctrl-Alt-PgDn&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Alt_L KeyStrPress Page_Up KeyStrRelease Page_Up KeyStrRelease Alt_L KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:7&lt;br /&gt;&lt;br /&gt;#Ctrl-PgDn&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Page_Down KeyStrRelease Page_Down KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:13&lt;br /&gt;&lt;br /&gt;#Ctrl-PgUp&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress Page_Up KeyStrRelease Page_Up KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:15&lt;br /&gt;&lt;br /&gt;#Ctrl-F4&lt;br /&gt;"echo 'KeyStrPress Control_L KeyStrPress F4 KeyStrRelease F4 KeyStrRelease Control_L' | xmacroplay :0"&lt;br /&gt;m:0x0 + b:17&lt;/div&gt;&lt;br /&gt;Modify the above code to suit your own purposes, and insert it into &lt;span class="Apple-style-span" style="font-family: monospace;"&gt;.xbindkeysrc&lt;/span&gt; in your home folder.&lt;br /&gt;&lt;br /&gt;Now run &lt;i&gt;xbindkeys&lt;/i&gt; and check that the key bindings work. Add &lt;i&gt;xbindkeys&lt;/i&gt; to your list of autostart applications, and enjoy using your properly mapped &lt;a href="http://www.logitech.com/en-nz/mice_pointers/mice/devices/130"&gt;Logitech MX Revolution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-4129460263034047831?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/4129460263034047831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=4129460263034047831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4129460263034047831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/4129460263034047831'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2010/02/logitech-mx-revolution-in-arch-linux.html' title='Logitech MX Revolution in Arch Linux'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-247024353214584768</id><published>2009-10-18T13:20:00.013+08:00</published><updated>2010-07-05T14:29:05.496+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='projects'/><category scheme='http://www.blogger.com/atom/ns#' term='osmium'/><title type='text'>Project Osmium: Google Sketchup</title><content type='html'>&lt;div style="clear: both;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_1OMRX4v1npo/TDF6o_AY3VI/AAAAAAAAEMo/LVMd3NiXzU8/s1600/DTPC_shaded.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_1OMRX4v1npo/TDF6o_AY3VI/AAAAAAAAEMo/LVMd3NiXzU8/s320/DTPC_shaded.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Google Sketchup’s default shading model is far from fantastic, but works fine for drafting. Here, the effects of the black acrylic side panels are poorly rendered, but the effect should be like dark glass — semi-transparent, with a bit of a mirror finish.&lt;br /&gt;Aluminium is used for the top, back and bottom; acrylic is used for the front and sides.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear: both;"&gt;&lt;div style="float: left; margin: 0pt 10px 10px 0pt;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_1OMRX4v1npo/TDF6zMcTYpI/AAAAAAAAEMw/PB_XJmu3Qio/s1600/DTPC_hidden.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_1OMRX4v1npo/TDF6zMcTYpI/AAAAAAAAEMw/PB_XJmu3Qio/s320/DTPC_hidden.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;On the left, two renderings that are hopefully more pleasing to the eye: hidden-frame and X-ray renderings.&amp;nbsp;Hidden-frame rendering looks the nicest in my opinion, although it does obscure some details, and shows no information about texturing or colours.&amp;nbsp;The X-ray renderings are a little cluttered, but the internal components should be easily identifiable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A quick orientation: The radiator is on top, the PSU is mounted at the bottom, flush with the back.&lt;br /&gt;&lt;br /&gt;The motherboard is mounted on a second clear acrylic base (attached to the internal frame), and the CPU socket sits right underneath the PSU (a tight fit for anything, really). Yeah, like an SG03 layout, but more cramped.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lastly, fan grilles and other orifices have not been modelled yet; Thus far, only the back I/O [plate and PCI slots have been cut. Tubing for watercooling is likewise incomplete, as are the CPU and GPU waterblocks.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear: both;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_1OMRX4v1npo/TDF7CBu271I/AAAAAAAAEM4/HRntfaEadYQ/s1600/DTPC_frame.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_1OMRX4v1npo/TDF7CBu271I/AAAAAAAAEM4/HRntfaEadYQ/s320/DTPC_frame.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Here, you can see the internal frame to which all components are attached.&amp;nbsp;Some sections are still incomplete; I am pondering how to add a support bar to the rear assembly, which holds the PSU and peripheral cards. Still, it should be easily clear how the components are attached, even if the screws have not been modelled and rendered.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="clear: both;"&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_1OMRX4v1npo/TDF7Ypkei7I/AAAAAAAAENA/jf8vnsE0xVE/s1600/DTPC_components.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_1OMRX4v1npo/TDF7Ypkei7I/AAAAAAAAENA/jf8vnsE0xVE/s320/DTPC_components.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="clear: right;"&gt;These are the components, displayed without the skin and supporting frame. The video card is not shown. (There were no pre-rendered models available, and I didn't not have one on-hand for reference.)&lt;/div&gt;&lt;div style="clear: right;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear: right;"&gt;The pump was placed in front due to the lack of mountable surfaces; the SSD is in front so I can possibly illuminate it for some cheesecake night shots.&lt;/div&gt;&lt;div style="clear: right;"&gt;&lt;br /&gt;&lt;/div&gt;The radiator assembly and the bottom intake fan actually serve to support the aluminium skins (which will be directly attached to them) as well.&lt;/div&gt;&lt;br /&gt;&lt;div style="clear: both;"&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_1OMRX4v1npo/TDF7gBrI5-I/AAAAAAAAENI/U-6QDRub1Ys/s1600/DTPC_skin.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_1OMRX4v1npo/TDF7gBrI5-I/AAAAAAAAENI/U-6QDRub1Ys/s320/DTPC_skin.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="clear: right;"&gt;The skin and frame are shown without the components. The skin is made up of 2 pieces of aluminium and acrylic each; aluminium for the top and bottom (which curve around to the back and fold in interesting ways to form it), and acrylic for the base side panel on the motherboard side, as well as the curved front+side panel.&lt;/div&gt;&lt;div style="clear: right;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear: right;"&gt;It might be interesting to note that the base panel is attached to the internal frame only via perspex blocks (rectangular blocks, of which there are currently 4; I will need to add a few more), so as to reduce the drilling requirement and make the mirror finish more perfect.&lt;/div&gt;&lt;div style="clear: right;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear: right;"&gt;The aluminium panel skins will be attached to the frame via flat countersunk screws, polished to match the anodised aluminium.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Details of the hinge mechanism, as well as other missing details, will follow in future updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-247024353214584768?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/247024353214584768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=247024353214584768' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/247024353214584768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/247024353214584768'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2009/10/project-osmium-google-sketchup.html' title='Project Osmium: Google Sketchup'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF6o_AY3VI/AAAAAAAAEMo/LVMd3NiXzU8/s72-c/DTPC_shaded.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-7820782610537242566</id><published>2009-10-18T13:14:00.005+08:00</published><updated>2010-05-05T22:14:47.467+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='projects'/><category scheme='http://www.blogger.com/atom/ns#' term='osmium'/><title type='text'>Project Osmium: Materials and Hardware</title><content type='html'>&lt;span style="font-size: 130%; font-weight: bold;"&gt;Materials&lt;/span&gt;&lt;br /&gt;The materials of choice are black transparent acrylic, and black anodised aluminium (brushed finish). While I am not particularly inclined towards lighting in my computer cases, I felt it would be nice to have some diffuse white lighting in the case, accentuating particular elements. Black acrylic would show this off nicely, while hiding the internal components behind a mirror finish when the case lights are switched off.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;Hardware&lt;/span&gt;&lt;br /&gt;Small form factor here means a micro-ATX form-factor (socket-1156 mini-ITX boards will be a long time in coming...) In addition, I wanted to minimise cost as far as possible, and since I will not be doing heavy overclocking on this setup, it should prove relatively easy to stay on a small budget. This rig will be mainly used for multimedia playback and heavy multitasking, essentially a do-it-all build (excluding gaming; I am not a PC gamer).&lt;br /&gt;&lt;br /&gt;The following key components have been picked out so far.&lt;br /&gt;&lt;ul style="font-family: verdana;"&gt;&lt;li&gt;Intel Core i7-860&lt;/li&gt;&lt;li&gt;Gigabyte P55M-UD2&lt;/li&gt;&lt;li&gt;Corsair XMS3-DHX DDR3&lt;/li&gt;&lt;li&gt;XFX Radeon HD5750&lt;/li&gt;&lt;/ul&gt;The watercooling elements are tentative and may be replaced by other picks sometime.&lt;br /&gt;&lt;ul style="font-family: verdana;"&gt;&lt;li&gt;Swiftech MCP350 pump&lt;/li&gt;&lt;li&gt;Swiftech MCR220-Rev dual-120mm radiator (built-in reservoir)&lt;/li&gt;&lt;li&gt;Dual Noctua NF-P12 for radiator cooling&lt;/li&gt;&lt;li&gt;Enermax Enlobal Marathon / Magma for air intake &amp;amp; memory DIMM cooling&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-7820782610537242566?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/7820782610537242566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=7820782610537242566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7820782610537242566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/7820782610537242566'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2009/10/project-osmium-materials-and-hardware.html' title='Project Osmium: Materials and Hardware'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-5340480537225393146</id><published>2009-10-18T12:33:00.006+08:00</published><updated>2010-05-21T19:18:45.892+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='projects'/><category scheme='http://www.blogger.com/atom/ns#' term='osmium'/><title type='text'>Project Osmium: Introduction</title><content type='html'>&lt;span class="pg"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="pg"&gt;–&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;noun&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="labset"&gt;&lt;span class="ital-inline" style="font-style: italic;"&gt;Chemistry&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  atomic number 76. Osmium is a hard, brittle, blue-gray or blue-black transition metal in the platinum family, and is the densest natural element.&lt;/blockquote&gt;Many months ago, when &lt;a href="http://www.anandtech.com/cpuchipsets/showdoc.aspx?i=3570"&gt;Lynnfield&lt;/a&gt; was announced, my interest in a power-efficient, small-footprint quad-core system was piqued. No northbridge, and individual core control; A quad-core system that stays within the 200W power envelope and yet sits in a case smaller than a mini-tower was unthinkable, then.&lt;br /&gt;&lt;br /&gt;My earliest ideas revolved around fitting a Core i7-860 in a &lt;a href="http://www.lian-li.com/v2/tw/flashpage/c37/"&gt;Lian-Li MUSE PC-C37 case&lt;/a&gt;, cooled by a sealed closed-loop cooler such as the &lt;a href="http://www.corsair.com/products/h50/default.aspx"&gt;Corsair H50&lt;/a&gt;. The optical drive + hard drive cage would be removed and replaced with a segregated cooling tunnel for the 120mm radiator, and a 70mm fan intake would cool the memory DIMMs. This idea bounced around in my head for quite a while, until I started looking up case mods on &lt;a href="http://www.bit-tech.net/modding/"&gt;bit-tech&lt;/a&gt; and other sites.&lt;br /&gt;&lt;br /&gt;The idea of a scratch-build was very appealing; low-form-factor cases have not gained mass-market appeal yet, so pickings are still slim. The only case I could find that would take a full-sized ATX PSU was the C37, and it was still a little too wide for my taste. I also wanted a case that would stand upright to reduce the desktop footprint, and the C37 didn’t look like it could do that comfortably.&lt;br /&gt;&lt;br /&gt;Hence, enter project Osmium. The name was (uncreatively) inspired by the element of the same name; this build aims to maximise performance in as small a volume as possible (highest performance density), and it would be decked out in black, like the rest of the other electronics on my table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-5340480537225393146?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/5340480537225393146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=5340480537225393146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5340480537225393146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5340480537225393146'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2009/10/project-osmium-introduction.html' title='Project Osmium: Introduction'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-5635744389605085553</id><published>2009-04-03T16:26:00.004+08:00</published><updated>2010-05-05T22:17:52.203+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Porting search engines from Firefox to Chrome/Iron</title><content type='html'>This is a quick method for those seeking to improve the functionality of &lt;a href="http://www.google.com/chrome"&gt;Chrome&lt;/a&gt;/&lt;a href="http://www.srware.net/en/software_srware_iron.php"&gt;Iron&lt;/a&gt;/other Chromium variants on their system.&lt;br /&gt;&lt;br /&gt;If you already have &lt;a href="http://www.mozilla.org/en/firefox/"&gt;Firefox&lt;/a&gt; installed and have been playing around with it, then you probably have quite a list of search engines already added. you can, with some expenditure of effort, bring them over to Chromium/Iron. Here's how.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Browse to your Firefox profile folder. On most systems, this should be something like &lt;span style="font-style: italic;"&gt;C:/Program Files/Mozilla/Firefox/profile&lt;/span&gt; (I'm using a portable build so I can't verify this).&lt;/li&gt;&lt;li&gt;You should see a folder labelled &lt;span style="font-style: italic;"&gt;searchplugins&lt;/span&gt;. If you see a number of files with extensions ending in .xml, then you've hit jackpot :) Those files are search engine configurations, and should be named according to the search engine they are configured for.&lt;/li&gt;&lt;li&gt;Right-click the appropriate .xml file, then &lt;b&gt;“Edit”&lt;/b&gt;&amp;nbsp;(or just open it in your text editor of choice). Look for a line with the following:&lt;span style="font-weight: bold;"&gt; &lt;os:url method="GET" type="text/html"&gt;&lt;/os:url&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;From the same line, copy the URL that comes after &lt;span style="font-weight: bold;"&gt;template=“...”&lt;/span&gt;, without the quotation marks.&lt;/li&gt;&lt;li&gt;Right-click on the Location bar in Chrome/Iron, and select &lt;b&gt;“Edit search engines...”&lt;/b&gt;. Click &lt;span style="font-weight: bold;"&gt;“Add”&lt;/span&gt;, and a dialog box for adding a ne search engine should appear.&lt;/li&gt;&lt;li&gt;Type in a name and keyword of your choice in the first two text entry fields. In the third entry field, paste the URL you copied earlier. Replace &lt;i&gt;&amp;amp;$8220;{searchTerms}”&lt;/i&gt; in the URL with &lt;span style="font-style: italic;"&gt;“%s”&lt;/span&gt; (excluding the quotation marks).&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-weight: bold;"&gt;Ok&lt;/span&gt;. You should now be able to search using the search engine in Chrome/Iron, simply by typing in the search keyword, then the search terms to use, separated by a space.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-5635744389605085553?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/5635744389605085553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=5635744389605085553' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5635744389605085553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/5635744389605085553'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2009/04/porting-search-engines-from-firefox-to.html' title='Porting search engines from Firefox to Chrome/Iron'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-6848559889774554875</id><published>2009-03-20T15:58:00.008+08:00</published><updated>2010-05-05T22:28:35.031+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='musings'/><title type='text'>Of Sky Crawlers and Change</title><content type='html'>I finally watched &lt;a href="http://en.wikipedia.org/wiki/The_Sky_Crawlers"&gt;The Sky Crawlers&lt;/a&gt; (from a source I will not name), and it left me with mixed feelings. It has been a long time since I have thought about so many things after watching anime, so I will pen some of them down.&lt;br /&gt;&lt;br /&gt;First, a warning to readers: No, I did not have an outline of this written on a sheet of paper, nor did I plan an introduction, body (replete with elaboration) and conclusion, so I am afraid you will have to suffer some of my brain diarrhoea. Any academic body would tell you this is bad writing style, so do not emulate this. But for a blog... whatever.&lt;br /&gt;&lt;br /&gt;Without revealing too much of the story and plot, &lt;a href="http://www.animenewsnetwork.com/encyclopedia/anime.php?id=8269"&gt;The Sky Crawlers&lt;/a&gt; is a story about Kildren: adolescents doomed (or perhaps blessed) to live the prime of their youth over and over again, in an unchanging landscape. Like with other &lt;a href="http://www.animenewsnetwork.com/encyclopedia/people.php?id=52"&gt;Mamoru Oshii&lt;/a&gt; works, this one is a thinker. What makes this one different is that it's boring, absolutely boring, but intentionally so. Here I should immediately clarify that I do not use the word “boring” with the intent of insult.&lt;br /&gt;&lt;br /&gt;Truthfully, the film piqued my interest only after I read &lt;a href="http://www.animenewsnetwork.com/review/sky-crawlers/theatrical-release"&gt;Justin's review&lt;/a&gt; of it (scathing look at the anime industry? Ooooh...) I don’t fully agree with him. As one of the posters on the ANN forums says, the theme of this movie is so general that it could apply to almost anything. It could be a scathing look at anime... or at engineering, or business, photography, or any number of fields and disciplines that have fallen into the rut of wash-rinse-repeat. From a general perspective, Sky Crawlers is the embodiment of pretty-but-boring; lovely textures and lighting, sharp CG, but flat textures on flat characters, and bland voice-acting. I wonder if this is Oshii’s way of making his point that invariability is an undesired result we should not be aiming for.&lt;br /&gt;&lt;br /&gt;As a teenager I sometimes thought to myself, “How nice things would be if they could stay the same so I would never have to grow up”. Now the irony of that statement comes back to bite me. It's triflingly amusing because at that moment in time, I was looking forward to an eternity of constancy; the preservation of a state that includes my preference for an eternally unchanging state of constancy. If that state could have been perfectly preserved maybe I would have been in frozen, time-preserved bliss. Wouldn't that be a dandy state of things?&lt;br /&gt;&lt;br /&gt;But in retrospect, perhaps invariability is desirable only in the context of an inevitably changing background. In a world where things are changing slowly but surely, constancy is the flip side of the coin, the greener side of the field. I As a teen, my thoughts aligned with dreams of never growing up or graduating, because growing up and graduating is the de-facto state of things I could not avoid. I wonder what I would have said in an alternate reality where ideas such as graduation never existed.&lt;br /&gt;&lt;br /&gt;In the first chapter of &lt;a href="http://www.amazon.com/Nature-Physical-Reality-Philosophy-Physics/dp/091802403X"&gt;The Nature of Physical Reality&lt;/a&gt;, (part of) a paragraph reads &lt;span style="font-style: italic;"&gt;"Professor William Lyon Phelps, in his charming informal lectures to the undergraduates at Yale, insisted that physics had far less to say about truth and reality than did poetry. and to prove his point he asked them: 'Would you now read a physics text that is 100 years old? Of course not. But you still read Shakespeare!'"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So much for truth and reality then, as convenient and useful constructs of the mind. Maybe they are not constant either, changing as our perceptions and collective ideas do. Perhaps, as the cliché goes, the only thing that doesn't change is change itself. And if change is the only thing we can count on, then it's probably time for me to grow up and stop getting too comfortable in my little academic pigeon-hole.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-6848559889774554875?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/6848559889774554875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=6848559889774554875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/6848559889774554875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/6848559889774554875'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2009/03/of-sky-crawlers-and-change.html' title='Of Sky Crawlers and Change'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-3723812149182485176</id><published>2008-06-07T01:39:00.007+08:00</published><updated>2010-05-05T22:32:18.336+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='musings'/><title type='text'>Fockkkk</title><content type='html'>More than 6 years (nay, closer to 7) with Windows XP, and I only just realised that every time I disconnect a USB device, my tablet says &lt;span style="font-weight: bold;"&gt;“fockkkk”&lt;/span&gt;. In a computerish accent, nonetheless quite clearly and distinguishably, &lt;span style="font-weight: bold;"&gt;“fockkkk”&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-3723812149182485176?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/3723812149182485176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=3723812149182485176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3723812149182485176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/3723812149182485176'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2008/06/fockkkk.html' title='Fockkkk'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8315362200231419927.post-6904272626116065073</id><published>2008-05-31T02:14:00.004+08:00</published><updated>2010-05-05T22:33:20.275+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='musings'/><title type='text'>Killing It Softly</title><content type='html'>I have a habit of trying to hold the power button for the shortest time possible before the computer performs a hard power down. I never gave too much thought to this until today, when I realised that I still feel queasy about holding down that power button. Pressing down on the windpipe of a whirring, breathing animal, until it ceases all activity, while you watch pensively for further stirring before confirming its state of death.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8315362200231419927-6904272626116065073?l=kureshii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kureshii.blogspot.com/feeds/6904272626116065073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8315362200231419927&amp;postID=6904272626116065073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/6904272626116065073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8315362200231419927/posts/default/6904272626116065073'/><link rel='alternate' type='text/html' href='http://kureshii.blogspot.com/2008/05/killing-it-softly.html' title='Killing It Softly'/><author><name>kureshii</name><uri>http://www.blogger.com/profile/04732616118807432473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_1OMRX4v1npo/TDF2ygEByII/AAAAAAAAEMA/Sx7g3g6lqrg/S220/garamond_fi.jpg'/></author><thr:total>0</thr:total></entry></feed>
