<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Al4</title>
	<atom:link href="http://al40.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://al40.wordpress.com</link>
	<description>by Alex Forbes</description>
	<lastBuildDate>Thu, 12 Jan 2012 08:23:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='al40.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Al4</title>
		<link>http://al40.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://al40.wordpress.com/osd.xml" title="Al4" />
	<atom:link rel='hub' href='http://al40.wordpress.com/?pushpress=hub'/>
		<item>
		<title>This blog has moved</title>
		<link>http://al40.wordpress.com/2012/01/12/this-blog-has-moved/</link>
		<comments>http://al40.wordpress.com/2012/01/12/this-blog-has-moved/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 08:23:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://al40.wordpress.com/?p=848</guid>
		<description><![CDATA[Still get the occasional hit on al40.wordpress.com, even though it has never been used as the primary address for this blog. In April 2011 I moved to self-hosted, newer posts are at blog.al4.co.nz.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=848&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Still get the occasional hit on al40.wordpress.com, even though it has never been used as the primary address for this blog.</p>
<p>In April 2011 I moved to self-hosted, newer posts are at <a href="http://blog.al4.co.nz">blog.al4.co.nz</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/848/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=848&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2012/01/12/this-blog-has-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>A quick look at Unity in Ubuntu 11.04</title>
		<link>http://al40.wordpress.com/2011/04/19/a-quick-look-at-unity-in-ubuntu-11-04/</link>
		<comments>http://al40.wordpress.com/2011/04/19/a-quick-look-at-unity-in-ubuntu-11-04/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 23:29:11 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=828</guid>
		<description><![CDATA[I usually jump on the latest Ubuntu release before it hits the final release stage, but this time it was with a bit more trepidation than usual. You see they&#8217;ve replaced the shell with a completely new one &#8211; Unity. And to say that not everyone likes it would be a minor understatement. The good [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=828&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I usually jump on the latest Ubuntu release before it hits the final release stage, but this time it was with a bit more trepidation than usual. You see they&#8217;ve replaced the shell with a completely new one &#8211; <a href="http://unity.ubuntu.com/">Unity</a>. And to say that <a href="http://www.theregister.co.uk/2011/04/01/ubuntu1004_beta_review/">not everyone likes it</a> would be a minor understatement.</p>
<p>The good news is that Unity is undoubtedly a step forward in practical user interface terms. The classic Gnome panel is really showing its age, and doesn&#8217;t lend itself to wide screen formats due to having panels on both the top and bottom of the screen. SUSE addressed this by created a start menu like launcher, but it was always a bit clunky and barely an improvement over Windows XP.</p>
<p>So how is Unity different? It is perhaps more informative to talk about how it is similar&#8230;</p>
<p><a href="http://al40.files.wordpress.com/2011/04/unity1.png"><img src="http://al40.files.wordpress.com/2011/04/unity1.png?w=630&#038;h=393" alt="" title="unity1" width="630" height="393" class="aligncenter size-full wp-image-829" /></a></p>
<p>The first thing you notice is the panel on the left &#8211; this does bear some resemblance to Mac OSX&#8217;s dock and various dock applications for Linux such as AWN and Docky. However it is definitely not as customizable. Launching applications is an inferior experience to both OSX and Windows 7 &#8211; there&#8217;s little in the way of visual feedback that your command has been acknowledged and I have found myself clicking multiple times.</p>
<h3>Mimicking Windows &#8211; snappy edges</h3>
<p><a href="http://al40.files.wordpress.com/2011/04/unity2.png"><img src="http://al40.files.wordpress.com/2011/04/unity2.png?w=630&#038;h=393" alt="" title="unity2" width="630" height="393" class="aligncenter size-full wp-image-830" /></a></p>
<p>Enabling this in compiz was an annoying complex hack, Unity does it by default &#8211; just  drag the window to the left or right of the screen and it will fill that half. Drag it to the bar up the top (I hesitate to call it a task bar), and it maximises. It was a good idea in Windows because it&#8217;s so intuitive and I&#8217;m glad to see it here, even if it isn&#8217;t an original idea.</p>
<p>The windows key now behaves more like it does in windows &#8211; pressing it brings up the app launcher and it is also used for shortcut keys.</p>
<p>Speaking of shortcuts &#8211; the important compiz shortcuts are there &#8211; ctrl + shift + arrows to move the active window between desktops. Winkey+W brings up an expose-like overview of all open windows. You can use the arrow keys to select a Window but they need more highlighting as it&#8217;s not immediately obvious which one is selected.</p>
<p>For more shortcut keys see <a href="http://www.ubuntugeek.com/list-of-ubuntu-unity-keyboard-shortcuts.html">http://www.ubuntugeek.com/list-of-ubuntu-unity-keyboard-shortcuts.html</a>.</p>
<h3>Mimicking OSX &#8211; application menus</h3>
<p><a href="http://al40.files.wordpress.com/2011/04/unity3.png"><img src="http://al40.files.wordpress.com/2011/04/unity3.png?w=630&#038;h=393" alt="" title="unity3" width="630" height="393" class="aligncenter size-full wp-image-831" /></a></p>
<p>Basically menus behave like OSX. I don&#8217;t think people will have any trouble figuring this out, if anything it&#8217;s simply a more efficient use of screen real estate which I&#8217;m all for (my primary computing device is a 13&#8243; laptop @ 1280&#215;1024). They don&#8217;t show unless you hover over or press the alt key, but he general consensus seems to be that this style of menu should go away so de-emphasizing them is probably a good move.</p>
<h3>Desktop switching &#8211; still better than the rest</h3>
<p><a href="http://al40.files.wordpress.com/2011/04/unity4.png"><img src="http://al40.files.wordpress.com/2011/04/unity4.png?w=630&#038;h=393" alt="" title="unity4" width="630" height="393" class="aligncenter size-full wp-image-833" /></a></p>
<p>Previously I&#8217;ve always used a 2&#215;1 layout for virtual desktops. Gnome2 desktops traditionally had a 4&#215;1 layout, I just reduced that to 2 because I don&#8217;t like hunting for my windows, and switching from desktop 1 to 3 (or 2 to 4) takes two steps. The 2&#215;2 layout however has me sold &#8211; I find it much easier to remember where I placed a window, and while it might be just as many key presses to go from 1 to 4 or 2 to 3, mentally it&#8217;s more like 1 step.</p>
<p>This is because you can switch from top left to bottom right very quickly &#8211; holding down ctrl and pressing down, right is much faster than ctrl + right, right.</p>
<h3>The Bad</h3>
<p>It&#8217;s not all roses.</p>
<ul>
<li>There is no intuitive quick way to see what windows are open at a glance. In Windows 7 the taskbar is always visible, in Unity if you have an application maximised it is not. For small screens this is an acceptable trade off, for large it&#8217;s just annoying. I haven&#8217;t found a way to change this behaviour, but to be fair I didn&#8217;t look long. Winkey+W is your friend.
</li>
<li>Stability. I&#8217;ve encountered two crashes of the shell already, and I&#8217;ve only been using it for a few hours. Yes it&#8217;s still beta&#8230; but this close to release I&#8217;d be surprised if there&#8217;s any material difference in the final.</li>
</ul>
<h3>Verdict</h3>
<p>I&#8217;m quite positive about it. It&#8217;s certainly a step forward, and borrows some of the better ideas from Windows, OSX and previous Linux desktops. And while it might be a bit rough, it&#8217;s early days and anything would be better than sticking with the existing Gnome2 panels. </p>
<p>The obvious comparison is Gnome3. The two desktops are quite different but they would do well to borrow more of each others&#8217; ideas. I like how moving the mouse to the top left in Gnome gives you the window layout and application launchers, on Unity it only reveals the launcher bar. Gnome3 also seems a bit smoother and snappier on my machine, but sticking with what appears to be the same legacy systray seems a bit 1995. </p>
<p>Give me Gnome3&#8242;s smoothness and app launcher, Unity&#8217;s notification area and desktop switching and KDE4&#8242;s flexibility (while retaining sensible defaults), and we&#8217;ll have a winner.</p>
<p>Personally I&#8217;ll be sticking with Unity. It&#8217;s good to see innovation on this front even if it is a bit painful in the short term.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/828/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=828&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/04/19/a-quick-look-at-unity-in-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/04/unity1.png" medium="image">
			<media:title type="html">unity1</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/04/unity2.png" medium="image">
			<media:title type="html">unity2</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/04/unity3.png" medium="image">
			<media:title type="html">unity3</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/04/unity4.png" medium="image">
			<media:title type="html">unity4</media:title>
		</media:content>
	</item>
		<item>
		<title>Recovering a RAID5 mdadm array with two failed devices</title>
		<link>http://al40.wordpress.com/2011/03/21/recovering-a-raid5-mdadm-array-with-two-failed-devices/</link>
		<comments>http://al40.wordpress.com/2011/03/21/recovering-a-raid5-mdadm-array-with-two-failed-devices/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 14:11:43 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=815</guid>
		<description><![CDATA[Got into an interesting situation with my parents home server today (Ubuntu 10.04). Hardware wise it&#8217;s not the best setup &#8211; two of the drives are in an external enclose connected with eSATA cables. I did encourage Dad to buy a proper enclosure, but was unsuccessful. This is a demonstration of why eSATA is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=815&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Got into an interesting situation with my parents home server today (Ubuntu 10.04). Hardware wise it&#8217;s not the best setup &#8211; two of the drives are in an external enclose connected with eSATA cables. I did encourage Dad to buy a proper enclosure, but was unsuccessful. This is a demonstration of why eSATA is a very bad idea for RAID devices.</p>
<p>What happened was that one of the cables had been bumped, disconnecting one of the drives. Thus the array was running in a degraded state for over a month &#8211; not good. Anyway I noticed this when logging in one day to fix something else. The device wasn&#8217;t visible so I told Dad to check the cable, but unfortunately when he went to secure the cable, he must have somehow disconnected the another one. This caused a second drive to fail so the array immediately stopped.</p>
<p>Despite having no hardware failure, the situation is similar to someone replacing the wrong drive in a raid array. Recovering it was an interesting experience, so here I&#8217;ve documented the process.</p>
<h2>Gathering information</h2>
<p>The information you&#8217;ll need should be contained in the superblocks of the raid devices. First you need to find out which drive failed first, with the mdadm &#8211;examine command. My example was a raid5 array of 4 devices, sdb1, sdc1, sdd1 and sde1:</p>
<p><code>root@server:~# mdadm --examine /dev/sdb1<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
/dev/sdb1:<br />
          Magic : a92b4efc<br />
        Version : 00.90.00<br />
           UUID : 87fa9a4d:d26c14f1:01f9e43d:ac30fbff (local to host server)<br />
  Creation Time : Mon Oct 11 00:13:02 2010<br />
     Raid Level : raid5<br />
  Used Dev Size : 625128960 (596.17 GiB 640.13 GB)<br />
     Array Size : 1875386880 (1788.51 GiB 1920.40 GB)<br />
   Raid Devices : 4<br />
  Total Devices : 3<br />
Preferred Minor : 0</p>
<p>    Update Time : Mon Mar 21 00:03:26 2011<br />
          State : clean<br />
 Active Devices : 2<br />
Working Devices : 2<br />
 Failed Devices : 2<br />
  Spare Devices : 0<br />
       Checksum : 713f331d - correct<br />
         Events : 3910</p>
<p>         Layout : left-symmetric<br />
     Chunk Size : 512K</p>
<p>      Number   Major   Minor   RaidDevice State<br />
this     0       8       17        0      active sync   /dev/sdb1</p>
<p>   0     0       8       17        0      active sync   /dev/sdb1<br />
   1     1       0        0        1      faulty removed<br />
   2     2       8       49        2      active sync   /dev/sdd1<br />
   3     3       0        0        3      faulty removed</code></p>
<p>Look at the last part. Here we can see that this drive is in sync with /dev/sdd1 but out of sync with the other two (sdc1 and sde1) &#8211; the data indicates that sdc1 and sde1 have failed. These drives are the two in the external enclosure&#8230; but I digress.</p>
<p>Performing an examine on sdc1 shows &#8220;active sync&#8221; for all the other drives, clearly this disk has no idea what&#8217;s going on. Also note the update time of February 5 (it is now March!!): </p>
<p><code>root@server:~# mdadm --examine /dev/sdc1<br />
[...]<br />
    Update Time : Sat Feb  5 11:22:29 2011<br />
          State : clean<br />
 Active Devices : 4<br />
Working Devices : 4<br />
 Failed Devices : 0<br />
  Spare Devices : 0<br />
       Checksum : 7105b39b - correct<br />
         Events : 218</p>
<p>         Layout : left-symmetric<br />
     Chunk Size : 512K</p>
<p>      Number   Major   Minor   RaidDevice State<br />
this     1       8       33        1      active sync   /dev/sdc1</p>
<p>   0     0       8       17        0      active sync   /dev/sdb1<br />
   1     1       8       33        1      active sync   /dev/sdc1<br />
   2     2       8       49        2      active sync   /dev/sdd1<br />
   3     3       8       65        3      active sync   /dev/sde1</code></p>
<p>This indicates that it was the first drive to be disconnected, as the drives were all in sync the last time this drive was part of the array. That leaves sde1:</p>
<p><code>root@server:~# mdadm --examine /dev/sde1<br />
[...]<br />
    Update Time : Sun Mar 20 23:53:07 2011<br />
          State : clean<br />
 Active Devices : 3<br />
Working Devices : 3<br />
 Failed Devices : 1<br />
  Spare Devices : 0<br />
       Checksum : 713f30d1 - correct<br />
         Events : 3904</p>
<p>         Layout : left-symmetric<br />
     Chunk Size : 512K</p>
<p>      Number   Major   Minor   RaidDevice State<br />
this     3       8       65        3      active sync   /dev/sde1</p>
<p>   0     0       8       17        0      active sync   /dev/sdb1<br />
   1     1       0        0        1      faulty removed<br />
   2     2       8       49        2      active sync   /dev/sdd1<br />
   3     3       8       65        3      active sync   /dev/sde1</code></p>
<p>When this drive was last part of the array, sdc1 was faulty but the other two were fine. This indicates that it was the second drive to be disconnected.</p>
<h2>Scary stuff</h2>
<p>Despite being marked as faulty, we have to assume that the data on /dev/sde1 is crash-consistent with sdb1 and sdd1 as the array immediately stopped upon failure. The original array won&#8217;t start because it only has two active devices. But we can create a new array with 3/4 of the drives as members and one missing.</p>
<p>This sounds scary and it should. If you have critical data that you&#8217;re trying to recover from this situation I would honestly be buying a whole new set of drives, cloning the data across to them and working from those. Having said that, the likelihood of permanently erasing the data is low if you&#8217;re careful and don&#8217;t trigger a rebuild with an incorrectly configured array (like I almost did).</p>
<p>Important information to note is the configuration of the array, in particular device order, layout and chunk size. If you&#8217;re using defaults (in hindsight probably a good idea to lessen the chance of something going wrong in situations ilke this), you don&#8217;t need to specify them. However you&#8217;ll note that in my example the chunk size in 512K, which differs from the default of 64K.</p>
<h2>Creating a new array with old data</h2>
<p>Here is the command I used to recreate the array:<br />
<code><br />
root@server:~# mdadm --verbose --create /dev/md1 --chunk=512 --level=5 --raid-devices=4 /dev/sdb1 /dev/sdd1 /dev/sde1 missing<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
mdadm: layout defaults to left-symmetric<br />
mdadm: /dev/sdb1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Oct 11 00:13:02 2010<br />
mdadm: /dev/sdd1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Oct 11 00:13:02 2010<br />
mdadm: /dev/sde1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Oct 11 00:13:02 2010<br />
mdadm: size set to 625128960K<br />
Continue creating array? y<br />
mdadm: array /dev/md1 started.<br />
</code><br />
<strong>Oops</strong>. </p>
<p>Can you see what I did there&#8230;. I created the array with the missing drive at the [3], when in actual fact the missing drive is [1] (the device numbering starts at 0). Thus when I tried to mount:<br />
<code>root@server:/# mount -r /dev/md1p1 /mnt -t ext4<br />
mount: wrong fs type, bad option, bad superblock on /dev/md1p1,<br />
       missing codepage or helper program, or other error<br />
       In some cases useful info is found in syslog - try<br />
       dmesg | tail  or so<br />
</code><br />
!!</p>
<p>Upon realising this I looked at mdstat then stopped the array:</p>
<p><code>root@server:/# cat /proc/mdstat<br />
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
md1 : active raid5 sde1[2] sdd1[1] sdb1[0]<br />
      1875386880 blocks level 5, 512k chunk, algorithm 2 [4/3] [UUU_]</p>
<p>unused devices:<br />
root@server:/# mdadm -D /dev/md1<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
/dev/md1:<br />
        Version : 00.90<br />
  Creation Time : Mon Mar 21 02:00:54 2011<br />
     Raid Level : raid5<br />
     Array Size : 1875386880 (1788.51 GiB 1920.40 GB)<br />
  Used Dev Size : 625128960 (596.17 GiB 640.13 GB)<br />
   Raid Devices : 4<br />
  Total Devices : 3<br />
Preferred Minor : 1<br />
    Persistence : Superblock is persistent</p>
<p>    Update Time : Mon Mar 21 02:00:54 2011<br />
          State : clean, degraded<br />
 Active Devices : 3<br />
Working Devices : 3<br />
 Failed Devices : 0<br />
  Spare Devices : 0</p>
<p>         Layout : left-symmetric<br />
     Chunk Size : 512K</p>
<p>           UUID : e469103f:2ddf45e9:01f9e43d:ac30fbff (local to host server)<br />
         Events : 0.1</p>
<p>    Number   Major   Minor   RaidDevice State<br />
       0       8       17        0      active sync   /dev/sdb1<br />
       1       8       49        1      active sync   /dev/sdd1<br />
       2       8       65        2      active sync   /dev/sde1<br />
       3       0        0        3      removed<br />
root@server:/# mdadm --stop /dev/md1</code></p>
<p>I then recreated the array with the missing drive in the correct position:</p>
<p><code>root@server:/#  mdadm --verbose --create /dev/md1 --chunk=512 --level=5 --raid-devices=4 /dev/sdb1 missing /dev/sdd1 /dev/sde1<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
mdadm: layout defaults to left-symmetric<br />
mdadm: /dev/sdb1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Mar 21 02:00:54 2011<br />
mdadm: /dev/sdd1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Mar 21 02:00:54 2011<br />
mdadm: /dev/sde1 appears to be part of a raid array:<br />
    level=raid5 devices=4 ctime=Mon Mar 21 02:00:54 2011<br />
mdadm: size set to 625128960K<br />
Continue creating array? y<br />
mdadm: array /dev/md1 started.</code></p>
<p>And examined the situation:</p>
<p><code>root@server:/# cat /proc/mdstat<br />
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
md1 : active raid5 sde1[3] sdd1[2] sdb1[0]<br />
      1875386880 blocks level 5, 512k chunk, algorithm 2 [4/3] [U_UU]</p>
<p>unused devices:<br />
root@server:/# fdisk /dev/md1<br />
GNU Fdisk 1.2.4<br />
Copyright (C) 1998 - 2006 Free Software Foundation, Inc.<br />
This program is free software, covered by the GNU General Public License.</p>
<p>This program is distributed in the hope that it will be useful,<br />
but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />
GNU General Public License for more details.</p>
<p>Using /dev/md1<br />
Command (m for help): p                                                   </p>
<p>Disk /dev/md1: 1920 GB, 1920389022720 bytes<br />
255 heads, 63 sectors/track, 233474 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />
/dev/md1p1               1      233475  1875387906   83  Linux<br />
Warning: Partition 1 does not end on cylinder boundary.<br />
Command (m for help): q<br />
root@server:/# mount -r /dev/md1p1 /mnt<br />
root@server:/# ls /mnt<br />
Alex  Garth  Hamish  Jenny  lost+found  Public  Simon<br />
root@server:/# umount /mnt</code></p>
<p>Phew!</p>
<p>So despite creating a bad array I was still able to stop it and create a new array with the correct configuration. I don&#8217;t believe there is any corruption as no writes occurred, and the array didn&#8217;t rebuild.</p>
<h2>Adding the first-disconnected drive back in</h2>
<p>The array is of course still in a degraded state at this point and no more secure than RAID0. We still need to add the disk that was disconnected first back in to the array. Compared to the rest of the saga this is straightforward:</p>
<p><code>root@server:/# mdadm -a /dev/md1 /dev/sdc1<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
mdadm: added /dev/sdc1<br />
root@server:/# cat /proc/mdstat<br />
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
md1 : active raid5 sdc1[4] sde1[3] sdd1[2] sdb1[0]<br />
      1875386880 blocks level 5, 512k chunk, algorithm 2 [4/3] [U_UU]<br />
      [&gt;....................]  recovery =  0.0% (442368/625128960) finish=164.7min speed=63196K/sec</p>
<p>unused devices: </code></p>
<p>Here we can see a happily rebuilding RAID5 array. Note that you will need to update /etc/mdadm/mdadm.conf file with the new uuid, the line can be simply generated with:</p>
<p><code>root@server:/# mdadm --detail --scan<br />
mdadm: metadata format 01.02 unknown, ignored.<br />
ARRAY /dev/md1 level=raid5 num-devices=4 metadata=00.90 spares=1 UUID=7271bab9:23a4b554:01f9e43d:ac30fbff</code></p>
<p>You can keep an eye on the rebuild with &#8216;watch cat /proc/mdstat&#8217;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/815/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=815&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/03/21/recovering-a-raid5-mdadm-array-with-two-failed-devices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick analysis of a phishing attack</title>
		<link>http://al40.wordpress.com/2011/03/20/quick-analysis-of-a-phishing-attack/</link>
		<comments>http://al40.wordpress.com/2011/03/20/quick-analysis-of-a-phishing-attack/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 03:18:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=790</guid>
		<description><![CDATA[Twice in three days I have received emails purporting to be from ASB and ANZ Bank. Both are New Zealand banks, and the fact that I&#8217;ve received two of them clearly indicates that my email address is on a spam database somewhere and geographically tagged New Zealand. Easy enough &#8211; my .co.nz domain uses it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=790&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Twice in three days I have received emails purporting to be from ASB and ANZ Bank. Both are New Zealand banks, and the fact that I&#8217;ve received two of them clearly indicates that my email address is on a spam database somewhere and geographically tagged New Zealand. Easy enough &#8211; my .co.nz domain uses it as the registration address, and it has a New Zealand residential address on it.</p>
<p>I see these all the time, but the execution of this particular attack struck me as unusually slick however, hence the blog post.</p>
<h2>The email</h2>
<p>The ANZ email subject was &#8220;Please remove your Online Banking Limitation! Last warning!&#8221;, whereas the ASB email was titled &#8220;Online banking suspension warning!&#8221;. Both are clearly designed to panic the user into clicking the link and entering their banking details. The ANZ subject has a hint of ESOL and the grammar in the emails is sub-standard, I suspect the origin is a country where English is not the first language.</p>
<p>The first point of interest is the fact that the emails got through to me at all &#8211; Google&#8217;s spam filtering is second to none. As best I can tell they used hacked legitimate mail servers, and sent the emails one at a time. Below are the headers from the ASB email:<br />
<code><br />
Delivered-To: my@email.com<br />
Received: by 10.100.215.9 with SMTP id n9cs87086ang;<br />
Thu, 17 Mar 2011 16:50:07 -0700 (PDT)<br />
Received: by 10.227.172.193 with SMTP id m1mr389850wbz.201.1300405806261;<br />
Thu, 17 Mar 2011 16:50:06 -0700 (PDT)<br />
Return-Path:<br />
Received: from mars.servers.rbl-mer.misp.co.uk (mars.servers.rbl-mer.misp.co.uk [188.65.116.66])<br />
by mx.google.com with ESMTPS id k6si3701648wbc.86.2011.03.17.16.50.05<br />
(version=TLSv1/SSLv3 cipher=OTHER);<br />
Thu, 17 Mar 2011 16:50:06 -0700 (PDT)<br />
Received-SPF: pass (google.com: best guess record for domain of squiddyc@mars.servers.rbl-mer.misp.co.uk designates 188.65.116.66 as permitted sender) client-ip=188.65.116.66;<br />
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of squiddyc@mars.servers.rbl-mer.misp.co.uk designates 188.65.116.66 as permitted sender) smtp.mail=squiddyc@mars.servers.rbl-mer.misp.co.uk<br />
Received: from squiddyc by mars.servers.rbl-mer.misp.co.uk with local (Exim 4.69)<br />
(envelope-from )<br />
id 1Q0MxA-0008N3-F7<br />
for my@email.com; Thu, 17 Mar 2011 23:50:04 +0000<br />
To: my@email.com<br />
Subject: Online banking suspension warning!<br />
From: ASB Bank<br />
Reply-To:<br />
MIME-Version: 1.0<br />
Content-Type: text/html<br />
Content-Transfer-Encoding: 8bit<br />
Message-Id:<br />
Date: Thu, 17 Mar 2011 23:50:04 +0000<br />
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report<br />
X-AntiAbuse: Primary Hostname - mars.servers.rbl-mer.misp.co.uk<br />
X-AntiAbuse: Original Domain - gmail.com<br />
X-AntiAbuse: Originator/Caller UID/GID - [827 823] / [47 12]<br />
X-AntiAbuse: Sender Address Domain - mars.servers.rbl-mer.misp.co.uk<br />
</code></p>
<p>Basically as close to legitimate as you can get, the only clue is the spoofed &#8220;From&#8221; header, but this is trivial. The ANZ email came from mail.gpschile.com, which appears to belong to a legitimate company in Chile. Misp.co.uk appears to be owned by UK Webhosting Ltd. Given that these attacks are usually done in a macro fashion, they are probably legitimate mail servers that have been compromised.</p>
<p>Certainly, this is not your run-of-the-mill spam run.</p>
<h2>The Link</h2>
<p>I&#8217;ll use the ANZ email for analysis here as it&#8217;s the one still going at the time of writing.</p>
<p>The link from the email points to a server which immediately redirects you to another server as can see in the curl transaction below:</p>
<p><a href="http://al40.files.wordpress.com/2011/03/redirect.png"><img src="http://al40.files.wordpress.com/2011/03/redirect.png?w=630&#038;h=409" alt="" title="redirect" width="630" height="409" class="aligncenter size-full wp-image-805" /></a></p>
<p>The reason for the redirect is to defeat phishing filters. When a site is reported as a forgery it is almost always going to be the redirected url and not the url from the email because users will click &#8220;help &gt; report web forgery&#8221; and submit the page from there. This however still leaves the domain in the original link off the black list, so once the site is blocked the attacker is free to redirect to a new domain that is not yet blacklisted, increasing the window of attack for each email that is sent. </p>
<p>This makes the server performing the redirects quite interesting &#8211; it is likely that it is owned by the attacker or totally compromised (basically rooted).</p>
<p><a href="http://al40.files.wordpress.com/2011/03/redirect-server.png"><img src="http://al40.files.wordpress.com/2011/03/redirect-server.png?w=630" alt="" title="redirect-server"   class="aligncenter size-full wp-image-799" /></a></p>
<p>The domain was registered by proxy just 7 days ago:<br />
<code><br />
Registrant:<br />
Domains by Proxy, Inc.<br />
DomainsByProxy.com<br />
15111 N. Hayden Rd., Ste 160, PMB 353<br />
Scottsdale, Arizona 85260<br />
United States<br />
[...]<br />
      Created on: 13-Mar-01<br />
      Expires on: 13-Mar-13<br />
      Last Updated on: 09-Mar-10<br />
</code></p>
<p>The anonymous registration, age of the domain, and lack of evidence of any legitimate use, all support the notion that this machine and the domain name are paid for and controlled by the attackers.</p>
<p><a href="http://al40.files.wordpress.com/2011/03/screenshot-index-of-mozilla-firefox-private-browsing.png"><img class="aligncenter size-medium wp-image-795" title="Screenshot-Index of --Mozilla Firefox (Private Browsing)" src="http://al40.files.wordpress.com/2011/03/screenshot-index-of-mozilla-firefox-private-browsing.png?w=300&#038;h=269" alt="" width="300" height="269" /></a><br />
Not much there&#8230;</p>
<h2>The Site</h2>
<p>Next we have the server hosting the phishing site itself. Hard to tell if this is compromised server or not &#8211; it appears to be with a dedicated hosting provider called theplanet (now softlayer). The OS and Apache installations seems different from the redirect server, but what is interesting is that mod_auth_passthrough is installed. </p>
<p><a href="http://al40.files.wordpress.com/2011/03/page-host1.png"><img src="http://al40.files.wordpress.com/2011/03/page-host1.png?w=630&#038;h=412" alt="" title="page-host" width="630" height="412" class="aligncenter size-full wp-image-803" /></a></p>
<p>I would appear that mod_auth_passthrough is used to pass the authentication details that the user enters through to the bank&#8217;s actual web site. I did a test of this (with dummy credentials obviously), and got an error page from the bank. This means that on entering their details correctly, a victim will probably be logged in to the real site, thus they are less likely to be aware that they&#8217;ve been phished, and also less likely to phone the bank because they couldn&#8217;t log in.</p>
<p>It should also mean that the bank has a clear method of identifying users that have been phished &#8211; look through the logs for a referrer (or lack of). The banks could probably help mitigate this particular attack by checking the cookie to make sure that the user actually visited the login page before the credentials were entered, and warn them if they arrived from an unknown login page, or even lock the account immediately.</p>
<p>A screenshot of what you&#8217;d see in a web browser is below:<br />
<a href="http://al40.files.wordpress.com/2011/03/screenshot.png"><img class="aligncenter size-medium wp-image-794" title="Screenshot" src="http://al40.files.wordpress.com/2011/03/screenshot.png?w=300&#038;h=222" alt="" width="300" height="222" /></a><br />
Basically, a copy of the bank&#8217;s site as you&#8217;d expect.</p>
<h2>Summary</h2>
<p>This is a well organised and sophisticated attack. The phishers clearly have a whole swathe of compromised domain names, mail servers and web servers under their control in addition to control servers performing redirections. Spam filters and phishing blacklists aren&#8217;t doing much to help here, the best defense, as always, is common sense.</p>
<p>I have emailed the owners of all compromised domains that I know of notifying them that their domain is hosting a phishing site. One got back to me about 18 hours later and I notice that the domain now redirects to a helpful page about phishing and how to spot web forgeries. At least that&#8217;s one batch of phishing emails that no longer work, but it could have caught a lot of people in 18 hours, and I&#8217;ve no reason to doubt that other domains will last longer.</p>
<p>The problem is that the usual response of reporting each site to Google or Microsoft doesn&#8217;t really work here. I don&#8217;t even know if a redirect server qualifies as a &#8220;web forgery&#8221; by their definitions. The best way to take them down seems to be talking to the admins of the compromised domains and getting them to remove the fraudulent entries.</p>
<h2>Update</h2>
<p>12 hours later and it&#8217;s still there&#8230;</p>
<h2>Update 2</h2>
<p>Now receiving emails purporting to be from Trademe with an almost identical MO. Either this is an off-the-shelf phishing solution or the group responsible is casting a wide net!</p>
<p>Subjects so far:</p>
<ul>
<li>Please restore your account access!</li>
<li>Please restore your account access! Last warning!</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/790/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=790&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/03/20/quick-analysis-of-a-phishing-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/03/redirect.png" medium="image">
			<media:title type="html">redirect</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/03/redirect-server.png" medium="image">
			<media:title type="html">redirect-server</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/03/screenshot-index-of-mozilla-firefox-private-browsing.png?w=300" medium="image">
			<media:title type="html">Screenshot-Index of --Mozilla Firefox (Private Browsing)</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/03/page-host1.png" medium="image">
			<media:title type="html">page-host</media:title>
		</media:content>

		<media:content url="http://al40.files.wordpress.com/2011/03/screenshot.png?w=300" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>Splitting files with dd</title>
		<link>http://al40.wordpress.com/2011/03/17/esxi-and-splitting-a-file-with-dd/</link>
		<comments>http://al40.wordpress.com/2011/03/17/esxi-and-splitting-a-file-with-dd/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 16:36:46 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=779</guid>
		<description><![CDATA[We have an ESXi box hosted with Rackspace, it took a bit of pushing to get them to install ESXi it in the first place as they tried to get us to use their cloud offering. But this is a staging environment and we want something dedicated on hardware we control so we can get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=779&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We have an ESXi box hosted with Rackspace, it took a bit of pushing to get them to install ESXi it in the first place as they tried to get us to use their cloud offering. But this is a staging environment and we want something dedicated on hardware we control so we can get an idea of performance without other people&#8217;s workloads muddying the water.</p>
<p>Anyway, I&#8217;ve been having a bit of fun getting our server template uploaded to it, which is only 11GB compressed &#8211; not exactly large, but apparently large enough to be inconvenient.</p>
<p>In my experience the datastore upload tool in the vSphere client frequently fails on large files. In this case I was getting the &#8220;Failed to log into NFC server&#8221; error, which is probably due to a requisite port not being open. I didn&#8217;t like that tool anyway, move on.</p>
<p>The trusty-but-slow scp method was also failing however. Uploads would start but consistently stall at about the 1GB mark. Not sure if it&#8217;s a buffer or something getting filled in dropbear (which is designed to be a lightweight ssh server and really shouldn&#8217;t need to deal with files this large), but Googling didn&#8217;t turn up much.</p>
<p>So I went down the track of splitting up the file into smaller chunks, easily done using the split tool. Except I didn&#8217;t know about the split tool and used dd.</p>
<p>So if you&#8217;re reading this you probably want to use split, but if for some reason you need to do this on an environment that doesn&#8217;t have split and does have dd (like ESXi), this could help:</p>
<p><code><br />
#!/bin/bash</p>
<p>FILE="$1"</p>
<p>#How big we want the chunks to be in bytes<br />
CHUNKSIZE=$(( 512 * 1024 * 1024 ))</p>
<p>#Block size for dd in bytes<br />
BS=$(( 8 * 1024 ))</p>
<p>#Convert CHUNKSIZE to blocks<br />
CHUNKSIZE=$(( $CHUNKSIZE / $BS ))</p>
<p># Skip value for dd, we start at 0<br />
SKIP=0</p>
<p>#Calculate total size of file in blocks<br />
FSIZE=`stat -c%s "$1"`<br />
SIZE=$(( $FSIZE / $BS ))</p>
<p>#Loop counter for file name<br />
i=0</p>
<p>echo "Using chunks of "$CHUNKSIZE" blocks"<br />
echo "Size is "$FSIZE" bytes = "$SIZE" blocks"</p>
<p>while [ $SKIP -le $SIZE ]<br />
do<br />
	    NEWFILE="$FILE".part"$i"<br />
	    i=$(( $i + 1 ))</p>
<p>	    echo "Creating file "$NEWFILE" starting after block "$SKIP""<br />
	    dd if="$FILE" of="$NEWFILE" bs="$BS" count="$CHUNKSIZE" skip=$SKIP</p>
<p>	    SKIP=$(( $SKIP + $CHUNKSIZE ))<br />
done<br />
</code></p>
<p>Afterwards:</p>
<p><code>scp ./*.part* user@host:/vmfs/datastore/</code></p>
<p>Then at the other end you simply concatenate them together. I generated a list of files with `ls -tr1 *.part*` and simply pasted that into a script. Obviously the order is critical, but reverse sorting by time (which is what the r and t options do) gives the correct order.</p>
<p><code>#!/bin/bash</p>
<p>#FLIST=`ls -tr1 *.part*`<br />
FLIST="devbox.tgz.part0 devbox.tgz.part1 devbox.tgz.part2 devbox.tgz.part3 devbox.tgz.part4 devbox.tgz.part5 devbox.tgz.part6 devbox.tgz.part7 devbox.tgz.part8 devbox.tgz.part9 devbox.tgz.part10 devbox.tgz.part11 devbox.tgz.part12 devbox.tgz.part13 devbox.tgz.part14 devbox.tgz.part15 devbox.tgz.part16 devbox.tgz.part17 devbox.tgz.part18 devbox.tgz.part19 devbox.tgz.part20 devbox.tgz.part21"</p>
<p>OUTPUT="output.tgz"</p>
<p>for F in $FLIST<br />
do<br />
            cat $F &gt;&gt; $OUTPUT<br />
done</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/779/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=779&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/03/17/esxi-and-splitting-a-file-with-dd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>The Search for an Android News Reader</title>
		<link>http://al40.wordpress.com/2011/02/07/the-search-for-an-android-news-reader/</link>
		<comments>http://al40.wordpress.com/2011/02/07/the-search-for-an-android-news-reader/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 19:48:18 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[rss reader]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=756</guid>
		<description><![CDATA[Seriously you&#8217;d think this would be easy. FeedingIt on the N900 wasn&#8217;t amazing but it did the job and was totally free. I don&#8217;t think my requirements are unreasonable here: RSS support &#8211; not just via Google Reader Ethical developer &#8211; i.e. supports the app and doesn&#8217;t demand excessive permissions for advertising purposes White text [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=756&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Seriously you&#8217;d think this would be easy. FeedingIt on the N900 wasn&#8217;t amazing but it did the job and was totally free. I don&#8217;t think my requirements are unreasonable here:</p>
<ul>
<li>RSS support &#8211; not just via Google Reader</li>
<li>Ethical developer &#8211; i.e. supports the app and doesn&#8217;t demand excessive permissions for advertising purposes</li>
<li>White text on black background (for better battery life on AMOLED)</li>
<li>A decent user interface (NewsRob is great)</li>
<li>Offline cache, configurable sync schedule &#8211; I don&#8217;t want it to update constantly during the day and chew my battery, just download articles twice daily before I jump on the tube.</li>
<li>A reasonable price (yes I am prepared to pay)</li>
</ul>
<p>Seriously if anyone can find one that fits these criteria please enlighten me, because I sure can&#8217;t. The ones I&#8217;ve considered so far:</p>
<ul>
<li><strong>NewsRob</strong>
<ul>
<li>The current frontrunner. Ad-supported and paid versions, user interface is nice and clean. I&#8217;m currently using the ad-supported version (<em>gasp</em>), until I find another. The problems? <del>No black background</del> (discovered the pro version actually does have a night theme), sync is partially configurable but can&#8217;t set specific times, based on Google Reader.</li>
</ul>
</li>
<li><strong>Feedr</strong>
<ul>
<li>Looked perfect and was apparently one of the better ones, but is no longer updated. Rumour has it that the developer is also behind RssDemon&#8230;</li>
</ul>
</li>
<li><strong>RssDemon</strong>
<ul>
<li>From what I can gather from the reviews on the marketplace, the developer of this app prefers to release a new app so everyone has to buy it again rather than improve the original. The app demands location permissions which is totally unnecessary for a news reader, and according to one reviewer purchasing the elite license does not properly remove the ad components. Strike.</li>
</ul>
</li>
<li><strong>BlueRSS GR</strong>
<ul>
<li>Developer seemed to have a good thing going with BlueRSS then inexplicably threw all that away by removing the old version and starting again with a new &#8220;GR&#8221; version that is not getting good reviews. There is no option for a black interface, but I didn&#8217;t like it anyway &#8211; 3D icons very 1998. Absolutely zero reasons to use this over NewsRob.</li>
</ul>
</li>
<li><strong>eSobi</strong>
<ul>
<li>Poor reviews, expensive (free is only trial), bloated, too many permissions. Again, zero reasons to use this over NewsRob.</li>
</ul>
</li>
</ul>
<p>Yes I&#8217;m picky but this seriously should not be that hard. News reading on Android &#8211; fail.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/756/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/756/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=756&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/02/07/the-search-for-an-android-news-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Nexus S &#8211; the AL4 review</title>
		<link>http://al40.wordpress.com/2011/02/07/google-nexus-s-the-al4-review/</link>
		<comments>http://al40.wordpress.com/2011/02/07/google-nexus-s-the-al4-review/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 19:43:27 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[nexus s]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=729</guid>
		<description><![CDATA[So I am taking the piss a bit with the title, but it seems to be  increasingly common these days for review sites to self-title their review. Whether this increases pagerank or simply gives the reviewer a sense of self-importance I don&#8217;t know, but  why not jump on the bandwagon? In a moment of weakness [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=729&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>So I am taking the piss a bit with the title, but it seems to be  increasingly common these days for review sites to self-title their review. Whether this increases pagerank or simply gives the reviewer a sense of self-importance I don&#8217;t know, but  why not jump on the bandwagon?</em></p>
<p>In a moment of weakness I went and signed up to a 24-month contract on O2 a month ago, with the main attraction being the &#8220;free&#8221; Nexus S that was part of the deal. I did the math, and assuming my current rate of £15 per month spent on pre pay would continue, it worked out cheaper than buying the phone outright by a significant margin. Even after the post-xmas price drop.</p>
<p>My previous device is a Nokia N900, with the result that my standards for usability are rather low, but my standards for functionality are extremely high. There really is nothing the N900 can&#8217;t do with enough knowledge, but compared to the Nexus S it is slow and unwieldy for even the most basic functions such as email and calendaring.</p>
<p>As per usual, in this review I make no attempt to provide a complete or even unbiased review. These are my impressions, nothing more, and the review will be of most interest to you if you&#8217;re currently an open-source friendly N900 user in their 20s living in London. Yeah, it&#8217;s basically the comparison that I would have wanted to read before I switched.</p>
<p>On with the revie&#8230; er.. comparison.</p>
<h2>Hardware</h2>
<p>First impression of the hardware is good. It&#8217;s light, but then the N900 is a brick. It also feels lighter than my mate&#8217;s Nexus One, yet apparently they&#8217;re 1g different. Weird. It&#8217;s much thinner then the N900 too. I no longer have a brick in my pocket.</p>
<p>The screen blends seamlessly into the front. It appears to be durable as I&#8217;ve already dragged it off the table via charger cable onto a linoleum floor and there are no discernible marks on the body anywhere. Plastic may not look or feel as nice but it is certainly light and durable, and these are arguably more desirable attributes.</p>
<p>It&#8217;s comfortable to hold in the hand and I love the curved screen. If I had any complaints, one would be the lack of a texture to grip, it&#8217;s like a bar of soap at times. The screen edge is also very close to the sides, I&#8217;ve had a few accidental touches register when merely gripping the phone. This was solved by a silicone case which I&#8217;ll mention again later.</p>
<p>What I do miss is the physical keyboard, and I knew I would even before I bought it. But phones with hardware keyboards aren&#8217;t nearly as pocketable, so I&#8217;ve resigned myself to making do without one. Swype seems like a fairly good replacement, however soon after installing the beta (along with Handsent SMS), the phone started doing the <a href="http://www.google.com/support/forum/p/Google+Mobile/thread?tid=1b777a366748b64f&amp;hl=en">reboot thing</a>.</p>
<p>Unfortunately uninstalling them both didn&#8217;t have any effect, and the phone still occasionally reboots to this day so I have to chalk it up to coincidence and wait for the fix from Google. Handsent won&#8217;t be getting reinstalled however, it struck me as bloated, ugly and just felt &#8220;spammy&#8221;, so I don&#8217;t think I&#8217;ll be going back.</p>
<p>Woops, looks like we&#8217;ve already moved on to;</p>
<h2>Software</h2>
<p>I don&#8217;t think I&#8217;m in much of a position to comment on Gingerbread vs previous versions of Android as other than a crap-pad running Android 2.1 I haven&#8217;t used any of them extensively, so my focus is more on the comparison with Maemo. The reality though is that there really is no comparison. The resources that Google has poured into Android make 2.3 a much more polished and fluid OS, and it works very well.</p>
<p>Speed is critical on a mobile device. Whereas it would take ages to open the email app and download my email on the N900, with the Nexus S I don&#8217;t even have to open email and download &#8211; because it&#8217;s already pushed to my phone as soon as it&#8217;s received. Yes the N900 can autosync but it&#8217;s still a pull sync and chews battery. Simply opening your inbox can take 5-10 seconds, with Gmail on Android it&#8217;s basically instant.</p>
<p>The biggest paradigm shift coming from the N900 is the way that applications are managed. Maemo behaves basically like a desktop OS. Open an app and it stays open, and is fee to do whatever it likes, sleeping requires the app developer to tell their app to sleep when it&#8217;s not in focus. On Android, this is all managed by the system.</p>
<p>After using Google maps and going back to the home screen, the GPS turns off, and from that point on it will use no more battery than if you had never opened maps in the first place. The exception is if you&#8217;re using something like Google Latitude or another app that tracks your location. Some ad-supported apps will demand permission to send your location to advertisers, and along with the privacy implications, this will also drain your battery faster.</p>
<p>If you don&#8217;t use maps for a while and open some apps, Android removes maps from memory to make room for them. And that&#8217;s the difference &#8211; the N900 required you to be smart about what apps you left open, Android is smart enough to do it for you. There is simply no need to close background apps and manage what&#8217;s running manually as you&#8217;d be wasting battery power if you have to reopen them.</p>
<p>I will say that I preferred the N900&#8242;s app switching mechanism. All you had to do was press on the top left and you got the task switcher. With Android you press home to go back to the desktop, and if the shortcut isn&#8217;t in front of you, you have to hold down the home button again for a couple of seconds to get to the recent apps screen. Or go digging through the menu.</p>
<h3>The Gaps</h3>
<p>What DOES annoy me about Android is the obvious holes in the OS that Google seemingly (and unnecessarily) leaves to third party developers. A few examples are;</p>
<ul>
<li>The music player. It&#8217;s ugly and featureless, I preferred the N900&#8242;s.</li>
<li>The lack of a sync scheduler. Apparently Google assumes that if you setup a work email account on your phone you&#8217;re going to want to receive notifications 24/7 or control it manually.</li>
<li>The lack of a file browser.</li>
</ul>
<p>The N900 by comparison has Mail for Exchange which has had peak / off-peak sync scheduling capabilities for as long as I can recall. It&#8217;s an essential feature. The music player is admittedly simple but strikes me as an honest attempt to write something people will want to use.</p>
<p>I could forgive the absent file browser if this was a feature phone not aimed at enthusiasts, but given the target market it&#8217;s a bit baffling.</p>
<p>While I&#8217;m ranting about the built-in apps, the Gallery is also quite bad. First impression is &#8220;ooh shiny&#8221;, then you realise that the shinyness is masking software with a few rough edges. While it looks nicer than &#8220;Photos&#8221; on the N900, it&#8217;s actually less functional and just as frustrating to navigate. As per usual it also picks up all the album art from my music folders. Can&#8217;t we be smart and omit folders with &#8220;music&#8221; or &#8220;audio&#8221; in the path, or at least have the option to exclude them manually?!</p>
<h2>Battery Life</h2>
<p>Shite about sums it up.</p>
<p>My worst run is just 8 hours from charger disconnection to forced shutdown, and for 4 of those hours it was basically idle. Syncing and Latitude were enabled though, and for the last 4 hours I was walking around London and on the tube using maps heavily. I also listened to an hour or so of music but I would still expect better than this.</p>
<p>What it means for me is that a second battery is essential, and really it shouldn&#8217;t be.</p>
<p>If I have navigation off, latitude off, syncing on and listen to music for 2 hours a day I can eke it out for about 36 hours but it&#8217;s basically dead at the end. The N900 did this on a smaller battery and with more left in the tank &#8211; I could get 48 hours with light use but I&#8217;m pretty sure the Nexus S would be dead even if I didn&#8217;t use it at all for 2 days.</p>
<h2>Some notes on Android Apps</h2>
<p>I suffer from an aversion to advertising (somewhat ironic given the industry I now work in), but here are some of the more useful paid and truly free apps I&#8217;ve come across. I should note I have no problem paying for good apps, but I do have a problem with ad-supported apps on a mobile platform.</p>
<p>First of all they&#8217;re not really free if you have to give up your location, personal information and submit to targeted ads. Many (actually most) applications scream &#8220;FREE!&#8221; and do not disclose that they are ad-supported in the description. Secondly, mobile phones are a resource constrained environment, particularly in terms of bandwidth and screen real estate. And thirdly I&#8217;m already bombarded with enough ads throughout the day &#8211; I don&#8217;t need that crap on my dam phone!</p>
<p>Anyway here are some good honest apps that have remained installed on my phone. Either they declare upfront that they are ad-supported and don&#8217;t do dodgy stuff such as location tracking, are genuinely free software, or are paid without ads.</p>
<ul>
<li><strong>Firefox</strong>
<ul>
<li>Yep it&#8217;s Firefox mobile, 4.0b4 at the time of writing. It&#8217;s much faster than 1.1 was on the N900, but this is probably not a fair comparison as the Maemo version is lagging.</li>
</ul>
</li>
<li><strong>Flickr free</strong>
<ul>
<li>Uploads to and browses your Flickr account. Has a paid version available which is basically a donation, if I used it more I definitely would but Flickr is really only for my real photos &#8211; cell phone pics only go on Facebook.</li>
</ul>
</li>
<li><strong>Facebook</strong>
<ul>
<li>If you use Facebook you&#8217;ll probably want to install this app.</li>
</ul>
</li>
<li><strong>Barcode Scanner</strong>
<ul>
<li>Also allows you to scan those QR codes you see around the web which direct your phone to Android apps. Free, no ads, appears to respect privacy.</li>
</ul>
</li>
<li><strong>NoLED</strong>
<ul>
<li>Helps make up for the Nexus S&#8217;s lack of notification LEDs by lighting up parts of the screen when you receive a message, missed call etc. Quite configurable, I have it set to notify only on phone calls and text messages which I wouldn&#8217;t receive elsewhere.</li>
</ul>
</li>
<li><strong>Dimmer</strong>
<ul>
<li>Reduces screen brightness below the default minimum of 30%. The screen is really bright in the dark, and 30% is plenty bright indoors so I have this on most of the time.</li>
</ul>
</li>
<li><strong>Dropbox</strong>
<ul>
<li>I switched to Ubuntu One for file syncing when 10.04 came out but I regretted it. Firstly there is an Android client for Ubuntu One but you have to pay $4 USD per month to get access to it. Dropbox on the other hand offers their Android client to free users as well. Given how mature Dropbox is and its support for OSX and Windows as well it&#8217;s a no-brainer really &#8211; sorry Canonical, I&#8217;m switching back. And if I ever do need more than 2gb of data synced online it will probably be Dropbox that gets my business.</li>
</ul>
</li>
<li><strong>Poweramp</strong>
<ul>
<li>Not free in any sense, has a trial version (I prefer this model to ad-supported). Poweramp is actually a really good music player, and I would recommend it as a worthwhile purchase. It seems to be the best replacement for the built-in player, and is streets ahead of anything on the N900. Has a nice black theme (perfect for AMOLED screens), and a graphic EQ. Also love its lock screen widget which allows control without unlocking the phone. It supports the headset&#8217;s built-in skip/pause button, and starts/stops when the headset is plugged in/unplugged. I do miss the N900&#8242;s virtual playlists though (e.g. playlist of unplayed songs).</li>
</ul>
</li>
<li><strong>RemoteDroid</strong>
<ul>
<li>Remote control your PC using your phone as a touchpad. Nice idea, useful for a media PC if your usual remote fails for some reason.</li>
</ul>
</li>
<li><strong>GPS Status</strong>
<ul>
<li>Ad-supported, but there is a donation app available for purchase which removes the ads so I bought it.</li>
</ul>
</li>
<li><strong>Wifi Analyzer</strong>
<ul>
<li>This is a good app, in fact WifiEye on the N900 was modelled after it. Unfortunately it&#8217;s ad-supported and the developer claims it will always be free. By my definition it is not. The N900 version by comparison is properly free.</li>
</ul>
</li>
<li><strong>Aldiko</strong>
<ul>
<li>Best vendor-neutral e-book reader I&#8217;ve seen. Has all-important night mode and can import any PDF. Also check out Amazon&#8217;s Kindle app if you&#8217;re a Kindle user or purchase e-books from Amazon.</li>
</ul>
</li>
<li><strong>MyTracks</strong>
<ul>
<li>Written by Googlers, this app maps your path and gathers distance and speed stats. Can upload tracks to Google maps. Useful when going running, cycling etc.</li>
</ul>
</li>
<li><strong>WordPress</strong>
<ul>
<li>Open source, GPL. Alarmed me at first that it wanted location permissions, but it has a legitimate reason, no ads, and if I really wanted to I could look at the code.</li>
</ul>
</li>
<li>And for Londoners&#8230;
<ul>
<li><strong>Tube Chaser</strong>
<ul>
<li>Open source client for the London Underground. Quite well polished, but it&#8217;s only useful if you know where you&#8217;re going because  it doesn&#8217;t route and doesn&#8217;t include a tube map due to license cost. But the latter is covered by the next app&#8230;</li>
</ul>
</li>
<li><strong>Bublmap london tube</strong>
<ul>
<li>Basically a jazzed up zoomable tube map, with the difference being that zone 1 is geographically accurate. Does what it says on the tin, it&#8217;s free and doesn&#8217;t display ads.</li>
</ul>
</li>
</ul>
<ul>
<li><strong>London</strong> (www.zuti.co.uk)
<ul>
<li>An interactive tube map which does routing, it was pretty cheap so I paid for it. Unfortunately it&#8217;s tube and overground only however, so I&#8217;m still looking for a good app that does everything the TFL site does.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>Accessories</h2>
<p>Being a relatively popular phone, there are more options compared to the N900, but it still pales in comparison to the iDevices range. What I would really like is a docking station!</p>
<h3>Batteries</h3>
<p>This caught me out. I searched for the model number (AB653850CU) on eBay, and bought the cheapest Samsung-branded battery matching it. I did notice that it was for another phone, and had 60mah less capacity, but the model number was the same so it must fit right?</p>
<p>Unfortunately the 1440mah battery used by the Omnia and 1500mah battery used by the Nexus S appear to be slightly different. This could mean that the battery I bought was a fake, fitted to a mould which fits the Omnia only, or it could mean that Samsung is boneheaded enough to use the same model number for different battery casings.</p>
<p>I did actually manage to get it in but had a bit of trouble getting it out again so I wasn&#8217;t comfortable leaving it in there. If you&#8217;re buying a spare battery for this phone (and it needs one), make sure it&#8217;s designed specifically for the Nexus S.</p>
<h3>Cases</h3>
<p>The only type I&#8217;m interested in are the silicone ones. I had a flip-case for the N900 and it got in the way, and the hard casings are too bulky and ugly. With the Nexus S I regard a silicone case as almost essential because the plastic is so smooth that it can be easy to lose your grip. With the screen so close to the edge I also found that accidental touches were common, a problem which the silicone solves.</p>
<p>It&#8217;s almost impossible to tell which is the best though so I brought the two which appeared to be the most common ones on Amazon:</p>
<ol>
<li><strong>Qubits Soft Silicone Skin cover - £1.99</strong>The Qubits one arrived first. The Qubits range appears to basically be generic sort of stuff that&#8217;s acceptable quality and not absolute junk, and I think that&#8217;s what I got here. It did occasionally remove itself from the phone when I jammed it into my pocket in a hurry though, and dust and lint seemed to be very attracted to it. ﻿Overall it felt decent, did the job, and I thought it was good value for ﻿£2.</li>
<li><strong>Amzer Silicone Skin - ﻿﻿﻿£4.99</strong>The Amzer arrived much later but turned out to be the better case. It&#8217;s less &#8220;sticky&#8221;, so it&#8217;s (marginally) easier to slide in and out of your pocket and doesn&#8217;t attract dust and lint quite as much. It also stays on better, due I believe to being more rigid. So a higher price is definitely warranted but I don&#8217;t know about 2.5x higher. When you&#8217;ve spent ﻿£450 on a phone though, who&#8217;s going to quibble over £3 for a case.</li>
</ol>
<p>So technically the Qubits is better value for money, but really not the smarter choice.</p>
<h2>Verdict</h2>
<p>After reading this you&#8217;d probably be thinking I hate the thing, but to be fair this review has dwelled on the negative because it&#8217;s more interesting. You can find any number of glowing reviews of this phone and Android all over the web, and you probably already know about the features you&#8217;ll like.</p>
<p>The short of it is that the speed and polish of the Nexus S is way ahead of the N900. It does the basics much better, particularly email (even web browsing if you ignore the lack of a stylus), and beyond the basics there is probably going to be an app for that if you submit to ad companies tracking your every move and allow popup Starbucks ads whenever you happen to walk past one of their stores&#8230;. OK so that doesn&#8217;t quite happen yet but how far away do you think it really is?</p>
<p>I am ignoring the reboot bug. Yes it&#8217;s annoying, it happens every couple of days or so, but apparently a fix is in testing as I type and it should be resolved soon. It&#8217;s not the kind of bug that can be left unfixed.</p>
<p>In the end I would have to say that if you really care about your privacy, an Android phone or an iPhone is a really bad idea. Advertising and tracking is almost impossible to avoid unless you don&#8217;t install any apps, don&#8217;t use the web browser and don&#8217;t use any Google services. But then you may as well get a Nokia 1100.</p>
<p>The same is true anyway if you sign in to any Google services, or even use the web with cookies enabled, so welcome to the brave new world of information marketing.</p>
<p>Basically, I&#8217;ve sold my soul for a gadget. But what a sexy gadget.</p>
<p>-Al</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/729/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=729&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/02/07/google-nexus-s-the-al4-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>Likewise Open &#8211; problems rejoining domain after upgrade</title>
		<link>http://al40.wordpress.com/2011/01/18/likewise-open-problems-rejoining-domain-after-upgrade/</link>
		<comments>http://al40.wordpress.com/2011/01/18/likewise-open-problems-rejoining-domain-after-upgrade/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 13:44:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=731</guid>
		<description><![CDATA[There seems to be a common problem with Likewise open not gracefully upgrading on Ubuntu, e.g. &#8211; upgrading a system from the distribution supplied Likewise-open 5 in Ubuntu 10.10 to the latest packages from the Likewise website (Likewise 6.0 at the time of writing). The system in this case was an old Ubuntu 9.10 server [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=731&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There seems to be a common problem with Likewise open not gracefully upgrading on Ubuntu, e.g. &#8211; upgrading a system from the distribution supplied Likewise-open 5 in Ubuntu 10.10 to the latest packages from the Likewise website (Likewise 6.0 at the time of writing).</p>
<p>The system in this case was an old Ubuntu 9.10 server using Likewise Open 5. After some patching and an update to the current vmware tools it started failing to authenticate domain users, so I decided to upgrade to the latest version. However after the upgrade I was getting an error when trying to join the domain:</p>
<blockquote><p>Error: ERROR_FILE_NOT_FOUND code 0&#215;00000002</p></blockquote>
<p>The obvious solution is to remove all likewise packages and purge the config, however that didn&#8217;t seem to work either. What DID work, was removing &amp; purging the config, manually removing a few directories that were not empty, purging a few other seemingly related packages which were marked as no longer required after the uninstall, and finally reinstalling.</p>
<p>The sequence of commands to resolve the error was thus similar to the following (assuming the system is in the state of having the Likewise supplied packages install but unable to join the domain):</p>
<blockquote><p>apt-get remove &#8211;purge likewise-*</p></blockquote>
<p>For some reason a couple of packages weren&#8217;t removed the first time and I had to do this twice.</p>
<p>After that I had a few messages similar to the following:</p>
<blockquote><p>dpkg: warning: while removing likewise-open5-libs, directory &#8216;/var/lib/likewise-open5&#8242; not empty so not removed.</p></blockquote>
<p>Thus:</p>
<blockquote><p>rm -rf /var/lib/likewise-open5 /var/lib/likewise /var/lib/likewise-open</p></blockquote>
<p>Purging no-longer-required packages that are probably dependencies of Likewise:</p>
<blockquote><p>apt-get remove &#8211;purge krb5-user krb5-config libkadm5clnt6 libgssrpc4</p></blockquote>
<p>After that I was able to sh ./LikewiseOpen-6.0.0.8305-linux-amd64-deb.sh, run domainjoin-cli, and all worked perfectly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/731/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=731&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2011/01/18/likewise-open-problems-rejoining-domain-after-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Search from the command line</title>
		<link>http://al40.wordpress.com/2010/11/17/google-search-from-the-command-line/</link>
		<comments>http://al40.wordpress.com/2010/11/17/google-search-from-the-command-line/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 12:53:11 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=720</guid>
		<description><![CDATA[I won&#8217;t go into the details of why you would want to do this, suffice to say that I do and searched for a wee while on the best way to do it. Bizarrely Google&#8217;s own CLI tools don&#8217;t include search. The only 3rd-party solutions I could find open the results in a web browser, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=720&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I won&#8217;t go into the details of why you would want to do this, suffice to say that I do and searched for a wee while on the best way to do it. Bizarrely Google&#8217;s own CLI tools don&#8217;t include search. </p>
<p>The only 3rd-party solutions I could find open the results in a web browser, which isn&#8217;t really what I wanted. So I wrote a REALLY ugly one-line script, but it works for me, so why not share. Maybe it will inspire someone with more talent!</p>
<p>It requires curl and vilistextum which aren&#8217;t in a default Ubuntu install, for more barebones OS&#8217;s you may need to install awk as well.</p>
<p><code>#!/bin/bash</p>
<p>curl -A "Mozilla/4.0" "http://www.google.com/search?q=$1%20$2%20$3" | vilistextum -k - - | awk 'NR &gt; 23' | less<br />
</code></p>
<p>Then chmod +x it, install the script in /usr/bin and you can search from the commandline by typing [nameOfScript] [search terms]. e.g. to search for &#8220;testing 123&#8243; I type:<br />
<code>g testing 123</code></p>
<p>Yes there&#8217;s a lot wrong with this, for a start if you want more than 3 search terms you&#8217;ll have to add another argument (%20$4) after the q= string. I&#8217;m sure there&#8217;s a more elegant way of doing it by using $@, or $# to get the number of arguments and combining them all in a loop. But then it becomes a 5-line script rather than 1.</p>
<p>Also the result is not exactly pretty, but if you use a graphical terminal such as gnome-terminal all the links will be clickable and will open in your default browser.</p>
<p>Alternatively you could pipe the result to lynx, which actually parses html properly, but then any links would open in lynx which is not what I wanted:<br />
<code><br />
#!/bin/bash</p>
<p>curl -A "Mozilla/4.0" "http://www.google.com/search?q=$1%20$2%20$3" | lynx --stdin<br />
</code></p>
<p>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/720/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=720&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2010/11/17/google-search-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
		<item>
		<title>N900 PR1.3 is a screamer</title>
		<link>http://al40.wordpress.com/2010/10/28/n900-pr1-3-is-a-screamer/</link>
		<comments>http://al40.wordpress.com/2010/10/28/n900-pr1-3-is-a-screamer/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 23:31:47 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[pr1.3]]></category>

		<guid isPermaLink="false">http://blog.al4.co.nz/?p=711</guid>
		<description><![CDATA[Just installed the OTA (over the air) update on my N900 and the difference in speed is actually user-perceptible. Animations are smoother, rotation happens much more quickly and I could swear applications are starting faster as well. Many people are reporting improved battery life too. There are no new major features that I&#8217;ve noticed, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=711&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just installed the OTA (over the air) update on my N900 and the difference in speed is actually user-perceptible. Animations are smoother, rotation happens much more quickly and I could swear applications are starting faster as well. Many people are reporting improved battery life too. </p>
<p>There are no new major features that I&#8217;ve noticed, so of PR1.2 was a feature release, PR1.3 is very much a fine-tuning release. And despite what the few whiners on the maemo forums might say &#8211; that is not a bad thing!</p>
<p>More at the <a href="http://conversations.nokia.com/2010/10/25/new-nokia-n900-software-update-available/">Nokia conversations blog</a> and <a href="http://www.pocketables.net/2010/10/nokia-n900-gets-maemo-5-pr13-update-bringing-fixes-performance-improvements-and-ability-to-dual-boot.html?cid=6a00d83451c9ec69e20134887c5422970c">pocketables.net</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/al40.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/al40.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/al40.wordpress.com/711/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=al40.wordpress.com&amp;blog=4343850&amp;post=711&amp;subd=al40&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://al40.wordpress.com/2010/10/28/n900-pr1-3-is-a-screamer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b633bcee7e194bd87a075aa88d0669bc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">al4</media:title>
		</media:content>
	</item>
	</channel>
</rss>
