<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random and Irrelevant &#187; Ubuntu</title>
	<atom:link href="http://sgp.me.uk/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://sgp.me.uk</link>
	<description>Sam Pearson's weblog - irrelevant content randomly updated</description>
	<lastBuildDate>Sun, 17 Jan 2010 18:57:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hacking .deb files</title>
		<link>http://sgp.me.uk/2009/08/11/hacking-deb-files/</link>
		<comments>http://sgp.me.uk/2009/08/11/hacking-deb-files/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 19:22:38 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/?p=709</guid>
		<description><![CDATA[This is a follow-up to my previous post about <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">downloading the Ubuntu Flash plugin package from behind a proxy</a>.  Rather than having to go through a failed installation, editing the <code>postinst</code> script then re-installing, here is an alternative method where the package is downloaded, unpacked, the script edited then the package rebuilt and installed in the normal way using <code>apt-get</code>.]]></description>
			<content:encoded><![CDATA[<p>This is a follow-up to my previous post about <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">downloading the Ubuntu Flash plugin package from behind a proxy</a>.  Rather than having to go through a failed installation, editing the <code>postinst</code> script then re-installing, here is an alternative method where the package is downloaded, unpacked, the script edited then the package rebuilt and installed in the normal way using <code>apt-get</code>.</p>
<p>The procedure below uses <code>flashplugin-nonfree</code> as an example package, but this process could be used to edit any <code>.deb</code> with a little care &#8211; just change the package name.</p>
<p>Having said that, it&#8217;s a quick-and-dirty fix-up and as such only really suitable if you only need to make simple changes to the control scripts such as <code>postinst</code>, <code>prerm</code>, etc, in an existing package.  Major changes to a package&#8217;s structure or contents will need more care and you should take a look at the <a href="http://www.debian.org/doc/maint-guide/">Debian Maintainers Guide</a> or any of the other HOWTOs and FAQs available on the web for detailed information on how to do this.</p>
<p>Needless to say you&#8217;ll need to do much of this as <code>root</code>.  Have a care.</p>
<ol>
<li>Download the updated debian package using <code>apt-get -d install flashplugin-nonfree</code>.  This will place the latest version of the package in <code>/var/cache/apt/archives</code> without actually installing it.  Note that if you have multiple updates to do, you can use <code>apt-get -d upgrade</code> instead; this will also download any other packages that are currently due an upgrade at the same time &#8211; this is fine, they will be installed normally at the end of the process along with the modified package.</li>
<li>Change your working directory to <code>/var/cache/apt/archives</code> then make a backup: <code>cp flashplugin-nonfree_$version_i386.deb /root/</code></li>
<li>Create a tempory directory structure where you can unpack the archive: <code>mkdir -p /tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code></li>
<li>Extract the contents of the <code>.deb</code>: <code>ar -x flashplugin-nonfree_$version_i386.deb</code>.  This will result in three files, <code>debian-binary</code>, <code>data.tar.gz</code> and <code>control.tar.gz</code>.  You can delete the <code>debian-binary</code> file.</li>
<li>Move <code>data.tar.gz</code> into <code>/tmp/flashplugin-nonfree_$version_i386/debian/</code> and the <code>control.tar.gz</code> file into <code>/tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code>.  Unpack the archives in these locations and delete the tarballs.</li>
<li>You can now edit the <code>postinst</code> script in <code>/tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code> to include the proxy settings as outlined in <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">Installing the Flash plug-in on Ubuntu from behind a proxy</a>.</li>
<li>Now you are ready to rebuild the package.  Change directory to <code>/tmp/flashplugin-nonfree_$version_i386/</code> and run <code>dpkg-deb --build debian</code>.  This should create a file in the <code>debian/</code> subdirectory called <code>debian.deb</code>.  You may see some warnings about the <code>control</code> file containing user-defined fields &#8211; these can be safely ignored.</li>
<li>Now move the <code>debian.deb</code> file into <code>/var/cache/atp/archives</code> using the same filename as the original package: <code>mv debian.deb /var/cache/atp/archives/flashplugin-nonfree_$version_i386.deb</code>.</li>
<li>You should now be able to run <code>apt-get install flashplugin-nonfree</code> or <code>apt-get upgrade</code>and the package will be installed using the new <code>.deb</code> file complete with proxy information in the <code>postinst</code> script to enable downloading the binary.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2009/08/11/hacking-deb-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Evaluating Atmail as a possible Squirrelmail replacement</title>
		<link>http://sgp.me.uk/2009/01/07/evaluating-atmail-as-a-possible-squirrelmail-replacement/</link>
		<comments>http://sgp.me.uk/2009/01/07/evaluating-atmail-as-a-possible-squirrelmail-replacement/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 21:31:10 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Atmail]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Squirrelmail]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/?p=474</guid>
		<description><![CDATA[I've been using <a title="Squirrelmail website" href="http://www.squirrelmail.org/">Squirrelmail</a> as the webmail interface for my home mail server for a few years now but recently I thought I'd give some of the alternatives out there a try to see whether a switch was in order, so this post is a look at the <a title="Atmail Open website" href="http://atmail.org">Atmail Open webmail client</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a title="Squirrelmail website" href="http://www.squirrelmail.org/">Squirrelmail</a> as the webmail interface for my home mail server for a few years now but recently I thought I&#8217;d give some of the alternatives out there a try to see whether a switch was in order, so this post is a look at the <a title="Atmail Open website" href="http://atmail.org">Atmail Open webmail client</a>.</p>
<p>Atmail provide <a title="Atmail's commercial site" href="http://atmail.com/">commercial email solutions</a> but also make an <a title="Atmail's Open Source offering" href="http://www.atmail.org/">open source version of their webmail client</a> available under the Apache license.  It&#8217;s written in PHP and uses MySQL as a backend, so there were no additional software requirements for my <a href="http://www.ubuntu.com/">Ubuntu</a> 8.04 server.  I&#8217;d read <a title="AtMail Open provides scalable, customizable webmail" href="http://www.linux.com/feature/138167">a write-up on Linux.com</a> a while back and decided to give it a try.</p>
<h3>Installation</h3>
<p>The installation instructions on the web site are fairly basic, as are the instructions contained within the tarball itself.  I was slightly alarmed to see some pages recommending use of the MySQL root account to set up the system (e.g. on the Ubuntu forums in a <a href="http://ubuntuforums.org/showthread.php?t=1019272">post that reads like an ad</a> and copies almost verbatim from <a title="Installing Atmail Open Webmail Client on Ubuntu" href="http://atmail.com/kb/2008/installing-atmail-open-webmail-client-on-ubuntu/">a page on the Atmail site</a>).  It all looked fairly straitforward, so I decided to fit the install into my existing system as follows.</p>
<p>First I unpacked the tarball in <code>/usr/share</code> to make <code>/usr/share/atmailopen</code>.  I then <code>chown</code>&#8216;d this directory to <code>www-data</code>.</p>
<p>Next, I created a new database in MySQL and a user to access it.  I granted the user all privileges on the new database.  I called both the database and the user &#8220;atmail&#8221;.</p>
<p>The next step was to add a stanza to my apache configuration file under <code>/etc/apache/sites-available</code>.  I maintain a single site definiton and <code>Alias</code> in new sections from their homes in the filesystem as required.  It&#8217;s all served over HTTPS for privacy and security.  I just added a stanza with simple auth and an <code>AllowOverrides All</code> statement.  Everything else just inherited my default settings.</p>
<p>The final step was to slightly modify <code>/etc/php5/apache2/php.ini</code> with <code>magic_quotes_gpc = Off</code>.  I had already increased the <code>upload_max_filesize</code>, <code>post_max_size</code> and <code>memory_limit</code> values for use with Squirrelmail &#8211; the first two were also mentioned in the Atmail documentation.</p>
<p>After restarting Apache, I visited the alias I&#8217;d set up for Atmail and followed the instructions.  It was pretty straitforward: plug in the MySQL database and user details I&#8217;d prepared, select my local SMTP server and that was pretty much it.  I was presented with a log-on page and after a struggling for a bit before figuring out that the page wouldn&#8217;t log me in without something after the @, even though my server just expects a username, I got into my inbox.</p>
<h3>First Impressions</h3>
<p>In no particular order, here&#8217;s a mixture of the things that have struck me about Atmail.  I emphasize that these are just impressions, I haven&#8217;t spent much time troubleshooting or tweaking yet.  I may update this list if my views change or I figure out how to solve any issues.</p>
<ul>
<li>The UI looks quite nice, certainly more modern than Squirrelmail.  It&#8217;s quite sluggish at times, particularly when accessed remotely.</li>
<li>My server backend is <a href="http://www.courier-mta.org/imap/">Courier IMAP</a>.  I have a number of nested folder trees already set-up.  Atmail displays all the folders in a long column down the left of the browser window, the nested folders are labelled as &#8220;Parent.Child&#8221;, which is accurate enough but Squirrelmail hides this and allows you to expand and collapse a tree instead.  This is particularly annoying when trying to drag messages to folders the are below the bottom of the window.</li>
<li>Atmail has added it&#8217;s own &#8220;Spam&#8221; folder&#8221; alongside my existing &#8220;Junk&#8221; folder.  My Junk folder always falls off the bottom of the browser window due to the point mentioned above, but the Atmail Spam folder is sticky and always appears above the alphabetized folders.  I&#8217;d rather use the Junk folder, as that is what my other mail applications use.  To workaround I have replaced the <code>.Spam</code> folder in my <code>~/Maildir</code> with a symlink to the <code>.Junk</code> folder.</li>
<li>Atmail also doesn&#8217;t appear to show unread mail counts for folders other than the Inbox &#8211; a cursory inspection of the configuration settings doesn&#8217;t show anything obvious to toggle this.  Again this is something Squirrelmail does offer &#8211; I use <a href="http://www.procmail.org/">Procmail</a> on the server to filter incoming mail, so there are often new messages in various places throughout the tree.</li>
<li>I can&#8217;t find a setting to force mail to be viewed as plain text; there is one to turn off image loading in HTML mail so that&#8217;s something.</li>
<li>I can&#8217;t find any settings related to viewing folders in threads.</li>
<li>It&#8217;s not clear how committed Atmail are to the open source client.  There don&#8217;t appear to have been any updates for a while, and there isn&#8217;t a large community of users.  Squirrelmail seems far more established in these areas.</li>
</ul>
<h3>Summary</h3>
<p>Atmail is OK, but I&#8217;m not overwhelmed.  I&#8217;m not sure there&#8217;s a compelling reason to switch &#8211; I&#8217;m used to Squirrelmail and quite like it, it has an active development and support community and Atmail doesn&#8217;t appear to offer anything over and above it functionally, in fact when you consider Squirrelmail&#8217;s plugin ecosystem it probably comes in second.  I will leave it installed and continue to use both side by side for a while and we&#8217;ll see which option ends up being my preferred one.  Once I&#8217;ve made a final choice, I&#8217;ll update this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2009/01/07/evaluating-atmail-as-a-possible-squirrelmail-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing the Flash plug-in on Ubuntu from behind a proxy</title>
		<link>http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/</link>
		<comments>http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 10:57:09 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/?p=468</guid>
		<description><![CDATA[There is a package for the Adobe Flash Player plug-in for Mozilla-based browsers in the Ubuntu repositories.  If you install the package it downloads the plug-in directly from Adobe and installs it on your system.  I tried to do this on a machine behind a proxy that requires authentication and it failed, despite having set [...]]]></description>
			<content:encoded><![CDATA[<p>There is a package for the Adobe Flash Player plug-in for Mozilla-based browsers in the Ubuntu repositories.  If you install the package it downloads the plug-in directly from Adobe and installs it on your system.  I tried to do this on a machine behind a proxy that requires authentication and it failed, despite having set up the proxy details in Synaptic, as well as in an <code>http_proxy</code> environment variable for both my user account and the root account in the respective <code>.bashrc</code> files.</p>
<p>There&#8217;s probably an easier way to do this, but to get around the problem I manually edited the <code>flashplugin-nonfree.postinst</code> file in <code>/var/lib/dpkg/info</code> following the failed installation attempt.  This file is a shell script, part of which sets up a <code>wgetrc</code> file for use by <code>wget</code> when downloading the plugin from the Adobe website.  As root, add a section for your http proxy in here, something like as follows:</p>
<pre># setting wget options
:&gt; wgetrc
echo "noclobber = off" &gt;&gt; wgetrc
echo "dir_prefix = ." &gt;&gt; wgetrc
echo "dirstruct = off" &gt;&gt; wgetrc
echo "verbose = on" &gt;&gt; wgetrc
echo "progress = dot:default" &gt;&gt; wgetrc
echo "http_proxy=http://user:passwd@proxy.tld:port" &gt;&gt; wgetrc</pre>
<p>Then in Synaptic you can mark the flashplugin-nonfree package for reinstallation and it should download and install without further problems.</p>
<p>You may be able to download the package (<code>apt-get -d</code>?), unpack it manually, edit the postinst file, then install to avoid having to sit through a failed attempt at installing first &#8211; I haven&#8217;t tried this myself. UPDATE &#8211; I have now &#8211; see <a href="http://sgp.me.uk/2009/08/11/hacking-deb-files/">Hacking .deb files</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Dapper HAL update DOESN&#8217;T break USB mass storage automounting</title>
		<link>http://sgp.me.uk/2006/12/03/broken-dapper-hal-update/</link>
		<comments>http://sgp.me.uk/2006/12/03/broken-dapper-hal-update/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 14:15:26 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2006/12/03/broken-dapper-HAL-update</guid>
		<description><![CDATA[<span style="text-decoration: line-through;">The recent update to <acronym title="Hardware Abstraction Layer">HAL</acronym> available for Ubuntu Dapper seems to break <abbr title="Universal Serial Bus">USB</abbr> mass storage device automounting.  The broken version is <code>0.5.7-1ubuntu18.2</code></span>.  (<em>Oops - no it doesn't... see below</em>).]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: line-through;">The recent update to <acronym title="Hardware Abstraction Layer">HAL</acronym> available for Ubuntu Dapper seems to break <abbr title="Universal Serial Bus">USB</abbr> mass storage device automounting.  The broken version is <code>0.5.7-1ubuntu18.2</code></span>.  (<em>Oops &#8211; no it doesn&#8217;t&#8230; see below</em>).</p>
<p>I haven&#8217;t figured out why yet (I will post when/if I do) (<em>ahem</em>), but here&#8217;s how to downgrade if you&#8217;re affected by this and don&#8217;t want to wait on a fix. (<em>But this bit might still be useful if you ever need to downgrade apt packages and fix them to a specific version while waiting for a fix that you really need.</em>)</p>
<p>Run the following command as root:</p>
<pre><code>apt-get install hal=0.5.7-1ubuntu18 \
libhal1=0.5.7-1ubuntu18 \
libhal-storage1=0.5.7-1ubuntu18</code></pre>
<p>You&#8217;ll need to reboot.  You can use an entry in <code>/etc/apt/preferences</code> to keep these packages to this version until new packages that don&#8217;t break HAL are available.  Create that file if it doesn&#8217;t exist and add the following lines:</p>
<pre><code>Package: hal
Pin: version 0.5.7-1ubuntu18
Pin-Priority: 1000

Package: libhal1
Pin: version 0.5.7-1ubuntu18
Pin-Priority: 1000

Package: libhal-storage1
Pin: version 0.5.7-1ubuntu18
Pin-Priority: 1000</code></pre>
<p>You should really read <code>man 5 apt_preferences</code>, and you should monitor what updates to these packages become available.  I can&#8217;t guarantee that keeping these packages at this version won&#8217;t break anything else.</p>
<p><span style="text-decoration: line-through;">I have to say that this has soured me a little on Ubuntu.  One of the reasons I chose this distro was because I don&#8217;t have anything like as much time to myself as I once did and I don&#8217;t want to spend what time I do have troubleshooting minor conifg issues like this on my machine, and Ubuntu has a reputation as a very stable, well maintained distro.  USB drive automounting might not sound like a very important feature, but it&#8217;s this kind of thing that will put off non-technical users, or even technical ones with small kids and short tempers.  Still, I&#8217;ll try and look into this problem and maybe file a bug report if no one else has already.</span></p>
<p><strong>Update 11th December 2006</strong></p>
<p>I now regret writing that last paragraph.  To be honest I had misgivings almost immediately after posting it as I thought it a bit harsh but I decided to leave it.  Anyway, I have now found that the upgrade did not break USB automounting at all &#8211; it was the device I was using to test it.  My fault.  <acronym title="Problem Exists Between Keyboard And Chair">PEBKAC</acronym>.  The device in question is my Sony Ericsson mobile phone, a K750i.  Quite a nice phone, but it is a little temperamental at times &#8211; prone to occasional crashes and lockups.  Normally this gets mounted as a mass storage device when I plug it in as it contains a 128MB Memory Stick Duo, but every so often it fails for reasons unknown (syslog just says<br />
<code>Device offlined - not ready after error recovery</code>).  Having done some reading up on the way that HAL, D-BUS, udev and gnome-volume-manager work I upgraded HAL again ready to start troubleshooting only to find that everything was working fine, then I encountered the error with my phone and all became clear.  My CF card reader and Seagate external hard disk both work exactly as they should.  The phone mounts most times, but occasionally fails.  I think I&#8217;ll have less luck toubleshooting that than I would HAL et al.  My apologies to Ubuntu for my unwarranted harsh words above.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2006/12/03/broken-dapper-hal-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>External Hard Disk setup</title>
		<link>http://sgp.me.uk/2006/08/14/external-hard-disk/</link>
		<comments>http://sgp.me.uk/2006/08/14/external-hard-disk/#comments</comments>
		<pubDate>Mon, 14 Aug 2006 20:48:28 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2006/08/14/external-hard-disk</guid>
		<description><![CDATA[I recently purchased a <a href="http://www.seagate.com/products/retail/external/usb"> Seagate 250 GB external USB hard disk</a> to use as a backup medium for my home network.  This will be connected to my main Linux box (currently running <a href="http://www.kubuntu.org/">Kubuntu</a> Breezy) and important personal data and system files will be <a href="http://samba.anu.edu.au/rsync/"><code>rsync</code>'d</a> to it on a regular basis.]]></description>
			<content:encoded><![CDATA[<p>I recently purchased a <a href="http://www.seagate.com/products/retail/external/usb"> Seagate 250 GB external USB hard disk</a> to use as a backup medium for my home network.  This will be connected to my main Linux box (currently running <a href="http://www.kubuntu.org/">Kubuntu</a> Breezy) and important personal data and system files will be <a href="http://samba.anu.edu.au/rsync/"><code>rsync</code>&#8216;d</a> to it on a regular basis.</p>
<p>Herewith some notes on configuration, somewhat distro-specific although not uselessly so.  (At least I hope not, as I plan to rebuild my home server fairly soon and may well switch. I&#8217;ve been experimenting with Kubuntu after years as a Slackware user and have not settled on a final decision just yet.)  On that note: please bear in mind that this post is not intended as a definitive HOWTO but should be considered as my notes on what I did to get this working for me under a particular set of circumstances, with far less time to research everything involved than I&#8217;d really have liked.  In other words: Your Milage May Vary.</p>
<p>The disk comes preformatted with the somewhat limited <a href="http://en.wikipedia.org/wiki/File_Allocation_Table"><code>FAT32</code></a> filesystem.  Given that all files being backed-up will be coming from systems running one flavour or another of Linux and that the disk will probably only need to be accessed directly from Linux systems, I&#8217;m going to reformat with <a href="http://en.wikipedia.org/wiki/Ext3">ext3</a> using the following steps:</p>
<ol>
<li>Plug in the disk.  Kubuntu detects it and pops open a window asking what to do.  I select &#8220;Open in a new Window&#8221; initially which mounts the disk at <code>/media/sda1</code> and opens a Konqueror window at <code>system:/media/sda1</code> to view the volume.</li>
<li>Looks fine.  I close Konqueror, open a Konsole window and type <code>sudo fdisk /dev/sda</code> at the prompt to check the partiton table of the disk (type <code>p</code> at the <code>fdisk</code> prompt), which contains no surprises as the disk is one large <code>FAT32</code> volume.  Type <code>q</code> to quit <code>fdisk</code>.</li>
<li>Unmount the disk manually : <code>sudo umount /dev/sda1</code>.  This needs to be done in order to format the disk.</li>
<li><code>sudo mkfs.ext3 /dev/sda1</code>.  Wait a couple of minutes for the format to complete.</li>
<li>Check it mounts ok: <code>sudo mount -t ext3 /dev/sda1 /media/sda1</code>.  Great.</li>
<li>Check it still automounts properly on power-on by unmounting manually, turning the disk off, then turning it back on again.  All fine.</li>
<li>In the default state, the disk is mounted on a dynamically-created directory under <code>/media</code> named for whichever device node it is assigned when it&#8217;s plugged in.  This means that the mount point may change, making the task of writing scripts to automate the backup procedure more complicated.  The following steps go a long way to ensuring that the disk is always mounted in the same place:
<ol>
<li>Added the following entry to <code>/etc/udev/rules.d/hal.rules</code> (<a href="http://reactivated.net/writing_udev_rules.html">more information on writing <code>udev</code> rules</a>):
<pre><code>BUS=="usb", SYSFS{product}=="Seagate External Drive", \
KERNEL=="sd?1", NAME=="%k", \
SYMLINK=="seagate", GROUP=="hal"</code></pre>
</li>
<li><code>sudo mkdir /media/seagate</code></li>
<li>Added the following line to <code>/etc/fstab</code>:
<pre><code>/dev/seagate    /media/seagate  ext3    noauto,rw,user 0 0</code></pre>
</li>
</ol>
<p>You need to restart your <code>hald</code> for this to take effect. I ended up rebooting, but I couldn&#8217;t see why something like <code>/etc/init.d/dbus restart</code> wouldn&#8217;t do the trick.</p>
<p>It&#8217;s worth noting that although this does mount the disk under <code>/media/seagate</code>, it still shows up in Konqueror at <code>system:/media/sda1</code>.  Not sure why at time of writing &#8211; this feels like a bug.</p>
<p>Also note that I used <code>e2label</code> to the give the device a label (&#8221;SEAGATE&#8221;).  I was initally looking at using this to mount the volume to the desired mount point with a line in fstab starting <code>LABEL=SEAGATE</code>, but the udev/hal fix turned out to be the simplest option(!)</li>
<li><code>mkdir</code> some top level folders: music, photos and home.  Then do an initial series of <code>rsync</code> runs, starting with a simple <code>rsync -av /media/photos/ /media/sda1/photos/</code>.  Everything sysncs fine.  Now I&#8217;ll be able to backup quickly as and when necessary, and write some scripts to automate everything &#8230; eventually.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2006/08/14/external-hard-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hoary to Breezy</title>
		<link>http://sgp.me.uk/2005/11/06/breezy-upgrade/</link>
		<comments>http://sgp.me.uk/2005/11/06/breezy-upgrade/#comments</comments>
		<pubDate>Sun, 06 Nov 2005 13:57:29 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2005/11/06/breezy-upgrade</guid>
		<description><![CDATA[<p>I just upgraded the <a href="http://www.kubuntu.org.uk/">Kubuntu</a> Hoary Hedgehog partition on my iBook to Breezy Badger.  I left it a while to allow any obvious problems with the new release to be ironed out.  What a breeze it proved to be...</p>]]></description>
			<content:encoded><![CDATA[<p>I just upgraded the <a href="http://www.kubuntu.org.uk/">Kubuntu</a> Hoary Hedgehog partition on my iBook to Breezy Badger.  I left it a while to allow any obvious problems with the new release to be ironed out.  What a breeze it proved to be:</p>
<pre><code>&#036; sudo sed s/hoary/breezy/g -i /etc/apt/sources.list

&#036; sudo apt-get update

&#036; sudo apt-get dist-upgrade</code></pre>
<p>Then it took about 36 minutes to download the 500-odd Megs of required files over my 2 Mbps line and about another 20 or 30 minutes to perform the upgrade.  During this time, it asked me three questions: permission to stop some services, what default language to use, and whether to replace the global <code>Xsessions</code> file.</p>
<p>Everything looked fine.  Everything still seemed to be working.  A reboot resulted in a nice new login screen and no odd behaviour.  Logging-in took me to my familiar desktop.  Touch wood, but it all seems to have Just Worked.  Very impressive.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2005/11/06/breezy-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
