<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Blogging to Nowhere</title>
	
	<link>http://blog.webworxshop.com</link>
	<description>cat /dev/brain &gt; /dev/null</description>
	<lastBuildDate>Mon, 30 Aug 2010 08:17:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>

	
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BloggingToNowhere" /><feedburner:info uri="bloggingtonowhere" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://superfeedr.com/hubbub" /><item>
		<title>Playing with Python Generators</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/Q5-SsIc9YGo/playing-with-python-generators</link>
		<comments>http://blog.webworxshop.com/2010/08/30/playing-with-python-generators#comments</comments>
		<pubDate>Mon, 30 Aug 2010 08:12:55 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[list comprehension]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=266</guid>
		<description><![CDATA[Today I&#8217;ve been playing with generators in Python. I have to say they are yet another awesome Python feature! They give you a very cool and efficient way to store some state within a function, this is useful if you&#8217;re trying to do something like generating a sequence, which you would otherwise need a class [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve been playing with <a href="http://docs.python.org/tutorial/classes.html#generators">generators</a> in <a href="http://python.org">Python</a>. I have to say they are yet another awesome Python feature! They give you a very cool and efficient way to store some state within a function, this is useful if you&#8217;re trying to do something like generating a sequence, which you would otherwise need a class for. I&#8217;m going to go over a couple of quick examples here in order to demonstrate what generators are and what you can do with them.</p>
<p><em>Side note: You need Python 2.4 or above to use generators, you&#8217;ll probably have this anyway, but it might pay to check before wondering why this stuff doesn&#8217;t work.</em></p>
<p><strong>A Quick Introduction</strong></p>
<p>At it&#8217;s heart a generator is a function which can return a value several times within it&#8217;s body. Each time the function is called it resumes from where it terminated in the previous call, with all it&#8217;s internal state intact (i.e. variables are held between calls). In Python a generator is defined by creating a function which uses the &#8216;yield&#8217; keyword. Each time that a yield is hit the function will return the specified value. Let&#8217;s start with an example which defines a generator implementation of the built-in &#8216;range&#8217; function:</p>
<p><code>def genrange(start, end):<br />
&nbsp;&nbsp;&nbsp;&nbsp;i = start<br />
&nbsp;&nbsp;&nbsp;&nbsp;while i &lt; end:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yield i<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i += 1</code></p>
<p>As you can see this is incredibly simple and behaves in the same way as the standard range function. The only difference is that when the generator method is called it will return a generator object rather than a value (in contrast to range, which will return a list of values in the range). These generator objects are iteratable so calling the &#8216;next&#8217; method on the object will run your code and return the next yielded value. Because the generator object is iteratable, the way in which you are likely to use it should look familiar:</p>
<p><code>for i in genrange(0, 10):<br />
&nbsp;&nbsp;&nbsp;&nbsp;print i</code></p>
<p>If you want to go ahead and create a list from the sequence as you generate it, you can use a <a href="http://www.secnetix.de/olli/Python/list_comprehensions.hawk">list comprehension</a>, like so:</p>
<p><code>l = [i for i in genrange(0, 10)]</code></p>
<p>Of course, as hist comprehensions can be much more complicated than this you can use it to achieve more than just creating the equivalent list as calling the built-in range function. For example, you could filter the output elements according to some criteria, or call a method on each element returned.</p>
<p><strong>A Trade Off</strong></p>
<p>Although the above example is incredibly simple, it presents an interesting trade off between memory use and the speed of iteration through the &#8216;list&#8217;. The trade off exists because you could just build the list of elements in a separate function and then iterate through it. This is a perfectly valid approach but if there are a large number of elements you will use a significant quantity of memory to store the list. You are also more likely to double handle the data, unless you are building the list up over a period of time. Using a generator in this case is likely to be more efficient, as you are just creating the elements as you need them, so only storing a minimal amount of data at any one time.</p>
<p>The other side of the trade off is performance. If the process that produces your iterative data is computationally expensive, it makes no sense to calculate more values than you will need. So if you have a data processing loop, that can potentially exit early (i.e. before reaching the end of the &#8216;list&#8217;) a generator will be more efficient. But equally, if you require a tight loop which iterates quickly, you would want to pre-compute the values.</p>
<p>When considering using generators you should weigh up these factors and think which method is going to be most efficient for your situation. I think in a lot of cases, you will end up coming down in favour of the generator solution.</p>
<p><strong>Another Example (Dan Brown is going to love me)</strong></p>
<p>I&#8217;m going to leave you with another quick example, namely a very efficient way of generating Fibonacci numbers using a generator. Without further ado:</p>
<p><code>def fibonacci():<br />
&nbsp;&nbsp;&nbsp;&nbsp;p1 = 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;p2 = 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;while True:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f = p1 + p2<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p2 = p1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p1 = f<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yield f</code></p>
<p>There you go, easy. Many other Fibonacci implementations use a recursive method, which is horribly inefficient. Most other implementations will require either a class to store persistent data in, or the use of static variables, both of which are more tricky to handle from a programming point of view.</p>
<p>Well that&#8217;s it. I think I&#8217;ve demonstrated that generators are pretty cool. The examples I&#8217;ve presented are very simplistic, but I&#8217;m sure you can think of awesome uses for them. Go forth and code!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/Q5-SsIc9YGo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/08/30/playing-with-python-generators/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/08/30/playing-with-python-generators</feedburner:origLink></item>
		<item>
		<title>Some Tramping Photos</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/1A9Aw2nCkC0/some-tramping-photos</link>
		<comments>http://blog.webworxshop.com/2010/08/18/some-tramping-photos#comments</comments>
		<pubDate>Tue, 17 Aug 2010 21:29:23 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[gallery3]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[tramping]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=239</guid>
		<description><![CDATA[So, I finally worked out that WordPress can do awesome photo galleries. This means I have somewhere to put my photos that isn&#8217;t evil (i.e. not Facebook), that actually works and is simple to use. Yay! Here are a few photos from some tramping trips I organised over the last few weeks, the first was [...]]]></description>
			<content:encoded><![CDATA[<p>So, I finally worked out that WordPress can do awesome photo galleries. This means I have somewhere to put my photos that isn&#8217;t evil (i.e. not Facebook), that actually works and is simple to use. Yay!</p>
<p>Here are a few photos from some tramping trips I organised over the last few weeks, the first was to the <a href="http://www.doc.govt.nz/parks-and-recreation/tracks-and-walks/auckland/warkworth-area/dome-forest-car-park-to-waiwhiu-grove/">Dome Forest Park</a> and the other was to <a href="http://www.doc.govt.nz/parks-and-recreation/tracks-and-walks/auckland/warkworth-area/moirs-hill-walkway/">Pohuehue Scenic Park</a> (the last two photos).</p>

<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-12-17-34' title='2010-07-03 12.17.34'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-12.17.34-150x150.jpg" class="attachment-thumbnail" alt="Dark Group Photo - Dome Forest" title="2010-07-03 12.17.34" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-12-40-12' title='2010-07-03 12.40.12'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-12.40.12-150x150.jpg" class="attachment-thumbnail" alt="Aiden at top of Trig" title="2010-07-03 12.40.12" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-12-43-14' title='2010-07-03 12.43.14'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-12.43.14-150x150.jpg" class="attachment-thumbnail" alt="Brendan looks down from Trig" title="2010-07-03 12.43.14" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/wpid-2010-07-03-14-25-22-jpg' title='wpid-2010-07-03-14.25.22.jpg'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/wpid-2010-07-03-14.25.22-150x150.jpg" class="attachment-thumbnail" alt="A View - Dome Forest" title="wpid-2010-07-03-14.25.22.jpg" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-13-45-45' title='2010-07-03 13.45.45'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-13.45.45-150x150.jpg" class="attachment-thumbnail" alt="Aiden balances on the Horizontal Tree" title="2010-07-03 13.45.45" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-13-46-05' title='2010-07-03 13.46.05'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-13.46.05-150x150.jpg" class="attachment-thumbnail" alt="Rebecca, Brendan and Claire" title="2010-07-03 13.46.05" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-07-03-14-25-30' title='2010-07-03 14.25.30'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-07-03-14.25.30-150x150.jpg" class="attachment-thumbnail" alt="Another Dome Forest View" title="2010-07-03 14.25.30" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/2010-08-07-11-23-06' title='2010-08-07 11.23.06'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/2010-08-07-11.23.06-150x150.jpg" class="attachment-thumbnail" alt="Pohuehue Waterfall" title="2010-08-07 11.23.06" /></a>
<a href='http://blog.webworxshop.com/2010/08/18/some-tramping-photos/wpid-2010-08-07-12-39-03-jpg' title='wpid-2010-08-07-12.39.03.jpg'><img width="150" height="150" src="http://blog.webworxshop.com/wp-content/uploads/2010/08/wpid-2010-08-07-12.39.03-150x150.jpg" class="attachment-thumbnail" alt="Pohuehue Group Photo" title="wpid-2010-08-07-12.39.03.jpg" /></a>

<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/1A9Aw2nCkC0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/08/18/some-tramping-photos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/08/18/some-tramping-photos</feedburner:origLink></item>
		<item>
		<title>UALUG Fedora Article</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/I-FCg5Cs-Nc/ualug-fedora-article</link>
		<comments>http://blog.webworxshop.com/2010/08/03/ualug-fedora-article#comments</comments>
		<pubDate>Mon, 02 Aug 2010 22:10:04 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[UALUG]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=222</guid>
		<description><![CDATA[Ahoy&#8217;hoy! Anyone that follows my Identi.ca feed will probably be aware that I recently switched away from Ubuntu and Archlinux and over to Fedora. This was mainly due to frustrations with Arch (I need a system which lets me get stuff done without too much overhead in looking after it) and my increasing feeling that [...]]]></description>
			<content:encoded><![CDATA[<p>Ahoy&#8217;hoy!</p>
<p>Anyone that follows my <a href="http://identi.ca/robconnolly">Identi.ca feed</a> will probably be aware that I recently switched away from <a href="http://ubuntu.com">Ubuntu</a> and <a href="http://archlinux.org">Archlinux</a> and over to <a href="http://fedoraproject.org">Fedora</a>. This was mainly due to frustrations with Arch (I need a system which lets me get stuff done without too much overhead in looking after it) and my increasing feeling that Ubuntu isn&#8217;t going in the right direction for me as a power user/developer.</p>
<p>I recently wrote an article on Fedora 13 for our University LUG &#8211; <a href="https://ualug.ece.auckland.ac.nz">UALUG</a> and I thought I&#8217;d post a link for readers of this blog. The article focuses on Fedora 13 as a platform for developers and basically details my own Fedora 13 setup. It&#8217;s written with the aim of advocating Fedora for people new to Linux, but it also serves of my review of the latest Fedora release.</p>
<p>Anyway here&#8217;s the link: <a href="https://ualug.ece.auckland.ac.nz/archives/246">https://ualug.ece.auckland.ac.nz/archives/246</a>.</p>
<p>Hopefully I should be posting some more interesting content here soon as I&#8217;ve been playing around with some interesting stuff. It&#8217;s just a matter of me finding time to write it up! Bye for now.</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/I-FCg5Cs-Nc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/08/03/ualug-fedora-article/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/08/03/ualug-fedora-article</feedburner:origLink></item>
		<item>
		<title>Denting via Android Intents</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/i1n9E0_QnxA/denting-via-android-intents</link>
		<comments>http://blog.webworxshop.com/2010/05/30/denting-via-android-intents#comments</comments>
		<pubDate>Sun, 30 May 2010 01:01:36 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[identi.ca]]></category>
		<category><![CDATA[Intent]]></category>
		<category><![CDATA[Mustard]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=215</guid>
		<description><![CDATA[This is just a quick post to share something cool that I was playing with the other day. I was wondering if it was possible to send a message from an Android application via the Mustard identi.ca client. It turns out it is, and here&#8217;s how you do it: Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post to share something cool that I was playing with the other day. I was wondering if it was possible to send a message from an Android application via the <a href="http://mustard.macno.org">Mustard</a> <a href="http://identi.ca">identi.ca</a> client. It turns out it is, and here&#8217;s how you do it:</p>
<p><code>Intent i = new Intent(Intent.ACTION_SEND);<br />
i.setType("text/plain");<br />
i.putExtra(Intent.EXTRA_TEXT, "Testing intents on android");<br />
startActivity(i);</code></p>
<p>These four lines of code hook into a key feature of the Android platform: Intents. The intent system is a neat way of communicating via apps and enables different apps to integrate together without knowing about each other specifically.</p>
<p>In this case, we are sending the ACTION_SEND intent, which Mustard is set up to handle. We set the mime-type of the message to &#8216;text/plain&#8217; and put the contents of our message into the EXTRA_TEXT field. We then start the intent, and we&#8217;re done!</p>
<p>When the intent is started Android presents the user with a list of all the possible applications which can handle the ACTION_SEND intent. In my case this is Email, Gmail, Messaging and Mustard, when I select  mustard the new message screen pops up and is populated with my message content. Hitting send posts the message and returns control to my app. Neat!</p>
<p>There are probably a whole host of ways you can integrate your apps with other apps on the phone using the intents system, I guess it&#8217;s just a matter of knowing what intents are received by each app and what they do.</p>
<p>Thanks to <a href="http://identi.ca/macno">@macno</a> (main developer of Mustard) and <a href="http://identi.ca/bugabundo">@bugabundo</a> on identi.ca for their help working this out!</p>
<p>Anyway, I hope someone finds this useful. This is the first time I&#8217;ve posted about Android development, but I&#8217;ll hopefully write more about it in the future. Bye for now!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/i1n9E0_QnxA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/05/30/denting-via-android-intents/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/05/30/denting-via-android-intents</feedburner:origLink></item>
		<item>
		<title>Why This Apple Fanboyism Really Hacks Me Off!</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/_rkG07lvg2s/why-this-apple-fanboyism-really-hacks-me-off</link>
		<comments>http://blog.webworxshop.com/2010/04/06/why-this-apple-fanboyism-really-hacks-me-off#comments</comments>
		<pubDate>Tue, 06 Apr 2010 02:44:14 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[crapple]]></category>
		<category><![CDATA[podcasts]]></category>
		<category><![CDATA[shotofjaq]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=203</guid>
		<description><![CDATA[Firstly, I apologise if this article isn&#8217;t particularly well thought out or well worded. I just wanted to get this out there. Secondly, in the interests of keeping my blog clean, I&#8217;ve slightly censored some of the language I would have used. I&#8217;m sure you can use your imagination to fill in the blanks! Is [...]]]></description>
			<content:encoded><![CDATA[<p><em>Firstly, I apologise if this article isn&#8217;t particularly well thought out or well worded. I just wanted to get this out there. Secondly, in the interests of keeping my blog clean, I&#8217;ve slightly censored some of the language I would have used. I&#8217;m sure you can use your imagination to fill in the blanks!</em></p>
<p>Is it just me or has there been an increasing amount of Apple fanboyism around recently? This is really beginning to annoy me. Principally, because I just don&#8217;t care. Apple are completely irredeemable in my eyes, they are worse than Microsoft, but no-one seems to see this, whatever they do!</p>
<p>This is really hacking me off in the Open Source media, particularly on podcasts (I&#8217;m looking at you <a href='http://shotofjaq.org'>Shot of Jaq!</a>). Frankly, I don&#8217;t give a &lt;censored&gt; what Apple are doing, or what they might do in the future. I don&#8217;t listen to Open Source podcasts for this.</p>
<p>Then there&#8217;s Ubuntu, which seems to be moving closer and closer to the Mac in terms of looks (this isn&#8217;t necessarily a bad thing, but why can&#8217;t we be more inventive?). The Ubuntu community seems to be going<br />
this way too. In a <a href='http://podcast.ubuntu-uk.org/2010/03/31/s03e04-capturing-bad-bill/'>recent episode</a> of the <a href='http://podcast.ubuntu-uk.org/'>Ubuntu UK Podcast</a> the words &#8216;the Mac just works&#8217; were uttered. Hello! So does Ubuntu! (of course I can only speak from my experience, but I rarely if ever have problems).</p>
<p>As a solution to this growing epidemic, I propose a simple test which you should use if you are tempted to praise Apple in public, particularly in the Open Source media.</p>
<p>Simply answer the following five questions:</p>
<p>1. Name five pieces of Open Source software that Apple have contributed to the community.</p>
<p>2. Would you buy an iPhone over a Nexus One? Seriously?</p>
<p>3. Is the iPad even an original idea? (clue: <a href='http://s3.media.squarespace.com/production/467161/5278253/wp-content/uploads/2008/01/startrekpadd.jpg'>No</a>.)</p>
<p>4. If the Mac is so great, why is it so damned hard to use? Why can&#8217;t it be configured to work they way I want?</p>
<p>5. Do you like DRM? Apparently, <a href='http://www.engadget.com/2007/02/06/a-letter-from-steve-jobs-on-drm-lets-get-rid-of-it/'>neither does Steve</a>. Slightly hypocritical, don&#8217;t you think?</p>
<p>If you can&#8217;t answer these simple questions in Apple&#8217;s favour, KEEP STUM!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/_rkG07lvg2s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/04/06/why-this-apple-fanboyism-really-hacks-me-off/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/04/06/why-this-apple-fanboyism-really-hacks-me-off</feedburner:origLink></item>
		<item>
		<title>Installing and Configuring Arch Linux: Part 1</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/M7_ktyMikuw/installing-and-configuring-arch-linux-part-1</link>
		<comments>http://blog.webworxshop.com/2010/04/01/installing-and-configuring-arch-linux-part-1#comments</comments>
		<pubDate>Thu, 01 Apr 2010 04:52:04 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[archrob]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[crunchbang]]></category>
		<category><![CDATA[identi.ca]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=168</guid>
		<description><![CDATA[OTHERWISE ENTILED: Rob tries to install Arch Linux some of the time, but really spends most of the time drinking beer. Before I start: NO, UNLIKE EVERY OTHER ARTICLE ON THE WEB, PUBLISHED TODAY, THIS IS NOT A JOKE, K?!? I&#8217;ve been looking for a new distro recently. I do this from time to time, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>OTHERWISE ENTILED: Rob tries to install Arch Linux some of the time, but really spends most of the time drinking beer.</strong></p>
<p><em>Before I start: NO, UNLIKE EVERY OTHER ARTICLE ON THE WEB, PUBLISHED TODAY, THIS IS NOT A JOKE, K?!?</em></p>
<p>I&#8217;ve been looking for a new distro recently. I do this from time to time, principally because I get bored of what I&#8217;m currently running. Last time it was <a href="http://crunchbanglinux.org">Crunchbang</a> which I settled on. This time I wanted to go more advanced, so I started researching <a href="http://www.archlinux.org">Arch Linux</a>.</p>
<p>For those that don&#8217;t know, Arch Linux describes itself as:</p>
<blockquote><p>&#8230;a lightweight and flexible Linux® distribution that tries to Keep It Simple.</p></blockquote>
<p>I&#8217;d heard about Arch in the past from several sources and had heard that you basically have to install and configure everything yourself, but that the package manager (awesomely named <a href="http://wiki.archlinux.org/index.php/Pacman">Pacman</a>!) manages software without having to compile from source (unless you want to!).</p>
<p>The following series of posts will be a record of my experiences installing and configuring Arch on my home desktop machine. This isn&#8217;t intended to be an exhaustive installation guide, more just a record of where I tripped up in order to aid those who come next. If you are searching for an installation guide, try the <a href="http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide">excellent article</a> on the <a href="http://wiki.archlinux.org">Arch Wiki</a>.</p>
<p>I&#8217;ve separated the post out into days. Note: it didn&#8217;t actually take me a full day for each part, I work during the day and only really had a couple of hours each evening to spend on this.</p>
<p><strong>Day 1: Backing Up</strong></p>
<p>Before installing I wanted to make sure I didn&#8217;t trash my existing Ubuntu system and all my personal data, as I still need to do all the stuff I usually do with my machine. So I made a backup.</p>
<p>I&#8217;m not really going to go into how. Suffice to say I used LVM snapshots and rsync, I might write about this in a future post.</p>
<p>This took a while, as I have quite a lot of data. I thought it best to have a beer in the mean time, so I did.</p>
<p><strong>Day 2: Making Space, Starting the Installation and Various Adventures with LVM</strong></p>
<p>The next thing to do was to resize my existing LVM partition containing Ubuntu so that I had space for Arch. I couldn&#8217;t work out how to do this at first as none of the partition tools I tried (GParted and Cfdisk) could resize the partition. I eventually worked out how to do it.</p>
<p>First, on my running Ubuntu system I resized the physical volume with:</p>
<p><code>$ pvresize --setphysicalvolumesize 500G /dev/sda1</code></p>
<p>This shrank the space used by LVM down to 500GB (from about 1000GB on my machine).</p>
<p>I then rebooted into the Arch live CD (64-bit edition in my case), and ran:</p>
<p><code>$ fdisk /dev/sda</code></p>
<p>Now what you have to do next is slightly alarming. You actually have to delete the partition and recreate it in the new size. This works, without destroying your data, because fdisk only manipulates the partition table on the disk, it doesn&#8217;t do any formatting of partitions, etc.</p>
<p>I did this through fdisk so that the partition was 501GB (making it a little bigger than the PV just to make sure). I then rebooted back into Ubuntu and ran:</p>
<p><code>$ pvresize /dev/sda1</code></p>
<p>To allow it to use all the space. This probably isn&#8217;t necessary but I wanted to be safe.</p>
<p>Next, I proceeded to the installation. For some reason the Arch boot CD was really slow to boot and gave me loads of read errors, I think this might have something to do with my drive as I&#8217;ve been experiencing the same with other disks. Eventually it booted and dropped my at the default prompt.</p>
<p>From then I basically followed the <a href="http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide">installation guide</a> for setting up the package source (CD) and the date and time.</p>
<p>I then set about partitioning the disks. The Arch installer uses Cfdisk, which is fine. I just added two partitions to my disk, a small (255Meg) one for my /boot partition and a large LVM one for the rest of the system (I like LVM and wanted to use it again on Arch).</p>
<p>This was fine, but I had some problems setting up the LVM through the installer, even though the user guide seems to think it can do it. Every time I tried, it would just fail on creating the Volume Group, weird.</p>
<p>I gave up for the evening and (you guessed it) went for a beer!</p>
<p><strong>Day 3: Successful Installation</strong></p>
<p>The next day I thought I&#8217;d try googling for LVM on Arch, luckily when I got in to work <a href="http://identi.ca/duffkitty">@duffkitty</a> on <a href="http://identi.ca">identi.ca</a> had seen one of my posts complaining about having problems and had given me a link to the <a href="http://wiki.archlinux.org/index.php/LVM">LVM article</a> on the Arch Wiki.</p>
<p>This advocated setting up the whole LVM setup manually (and guides you through it) and then just setting the partitions to use in the installer. It also gives you some important things to look out for when configuring the system. Following these instructions worked like a charm and I was able to format everything correctly and install the base system.</p>
<p>I then moved on to configuring the system, following the install guide and taking into account the instructions in the LVM article. Everything went pretty much fine here and I eventually got to installing the bootloader. Here I replaced the Ubuntu Grub version with the one installed by Arch. This left me having to add an entry for Ubuntu, which wasn&#8217;t difficult, I just copied the Arch one and changed the partition and file names.</p>
<p>Then it was time to &#8216;type reboot and pray&#8217; as the Arch installation guide puts it.</p>
<p>So I did.</p>
<p>When I rebooted the bootloader came up with the Arch and Ubuntu entries. I selected Ubuntu just to check everything was OK.</p>
<p>It didn&#8217;t work.</p>
<p>Panicking and Swearing Ensued.</p>
<p>I rebooted and selected Arch.</p>
<p>That worked (thankfully).</p>
<p>When it had booted I logged in and opened up the Grub config file again. it turned out I mis-typed the name of the Ubuntu initrd file, that was easily fixed. Rebooting got me safely back to Ubuntu.</p>
<p>So now I have a functioning dual boot between my original Ubuntu install and a very basic Arch install, I think I might need some software there!</p>
<p>But first&#8230; beer.</p>
<p><strong>So What&#8217;s Next???</strong></p>
<p>Well, firstly I need to get my network connection up and running as I didn&#8217;t do that during the install. It&#8217;s a Wifi connection over WPA so that&#8217;s going to be fun. Then I can start installing software. I&#8217;ll probably follow the <a href="http://wiki.archlinux.org/index.php/Beginners_Guide">Beginners Guide</a> on the Wiki (from Part 3). I was also recommended <a href="http://wiki.archlinux.org/index.php/Yaourt">Yaourt</a> by <a href="http://identi.ca/duffkitty">@duffkitty</a>, so I&#8217;ll give that a try.</p>
<p>I&#8217;ll be continuing to play with Arch over the next few days and reporting my progress in follow up posts here. I&#8217;ll also be denting as I go along and you can follow all of these on my <a href="http://identi.ca/tag/archrob">#archrob hash tag</a>.</p>
<p>There&#8217;ll probably be beer too.</p>
<p>We&#8217;ll see how it goes, but eventually I hope to have a system I can use full time.</p>
<p>Bye for now! Happy Easter!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/M7_ktyMikuw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/04/01/installing-and-configuring-arch-linux-part-1/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/04/01/installing-and-configuring-arch-linux-part-1</feedburner:origLink></item>
		<item>
		<title>UoA ECE Department ‘DonKey’ on Linux</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/kKOM3AvjQE0/uoa-ece-department-donkey-on-linux</link>
		<comments>http://blog.webworxshop.com/2010/01/29/uoa-ece-department-donkey-on-linux#comments</comments>
		<pubDate>Thu, 28 Jan 2010 22:02:24 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[auckland]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[DonKey]]></category>
		<category><![CDATA[ECE]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[UoA]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=153</guid>
		<description><![CDATA[Introduction: Since finishing my Part IV Project, I&#8217;ve been threatening to do some embedded/microcontroller stuff in my spare time at home. I&#8217;ve now finally go around to it and I thought I&#8217;d start by playing with a few components I had left over from a Uni project a while back. I&#8217;ve also ordered an Arduino [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Introduction:</strong> Since finishing my Part IV Project, I&#8217;ve been threatening to do some embedded/microcontroller stuff in my spare time at home. I&#8217;ve now finally go around to it and I thought I&#8217;d start by playing with a few components I had left over from a Uni project a while back. I&#8217;ve also ordered an Arduino board (see below), but it hasn&#8217;t arrived yet. When it does, I think I&#8217;m going to have a go programming it in C rather than the random Arduino language, as I have much more experience of programming embedded systems than your average Arduino user. I&#8217;ll report on my progress when I have some!</em></p>
<p>In the Electrical and Computer Engineering Deaprtment of the University of Auckland, where I work we have a little device, internally known as the &#8216;DonKey&#8217;. The purpose of this is to allow easy programming of Atmel AVR based microcontrollers via USB, rather than the simpler serial interface. We also have some internally developed software to program microcontrollers via the device, unfortunately this software is pretty much windows only (we did have a successful attempt to compile it for Linux, but this was quite a while ago, a better solution would be to use a native Linux application).</p>
<p>Internally the DonKey uses an FTDI based USB to UART chip (specifically the FT232R) to communicate with the microcontroller. This presents some problems as, despite being the basis of the programmer on incredibly popular Arduino boards, the main Linux programming tool (AVRdude) has no official FTDI support. I think this is largely due to the use of a bootloader on the Arduino boards, which negates the need of the programming tool to directly flash the board. If however you brick the AVR on the Arduino, you would be out of luck and would need a physical programmer (more on this below).</p>
<div id="attachment_164" class="wp-caption aligncenter" style="width: 480px"><a href="http://blog.webworxshop.com/wp-content/uploads/2010/01/donkey.jpg"><img src="http://blog.webworxshop.com/wp-content/uploads/2010/01/donkey.jpg" alt="The DonKey" title="The DonKey" width="470" height="224" class="size-full wp-image-164" /></a><p class="wp-caption-text">The DonKey in all it's glory.</p></div>
<p>In this howto I&#8217;ll cover how to get the DonKey working on Linux with AVRdude. Luckily, while researching how I might go about this I found that a large part of the work had been done for me, due to the fact that the Arduino also uses these chips. I found instructions on <a href='http://doswa.com/blog/2009/12/20/avrdude-58-with-ftdi-bitbang-patch-on-linux/'>doswa.com</a> on how to patch and compile AVRdude for just this purpose (so you could flash a bootloader to a new AVR).</p>
<p>These instructions work quite well for the DonKey, up until you get to running the &#8216;./configure&#8217; command, I replaced this with:</p>
<p><code>$ ./configure --prefix=$HOME/.local</code></p>
<p>to setup the code to do a local install in my home directory (as I want this to be my primary version of AVRdude, but not to screw with things on the root filesystem).</p>
<p>Next I followed the instructions on modifiying the makefile and compiling AVRdude via the &#8216;make&#8217; command. After &#8216;make&#8217; I also typed:</p>
<p><code>$ make install</code></p>
<p>to install into the directory setup earlier. Now AVRdude is installed, the next thing to do is a bit of configuration, firstly you&#8217;ll want to make sure it&#8217;s on your $PATH so add the following to your ~/.bashrc file:</p>
<p><code>export PATH=$HOME/.local/bin:$PATH</code></p>
<p>and run the command:</p>
<p><code>$ source ~/.bashrc</code></p>
<p>to re-read the file.</p>
<p>The next issue is that you may wish to remove any copy of AVRdude that is otherwise installed (I found that sometimes my shell would run the wrong one &#8211; especially if you use &#8216;sudo&#8217; to run it):</p>
<p><code>sudo apt-get remove --purge avrdude</code></p>
<p>Now, I just mentioned above that you might use &#8216;sudo&#8217; to run AVRdude, well according to the doswa article you do need to use sudo when using the FTDI based programmers. I&#8217;m not sure why this is, but it&#8217;s not very useful if you want to be able to call AVRdude from a Makefile or the like.</p>
<p>I solved this by setting a &#8216;suid root&#8217; on my AVRdude binary. For those that don&#8217;t know what this is, the suid bit is a Unix permission setting that makes any program with it run under it&#8217;s owning user rather than the user who called it. If the owner happens to be root, the program runs as root even if the user who calls it isn&#8217;t. This is probably really insecure if you do it a lot, but you should be OK in this case.</p>
<p><b>WARNING: Despite what I say, it might not be OK. Allowing any program unrestricted root access has the potential to hose your system and scatter all your data to the winds. FOLLOW THESE INSTRUCTIONS AT YOUR OWN RISK!!</b></p>
<p>So here we go:</p>
<p><code>$ sudo chown root:root ~/.local/bin/avrdude<br />
$ sudo chmod u+s ~/.local/bin/avrdude</code></p>
<p>Now you should be able to successfully run AVRdude on FTDI based devices without resorting to using sudo every time.</p>
<p>But, what of the DonKey I hear you cry! Well all we have to do to support the DonKey is give AVRdude a little bit of configuration which tells it what the DonKey actually is. This can go in ~/.avrduderc, and looks a bit (well exactly) like this:</p>
<p><code>programmer<br />
  id    = "donkey";<br />
  desc  = "University of Auckland ECE DonKey";<br />
  type  = ft245r;<br />
  miso  = 1; # D1<br />
  sck   = 2; # D2<br />
  mosi  = 3; # D3<br />
  reset = 4; # D4<br />
;</code></p>
<p>OK, now you should be able to successfully use the DonKey with AVRdude, using a command similar to this:</p>
<p><code>avrdude -c donkey -p m8 -P ft0 -U myawesomeavrproject.hex</code></p>
<p><em>Note: this command is for the ATMega8 as denoted by the &#8216;-p m8&#8242;, check the AVRdude manual page for the correct -p option if you are using a different type of AVR.</em></p>
<p>OK, well that&#8217;s pretty much it, I&#8217;ll post back soon regarding my other progress with some microcontroller stuff. Bye for now!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/kKOM3AvjQE0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/01/29/uoa-ece-department-donkey-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/01/29/uoa-ece-department-donkey-on-linux</feedburner:origLink></item>
		<item>
		<title>Mu-Feeder 0.1 Released</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/bEMaKM2oY4U/mu-feeder-0-1-released</link>
		<comments>http://blog.webworxshop.com/2010/01/06/mu-feeder-0-1-released#comments</comments>
		<pubDate>Wed, 06 Jan 2010 03:08:11 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[identi.ca]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[mu-feeder]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=145</guid>
		<description><![CDATA[Hello Everyone, welcome to Twenty-Ten (yes we finally get to sound like we live in the future!). I&#8217;m very pleased to announce the release of my pet project Mu-Feeder, or at least a very early version of it. I actually released version 0.1.0 unofficially yesterday, but then found a bug which was tickled by Python [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everyone, welcome to Twenty-Ten (yes we finally get to sound like we live in the future!).</p>
<p>I&#8217;m very pleased to announce the release of my pet project <a href="http://launchpad.net/mu-feeder">Mu-Feeder</a>, or at least a very early version of it. I actually released version 0.1.0 unofficially yesterday, but then found a bug which was tickled by Python 2.4, so fixed that and re-released as version 0.1.1.</p>
<p>If you want to try it out you can get it <a href="http://launchpad.net/mu-feeder/0.1/0.1.1/+download/mu-feeder-0.1.1.tar.gz">here</a>, or you can download the code with:</p>
<p><code>$ bzr branch lp:mu-feeder/0.1</code></p>
<p>If you have a bug report, please post it on the <a href="https://bugs.launchpad.net/mu-feeder">Launchpad bug tracker</a>, I&#8217;m also seeking feedback which you can send to me in a variety of ways (comment here, <a href="http://identi.ca/robconnolly">identi.ca</a> or <a href="https://answers.launchpad.net/mu-feeder">Launchpad answers page</a>).</p>
<p>I hope someone finds this useful! Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/bEMaKM2oY4U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2010/01/06/mu-feeder-0-1-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2010/01/06/mu-feeder-0-1-released</feedburner:origLink></item>
		<item>
		<title>Introducing Mu-Feeder…</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/SO8v104pCGw/introducing-mu-feeder</link>
		<comments>http://blog.webworxshop.com/2009/11/25/introducing-mu-feeder#comments</comments>
		<pubDate>Wed, 25 Nov 2009 02:16:24 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[identi.ca]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[mu-feeder]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=140</guid>
		<description><![CDATA[I haven&#8217;t written here in a while, principally because I&#8217;ve been doing exams and finishing various projects at Uni. I&#8217;m now doing a summer studentships project for my department for which I get paid (excellent!), so that&#8217;s keeping me busy. However, I&#8217;m not really here to talk about all that stuff&#8230; The purpose of this [...]]]></description>
			<content:encoded><![CDATA[<p>I  haven&#8217;t written here in a while, principally because I&#8217;ve been doing exams and finishing various projects at Uni. I&#8217;m now doing a summer studentships project for my department for which I get paid (excellent!), so that&#8217;s keeping me busy. However, I&#8217;m not really here to talk about all that stuff&#8230;</p>
<p>The purpose of this entry is to announce my personal Free Software project. Mu-Feeder (pronounced &#8216;mew-feeder&#8217;) is a project to replace the proprietary web service <a href="http://twitterfeed.com">Twitterfeed</a> with a piece of Free Software. Basically the idea is to take entries from an RSS or Atom feed and post them to a microblog. I figured this could be quite easily done and it would let me get used to the tools, etc involved in publishing Free Software. Basically, it&#8217;s not meant to be a complicated project, just to fill a gap and give me some experience.</p>
<p>At the moment the software is designed to run as a Python script executed via Cron. When it gets called it should build a summary of the top items in the feed (along with shortened URL&#8217;s) and post them to the configured microblog. I already have <a href="http://identi.ca">identi.ca</a> support as well as (untested) <a href="http://twitter.com">twitter</a> and <a href="http://status.net">StatusNet</a> support, principally bacause they all use the same API. I&#8217;m aiming to have support for a single feed in the 0.1 release with support form multiple feeds in a subsequent release.</p>
<p>All the details are up on the Launchpad page at <a href="https://launchpad.net/mu-feeder">https://launchpad.net/mu-feeder</a> and you can get the code via <a href="http://bazaar-vcs.org">bzr</a> with:</p>
<p><code>$ bzr branch lp:mu-feeder</code></p>
<p>Bug reports are welcome at <a href="https://bugs.launchpad.net/mu-feeder">https://bugs.launchpad.net/mu-feeder</a>.</p>
<p>That&#8217;s about it, I&#8217;ll update on progress here as I go. Bye for now!</p>
<p>PS. Ironically this blog entry will be posted to identi.ca with the very service that Mu-Feeder aims to replace!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/SO8v104pCGw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2009/11/25/introducing-mu-feeder/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2009/11/25/introducing-mu-feeder</feedburner:origLink></item>
		<item>
		<title>Online Filesystem Resizing with LVM</title>
		<link>http://feedproxy.google.com/~r/BloggingToNowhere/~3/v2yiuxpxQ4M/online-filesystem-resizing-with-lvm</link>
		<comments>http://blog.webworxshop.com/2009/10/10/online-filesystem-resizing-with-lvm#comments</comments>
		<pubDate>Fri, 09 Oct 2009 23:45:27 +0000</pubDate>
		<dc:creator>Rob Connolly</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[crunchbang]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ext4]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.webworxshop.com/?p=134</guid>
		<description><![CDATA[I use LVM on my main desktop machine. This is awesome because it allows me to dynamically allocate space to partitions as I choose, however I always forget how to do a resize, so I&#8217;m going to write it down here. This isn&#8217;t going to be a full LVM tutorial (there&#8217;s plenty of material out [...]]]></description>
			<content:encoded><![CDATA[<p>I use LVM on my main desktop machine. This is awesome because it allows me to dynamically allocate space to partitions as I choose, however I always forget how to do a resize, so I&#8217;m going to write it down here. This isn&#8217;t going to be a full LVM tutorial (there&#8217;s plenty of material out there for that), although maybe that&#8217;s an idea for the future.</p>
<p>The following commands will resize an ext2, ext3, or ext4 filesystem running on LVM while it is mounted:</p>
<p><code>$ sudo lvresize -L +XXG &lt;path to fs device&gt;</code><br />
<code>$ sudo resize2fs &lt;path to fs device&gt;</code></p>
<p>In the above command you need to replace XX with the number of GB you want the filesystem to grow by and &lt;path to fs device&gt; by the device node (typically /dev/mapper/something).</p>
<p>An there you have it, done! Obviously there is a huge amount more you can do with the two tools above, take a look at their man pages for more info.</p>
<p>Hopefully this post will save me from having to work out how to do this every time!</p>
<img src="http://feeds.feedburner.com/~r/BloggingToNowhere/~4/v2yiuxpxQ4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webworxshop.com/2009/10/10/online-filesystem-resizing-with-lvm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.webworxshop.com/2009/10/10/online-filesystem-resizing-with-lvm</feedburner:origLink></item>
	</channel>
</rss>
