<?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>Strangeparty &#187; Linux</title>
	<atom:link href="http://www.strangeparty.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strangeparty.com</link>
	<description>A blog about life, linux and photography</description>
	<lastBuildDate>Sat, 07 Aug 2010 10:34:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ubuntu in Business</title>
		<link>http://www.strangeparty.com/2010/07/15/ubuntu-in-business/</link>
		<comments>http://www.strangeparty.com/2010/07/15/ubuntu-in-business/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 14:33:01 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=712</guid>
		<description><![CDATA[<p>On Tuesday I attended the Ubuntu in Business event run by the Ubuntu UK Community and Canonical, and unlike Proactive Paul I really enjoyed the day and thought it was a success.</p>
<p>I will agree and say that there should have been more introductory talks on Ubuntu and Open Source for those people that were not familiar, especially <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2010/07/15/ubuntu-in-business/">Ubuntu in Business</a></span>]]></description>
			<content:encoded><![CDATA[<p>On Tuesday I attended the Ubuntu in Business event run by the Ubuntu UK Community and Canonical, and unlike <a href="http://www.dontreadmyblog.com/?p=2969">Proactive Paul</a> I really enjoyed the day and thought it was a success.</p>
<p>I will agree and say that there should have been more introductory talks on Ubuntu and Open Source for those people that were not familiar, especially as they were trying to target new and potential users, however given half the audience was already running Ubuntu I am not sure if that would have been a waste. Certainly introduction demo&#8217;s are always good and especially for someone new to Ubuntu or Linux this would show that really it is not very different from using windows and is certainly not scary!</p>
<p>The talks and targetted demo&#8217;s were good, in particular I was curious about the <a href="http://www.ubuntu.com/cloud">Ubuntu Cloud</a> and <a href="http://www.canonical.com/enterprise-services/landscape">Landscape</a> which both seem really good. For me the best part of the day was when the guest speakers and Canonical hosts got up on a panel and were interviewed by <a href="http://en.wikipedia.org/wiki/Glyn_Moody">Glyn Moody</a> which resulted in some fantastic discussion, excellent answers and some good questions and responses from the audience.</p>
<p>Of course the <a href="https://wiki.ubuntu.com/ubuntini">ubuntini</a> cocktail afterwards was interesting too &#8211; not really my thing, but was nice to try.</p>
<p>The conversation after the cocktail was possibly the best part of the evening &#8211; actually getting to talk to some of the Canonical folks and forging a few new links. Some good conversations about IBM and Ubuntu, hopefully it won&#8217;t take too long for sanity to break-out and IBM to consider Ubuntu seriously<br />
(If you are a business buying IBM software and want to use it on Ubuntu, make sure you tell your salesman this &#8211; If IBM doesn&#8217;t hear people asking for software on Ubuntu then there is no reason to ship it for Ubuntu).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2010/07/15/ubuntu-in-business/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running a personal server</title>
		<link>http://www.strangeparty.com/2010/06/27/running-a-personal-server/</link>
		<comments>http://www.strangeparty.com/2010/06/27/running-a-personal-server/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 18:18:00 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[logwatch]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[munin]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=693</guid>
		<description><![CDATA[<p>Maybe you read some of my posts on software raid and lvm, or maybe you have a spare pc lying around and want a box you can use as a small personal server and are wondering about some tips for running it with less hassle. I am sharing a few things that I have learnt about <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2010/06/27/running-a-personal-server/">Running a personal server</a></span>]]></description>
			<content:encoded><![CDATA[<p>Maybe you read some of my posts on <a href="http://www.strangeparty.com/2008/05/24/software-raid1-and-lvm-on-debian-etch/">software raid and lvm</a>, or maybe you have a spare pc lying around and want a box you can use as a small personal server and are wondering about some tips for running it with less hassle. I am sharing a few things that I have learnt about running a personal server (though some will apply to any Linux server or always-on machine) that make my life as a part-time admin easier. This is by no means an exhaustive list, nor necessarily the <em>correct way</em> to run a box, but it works well for me and so should be useful to others as well.<br />
<span id="more-693"></span></p>
<h2>ADSL port forwarding</h2>
<p>If your box is behind an ADSL modem (and unless you have a professional server and datacentre to put it in, it probably is) then by default the NAT addressing and firewall will mean that you cannot get in remotely to your box. This may be fine if you don&#8217;t want anything from the box accessible, but I tend to like being able to ssh in from anywhere, so you need to set up some port forwarding from your ADSL router/modem to get into your box</p>
<p>I wont attempt to describe how your ADSL modem/router config works, you&#8217;ll have to read it&#8217;s manual, but the ports you probably want are:</p>
<blockquote><p>ssh 22 &#8211; if you want to log from outside your home network with ssh<br />
smtp 25 &#8211; if you want your box to be able to receive email<br />
ftp 21 &#8211; if you want ftp (though I recommend sftp or scp which use ssh and therefore encrypt your password and data)<br />
http 80 &#8211; if you want webpages visible from the internet<br />
https 443 &#8211; if you want webpages visible from the internet and want to use https encrypted http</p></blockquote>
<h2>Dynamic DNS</h2>
<p>Unless you have a fixed IP address from your ISP, you will probably want some sort of Dynamic DNS system that sets a hostname to have your current IP address. I use <a href="http://dyndns.afraid.org">http://dyndns.afraid.org</a> as they are free, you can host your own domain there and there are plenty of domains you can use for sub-domains if you don&#8217;t want to buy a domain. They provide lots of scripts to help you keep your IP address recorded correctly whenever it changes</p>
<h2>Mail</h2>
<p>I really want mail configured for delivery, as that is one of the easiest ways to get alerts from your machine (though twitter could be cool too though). If you have a email to smms gateway or smartphone with push email then these alerts can be very fast and direct.</p>
<p>I use exim, not because it is the fastest or most configurable mail system available, but because it is very easy to get configured and running on Debian or Ubuntu. Simply install the exim4 package and the debconf wizard will get you up and running.</p>
<blockquote><pre>sudo aptitude install exim4</pre>
</blockquote>
<p>The wizard, which can be re-run with the command <em>sudo dpkg-reconfigure exim4-config</em>, asks you how you want to configure exim. Normally you select the first or second option (&#8220;internet site; mail is sent and received directly using SMTP&#8221; or &#8220;mail sent by smarthost; received via SMTP or fetchmail&#8221;). Most of the questions come with sensible defaults. If you selected the second option you will get asked what your smarthost for sending mail is, in many cases this is just mail.your.isp or you can use google if you have an account, but it will require authentication which  which is a little more complicated to set up.</p>
<p>Next you want to set all email for &#8216;root&#8217; to forward to you preferred email address.<br />
Edit <em>/root/.forward</em> to look like this</p>
<blockquote><pre># Exim filter   &lt; &lt;== do not edit or remove this line!

if error_message then finish endif

deliver me@myemail.com</pre>
</blockquote>
<p>You can test sending email with a simple command line of <em>mail root -s test</em> followed by a message and then CTRL+d. You should get the email at your address set above.</p>
<h2>Logwatch</h2>
<p>I like to know what is happening on my boxes, and logwatch does a great job at summarising the changes that have happened very day. Install logwatch with</p>
<pre>sudo aptitude install logwatch</pre>
<p>and it will email root every day with a summary of log changes and other useful info.</p>
<p>As I don&#8217;t actually want this information every day, I moved the cronjob for logwatch from daily to weekly with</p>
<blockquote><pre>sudo mv /etc/cron.daily/00logwatch /etc/cron.weekly/00logwatch</pre>
</blockquote>
<p>so now I get a weekly summary for my box, which is good enough for me</p>
<h2>Raid emails</h2>
<p>As I use software raid to make my disks a little more redundant (Warning: RAID is not a backup strategy. 2 disks CAN (and sod&#8217;s law / murphey&#8217;s law says that at the worst possible time they actually will) both die at the same time. RAID simply gives you an extra chance to get a new disk without having to get your data from a backup)</p>
<p>If you use software RAID, make sure your raid config<br />
<em>cat /etc/mdadm/mdadm.conf</em><br />
has the following lines set appropriately</p>
<blockquote><pre>MAILADDR root
MAILFROM raid@myserver.com</pre>
</blockquote>
<h2>Smart disk monitoring</h2>
<p>As I don&#8217;t trust disks (and you shouldn&#8217;t either, as they will die on you at the most annoying time) I like to have the S.M.A.R.T disk monitoring installed, which does occasional tests on the disks, and can warn you if the disk starts showing bad sectors. If your disk does have bad sectors, it is probably best to replace it pretty soon, though sometimes you can just get a very small set of bad sectors and live with the disk for a long time.</p>
<p>Install smart with</p>
<blockquote><pre>sudo aptitude install smartmontools</pre>
</blockquote>
<p>and if you have logwatch installed too, then the SMART reports get added to your logwatch summaries (including disk temperatures which can be a good indication of airflow in your box)</p>
<h2>Toughening SSH</h2>
<p>I found that I had a lot of attempted logins on my box because SSH was open on the default port. One solution is to move the default port, but I am likely to forget to use that port number and just confuse myself&#8230; So I started looking at other ways to reduce the risk of having someone brute-force their way into an account.</p>
<p>You can use some really good stuff like fail2ban to take failed logins and firewall that IP off for a while, but I decided that I wanted something even stronger. I disabled password logins completely via SSH! To do this you will need  to have created a ssh keypair and set up the public key on your server and make sure it works to log you in BEFORE you disable password logins.</p>
<p>To disable password logins, simply edit<br />
<em>/etc/ssh/sshd_config</em><br />
and change</p>
<blockquote><pre>PasswordAuthentication yes</pre>
</blockquote>
<p>to say &#8220;no&#8221; instead. This will mean that you can never log in with a password, and have to use a ssh key. This will be almost impossible to brute-force, though you do have to keep your private ssh keyfile secure.</p>
<p>As a minimum, you may want to think about setting</p>
<blockquote><pre>PermitRootLogin no</pre>
</blockquote>
<p>in your sshd config so that the root account cannot be brute-forced, as this is probably the most common account that attempts are made on.</p>
<h2>Monitoring with Munin</h2>
<p>To keep an idea of how busy the box is, the cpu and ram usage, disk usage and many more things I have installed munin to monitor my servers. Munin logs system activity and automatically creates web-accessible charts of the status of your box. An example is online at <a href="http://munin.ping.uio.no">http://munin.ping.uio.no/</a>. I have set mine as password protected via an apache htaccess file with htpassword (there are plenty of resources online for how to do this), so that only I can see how busy my box is.</p>
<p>If you also install <em>sensord</em> and <em>lm-sensors</em> then munin can also chart things like fan speeds and temperatures</p>
<h2>Security updates</h2>
<p>Whether you are running Debian, Ubuntu or any other linux OS, make sure you check how to setup security updates for your distribution and install updates regularly. Having old packages is possibly the easiest way to get your box exploited.</p>
<p>If you don&#8217;t like having to remember to install packages you can install <em>cron-apt</em> to download the packages and tell you, so you can install them, or even install them for you (however it is generally a good idea to know what is going onto your system before it goes in, just in case anything looks suspicious or might break something)</p>
<h2>/etc in revision control</h2>
<p>Have you ever made a change to your system config, then realised not long later that it was a bad change, but can&#8217;t remember what you did?</p>
<p>Introducing <em>etckeeper</em>. etckeeper is a very clever package that takes /etc and puts it all in git. It can easily be configured to automatically commit every time you install or remove a package, so that all you have to do if you found something in /etc is broken is check the recent changes!</p>
<p>Simply install it with<br />
<blockquote>
<pre>sudo aptitude install etckeeper</pre>
</blockquote>
<p> and it pretty much works out of the box (It also supports other code control tools other than git, but the default is git)</p>
<h2>Anything Else?</h2>
<p>This list is by no means complete, and there are probably many more common tweaks you can do &#8211; Please leave a comment if you think of anything else that fits in or anything I might be doing wrong (hey, nobody&#8217;s perfect!) as I am always looking to improve how I run my little servers.</p>
<p>If you have several machines and static IP addresses then you can configure syslog to log to across the network, which would be cool as you could have errors logged from a box that has had bad disk crashes and dies and still know why. However I don&#8217;t have static IP&#8217;s so have not looked into this much</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2010/06/27/running-a-personal-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A Debian Packaging Howto</title>
		<link>http://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/</link>
		<comments>http://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 18:59:36 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=665</guid>
		<description><![CDATA[<p>I do a fair bit of Debian/Ubuntu packaging at work (kind of on the side) and have had several people tell me that although the New Maintainer&#8217;s guide (http://www.debian.org/doc/maint-guide/ or it is available offline in the package maint-guide and also has some translations) does do an introduction it is a bit hard to follow, particularly if <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/">A Debian Packaging Howto</a></span>]]></description>
			<content:encoded><![CDATA[<p>I do a fair bit of Debian/Ubuntu packaging at work (kind of on the side) and have had several people tell me that although the New Maintainer&#8217;s guide (<a href="http://www.debian.org/doc/maint-guide/">http://www.debian.org/doc/maint-guide/</a> or it is available offline in the package <em>maint-guide</em> and also has some translations) does do an introduction it is a bit hard to follow, particularly if you have a really simple program you want to package up and release. The New Maintainer&#8217;s guide does assume you have an existing tarball to work from, and that is often not the case if you just want to package up something you have made so I thought I would write a detailed walkthrough of packaging up something simple.<br />
<span id="more-665"></span><strong>Edit: 2010/06/07 </strong><em>I initially wrote this post to use &#8220;cdbs&#8221;, but have since rewritten it to use debhelper 7 as I am told that it is far more popular among Debian Developers and slightly more powerful. cdbs is still used in some places, but I understand debhelper 7 is used far more</em></p>
<p>While you can just use something like dpkg-deb to turn the right files into a .deb, this only works for already-compiled files and loses some of the great features about Debian-based systems such as changelogs, so I am only going to describe how to make a full source-format package that is built using the Debian tools</p>
<h4>Prereqs</h4>
<p>You will want to install a few packages before you go any further &#8211; these are very useful helper tools for packaging. Install <strong>dh-make</strong>, <strong>dpkg-dev</strong>, <strong>debhelper </strong>and <strong>devscripts<br />
</strong></p>
<p><em>sudo aptitude install dh-make dpkg-dev debhelper devscripts</em></p>
<p>I chose debhelper here as it is a very powerful and yet often simple way of quickly creating packages. It takes a lot of the slow work away from the packager and does very sensible default things. My example package does not really need compiling so it could be simple to just create it by hand, but using debhelper to do the default packaging rules gives you more time to do other things</p>
<p>It is worth mentioning here that all aspects of the parts of a Debian package are covered in detail in the Debian Policy document (<a href="http://www.debian.org/doc/debian-policy/">http://www.debian.org/doc/debian-policy/</a>, which although Debian specific will not steer you wrong for getting started with Ubuntu packages (the Ubuntu Policy Manual appears to be at<a href="http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/">http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/</a>). (The Policy is also packaged up in the package <em>debian-policy</em>, though <em>ubuntu-policy</em> might be of interest too<em>)</em></p>
<h4>Lets Begin</h4>
<p>So, where do we start. Let&#8217;s start at the point where you have a simple program, perhaps a shell/perl/python script that you simply want to package up as a deb for easy installation. The first thing we want to do is make a folder formed out of the package name and version, and put the script in it in the correct place.</p>
<p>Here is my example folder with me example program (called simple-program):</p>
<blockquote><p><em>simple-package-0.1/usr/bin/simple-program</em></p></blockquote>
<p><em></em>Note that the folder is the package name followed by a hyphen and a version number (simple point versions are the easiest to work with, so stick with them if possible)</p>
<p>Now, all work is done from within the package folder normally, so cd into that folder<br />
<em></em></p>
<blockquote><p><em>cd simple-package-0.1</em></p></blockquote>
<p>So far, all we have is just a folder with a binary in the place we want it to end up in. Now we have to &#8220;Debianise&#8221; (or Debianize if you prefer) this into a package<br />
<em></em></p>
<blockquote><p><em><code>dh_make --single  --createorig</code></em></p></blockquote>
<p>This command takes a source tree and turns it into a Debian source package format. The first flag tells dh_make that our source package is only going to build a single binary package (which is the most common). The second argument tells it that we do not have a tarball of our package so it should create a new one for us.</p>
<p>Now if you look in the current folder, you will see a debian/ folder. This is where all the Debian-specific magic happens.</p>
<p>The next thing we do is edit debian/rules</p>
<p>The rules file is the main makefile (or build script) which is run by &#8220;make&#8221; to produce your package. Everything starts from here.<br />
(If you have a new version of dh-make, then your rules file may already look like this, if your dh-make is older then you will end up with a longer file, so edit it to look like this )</p>
<blockquote><p><em><code>$ cat debian/rules<br />
#!/usr/bin/make -f<br />
# -*- makefile -*-<br />
# Sample debian/rules that uses debhelper.<br />
# This file was originally written by Joey Hess and Craig Small.<br />
# As a special exception, when this file is copied by dh-make into a<br />
# dh-make output file, you may use that output file without restriction.<br />
# This special exception was added by Craig Small in version 0.37 of dh-make.</p>
<p># Uncomment this to turn on verbose mode.<br />
#export DH_VERBOSE=1<br />
%:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dh $@<br />
</code></em></p></blockquote>
<p>Note that on the last line, the indent is a TAB character. Make sure you use a tab and not several spaces, as make is very particular about tabs</p>
<p>This debian/rules is really simple &#8211; all it does is says &#8220;whatever I was asked to do, tell the command &#8216;dh&#8217; to do it instead&#8221;. dh has sensible default rules, and you can find more about dh by running the command &#8220;man dh&#8221; to look at it&#8217;s manpage</p>
<p>(If you ever want lots more detail about what each step of building is doing, you can uncomment the line &#8220;export DH_VERBOSE=1&#8243; and each helper script will print out more info)</p>
<p>As the above build file doesn&#8217;t say anywhere which files to copy to the output package, we have to do something to make that happen. We are going to use the debhelper script called dh_install  to do this.</p>
<p>Edit a new file at <em>debian/simple-package.install</em></p>
<p>dh_install looks for this file (actually, it will also look for just <em>debian/install</em>) and will copy any files listed in it into your package. In this file we will put a list of files we want installed, one per line (wildcards work too, but I will list our only file for explicitness)</p>
<blockquote><p><em>$ cat debian/simple-package.install<br />
usr/bin/simple-program</em></p></blockquote>
<p>Notice that we do not have a leading &#8216;/&#8217;, this is deliberate. Also, if you check <em>man dh_install</em> then you will notice that dh_install will not move files to other directories as it is expected that your makefile will do this for you. For now I will assume that your simple package comes with all the files in the correct places.</p>
<h4>Building</h4>
<p>Now let&#8217;s try building. Run <em>dpkg-buildpackage</em> and this will turn your little folder into a Debian source package and then go and create a .deb (It is worth mentioning that the command <em>debuild</em> is also available, but as it is a wrapper around dpkg-buildpackage and other tools I will write more about it later, and just start simply with dpkg-buildpackage)</p>
<p>Have a look:</p>
<blockquote><p><em>$ ls ../simple-package_0.1-1_i386.deb<br />
../simple-package_0.1-1_i386.deb</em></p></blockquote>
<p>See &#8211; you have a .deb</p>
<p>Now let&#8217;s have a look inside it (this is just converting the file to a tar and then asking tar to list it&#8217;s contents):</p>
<blockquote><p><em>$ dpkg &#8211;fsys-tarfile ../simple-package_0.1-1_i386.deb |tar -tv<br />
tar: Record size = 8 blocks<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./usr/<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./usr/sbin/<br />
drwxr-xr-x root/root         0 2010-06-16 17:41 ./usr/bin/<br />
-rwxr-xr-x root/root         0 2010-06-16 17:41 ./usr/bin/simple-program<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./usr/share/<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./usr/share/doc/<br />
drwxr-xr-x root/root         0 2010-06-16 18:48 ./usr/share/doc/simple-package/<br />
-rw-r&#8211;r&#8211; root/root       193 2010-06-16 17:44 ./usr/share/doc/simple-package/README.Debian<br />
-rw-r&#8211;r&#8211; root/root       178 2010-06-16 17:44 ./usr/share/doc/simple-package/changelog.Debian.gz<br />
-rw-r&#8211;r&#8211; root/root       693 2010-06-16 17:44 ./usr/share/doc/simple-package/copyright<br />
</em></p></blockquote>
<p>Notice that your program is listed in <em>./usr/bin/simple-program</em>, and also that there is a changelog, a readme and a copyright file &#8211; I will come on to those later.</p>
<p>So, we&#8217;re done? I can just give this to people?</p>
<p>Erm, no&#8230; Not really</p>
<p>While you may have a package, you will notice that it is a rather dumb package</p>
<blockquote><p><em>$ dpkg-deb -I ../simple-package_0.1-1_i386.deb<br />
new debian package, version 2.0.<br />
size 1730 bytes: control archive= 524 bytes.<br />
303 bytes,    10 lines   control<br />
290 bytes,     4 lines   md5sums<br />
Package: simple-package<br />
Version: 0.1-1<br />
Architecture: i386<br />
Maintainer: anton &lt;anton@unknown&gt;<br />
Installed-Size: 32<br />
Section: unknown<br />
Priority: extra<br />
Homepage: &lt;insert the upstream URL, if relevant&gt;<br />
Description: &lt;insert up to 60 chars description&gt;<br />
&lt;insert long description, indented with spaces&gt;</em></p></blockquote>
<p>See &#8211; it really is a but dumb as we have not configured much about it. Lets start fixing that now as we really don&#8217;t want to be giving this to everyone in it&#8217;s current state</p>
<h4>Package control files</h4>
<p>Let&#8217;s start with the file <em>debian/control</em></p>
<blockquote><p><em><br />
$ cat debian/control<br />
Source: simple-package<br />
Section: unknown<br />
Priority: extra<br />
Maintainer: anton &lt;anton@unknown&gt;<br />
Build-Depends: debhelper (&gt;= 7)<br />
Standards-Version: 3.8.1<br />
Homepage: &lt;insert the upstream URL, if relevant&gt;</em></p>
<p><em> </em><em>Package: simple-package<br />
Architecture: any<br />
Depends: ${shlibs:Depends}, ${misc:Depends}<br />
Description: &lt;insert up to 60 chars description&gt;<br />
&lt;insert long description, indented with spaces&gt;<br />
</em></p></blockquote>
<p>We will want to edit several of these fields. Of course these are all explained in <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html">Chapter 5 of the Debian Policy</a>. The first thing to note is that the first chunk applies to the source package. Here we want to set our Maintainer name and email.<br />
The build-depends are a default guess too, and should be enough for us for now (build-depends is all the packages needed to build this program, which often include any extra libraries you might need or extra tools such as unzip).<br />
<span style="font-size: 13.3333px;"><strong>Important:</strong> As we are using a somewhat new debhelper way of building, and this might not exist on older boxes, we really need the line here that says to use version 7 or newer of debhelper (otherwise someone might try building with only version 6 and it will fail badly)</span></p>
<p>The homepage is also worth filling in if your package has one, but the whole line can be deleted if not required. The section and priority I will leave you to look up in the Debian policy manual if you want to know more about them, but can be left as-is for now</p>
<p>The second block is all about the binary .deb we want to produce. Note that the Package: section has the same name &#8211; This is the default for a &#8220;single package&#8221; that we asked dh_make to create for us, though you can have more than one block if your source package should produce multiple debs.<br />
The Architecture: fields is worth getting correct. You can put in values like <em>i386</em> or <em>amd64</em> if your package will only work there, or if it should compile and work on any architecture you use <em>any</em>. As my package is a simple script-type application, it is actually slightly more special than that and only needs building once and will not need recompiling for any architecture, so I am going to change this to <em>all</em>. &#8220;all&#8221; has a special meaning, telling dpkg-buildpackage to only compile it once and use that on any architecture.</p>
<p>The Depends: field is also another important field to get correct. This says what you will need installed to actually use this package. So if your package is written in Python, then you want to put the correct Python package name in here (and a version in brackets like &#8220;<em>python (&gt;=2.6)</em>&#8220;﻿ if your package needs a minimum level of that package. You can also do OR&#8217;s if you use a pipe &#8220;|&#8221;.<br />
The two magic variable depends are filled in by various debhelper scripts and can be left alone (in this case they will end up empty.</p>
<p>The Description: field has a special formatting. The first line is a short description of less than 60 characters, and then after that is a long description where each line starts with a space. If you want to put an empty line in your long description put a space then a period/dot ( &#8220;.&#8221;) on this line (do not use an empty line). Full explanation is in the Debian Policy.</p>
<p>&#8220;Where do I set the version number&#8221; I hear you ask&#8230; well, I&#8217;m coming to that now</p>
<h4>debian/changelog</h4>
<p>Package versioning is controlled from the <em>debian/changelog</em> file. You can edit this file directly, but it is often easier to use the command <em>dch</em> as it will fill in various fields for you, and can even do simple increments and comments completely from the command line. If you run <em>dch</em> from the main folder of your package it will launch the default editor with a new comment line created for you. If you want to quickly increment the version you can use <em>dch -i</em> and this will do the same, but increment the version number for you first (creating a new changelog entry in doing so).</p>
<p>Let&#8217;s have a quick look at a changelog (you might want to look at <a href="http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog">Section 4.4 of the Debian Policy</a> too)</p>
<blockquote><p><em>$ cat debian/changelog<br />
simple-package (1.0-1) unstable; urgency=low</em></p>
<p><em>* Initial release (Closes: #nnnn)</em></p>
<p><em> </em><em> &#8212; anton &lt;anton@unknown&gt;   Wed, 16 Jun 2010 19:32:10 +0100<br />
</em></p></blockquote>
<p>A changelog file is a colletion of repeated blocks like the above. The first line of a block shows the package name, then the version in brackets, then the release this package was built for and then it&#8217;s urgency. The version here is what comes out when we build our package. The release is only really used when uploading a package as the build-systems look for this field to work out where your package should go (in Debian you would have something like stable or testing, whereas in Ubuntu you would use the release name such as lucid or maverick)</p>
<p>Then we have a set of specially formatted bullet points. You can have many of these, but check the policy for allowed formatting. Notice that we have a Closes section here. This is used by bugtrackers that are attached to the package building systems, and unless you are uploading to one of these is probably simplest to remove.</p>
<p>Then we have the signature line which should have your name and email address, followed by two spaces and a timestamp. If you use <em>dch -i</em> then dch will create all this for you, and if you check the man page for it you can see how to set environment variables in your shell so that you do not have to tell it your correct name or email address. (It is worth mentioning the -v flag to dch. This lets you set a specific version to be put in the changelog, which is useful when you want to go up to version 2.0 or similar.)</p>
<p>It is perhaps worth mentioning that there are two types of source packages.</p>
<p>The usual type of package has version numbers that have a hyphen in them and the part before the hyphen is the upstream number, and the part after is the Debian revision. This is used to show that the upstream code has a specific version number but allows us to have our own incremented versions that clearly show that we are not shipping a new version of the upstream code but merely patches or even just packaging fixes which do not change the upstream code at all.<br />
When built, these types of packages output a .orig.tar.gz file and a .diff.gz file. This allows the upstream code only to be in the orig.tar.gz, and the diff.tar.gz to be a diff file of all the changes we have made, including the entire contents of the debian/ folder</p>
<p>The second type of package is a &#8220;native Debian&#8221; package. This package has simpler version numbers and only builds a .tar.gz file. This format is normally only used for packages that are entirely owned by Debian (or Ubuntu) and the source code was created entirely for use in Debian (or Ubuntu).</p>
<p>You can choose which type of package your&#8217;s is by how the version number is structured. Without a hyphen it will be a &#8220;native&#8221; package, however I recommend you use the first type by default (you can also force the type with flags to dpkg-buildpackage).<br />
The advantage of the first type of package is that because you have a .diff.gz and a .orig.tar.gz if you are uploading a very large package you only need to upload the .orig.tar.gz if the code in it has changed. If you are just making packaging fixes, or small patches then these are all in the .diff.gz and will be a much smaller upload.</p>
<h4>Other files</h4>
<p>Of course there are many other files in debian/ which are mostly templates created by dh_make. I will only explain a few here as they are all pretty well covered in the Debian Policy</p>
<p><em>debian/copyright</em> &#8211; You should put a full license in this file so that people know what license your code is under (see S<a href="http://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile">ection 12.5 of the Debian Policy manual</a>)</p>
<p><em>debian/README.Debian</em> &#8211; This file is a readme file that is normally used to supplement any upstream readme file. It is copied out to /usr/share/doc/package-name/ as you saw above in the .deb. It should explain anything you have to do to make this package work that may be different from the upstream readme (if any) and normally contains the &#8220;Debian way&#8221; of getting your program running.</p>
<p><em>debian/compat</em> &#8211; This file sets the compatibility level of the debhelper tools &#8211; you normally don&#8217;t need to change this</p>
<p><em>debian/package-name.dirs</em> or <em>debian/dirs</em> &#8211; This file will create empty directories that your package might need. Note that you rarely ever need this as dh_install will create any directories that will be needed to hold the files it copies (I mention this as I frequently see it being used unnecessarily)</p>
<p><em>debian/preinst, debian/postinst, debian/prerm, debian/postrm</em> &#8211; These files (also can be done as package-name.preinst) are the Pre and Post install/remove scripts. I won&#8217;t talk much about them now as you shouldn&#8217;t need to use them in simple packages. Note that dh_make creates some .ex files as example scripts. As usual see the Debian Policy if you need these</p>
<p><em>debian/docs</em> &#8211; This file lists any doc files you want copied into the /usr/share/doc/package-name/ in your package. It works like dh_install but see the manpage of  dh_installdocs for more information</p>
<p>That is probably all the interesting files for now, you can probably remove all the other files as they are simply template or example files.</p>
<h4>Other build output files</h4>
<p>You might have noticed that when you built your package, as well as the .orig.tar.gz, the diff.gz and the .deb you also got a .dsc file and a .changes file.</p>
<p>The .changes file is used to describe this version of your package, and contains the latest chunk of your changelog. It also is used by tools such as dput to describe which files to upload and contains the checksums/hashes of these files. This file is usually signed with gpg to prove that this package was built by you.</p>
<p>The .dsc file is kind of similar, except it is purely about the source package. It has the checksums of the source files and is also signed. It also contains details such as the build-dependencies of your package so that systems can use it to work out what needs to be installed to build your package correctly.</p>
<p>You will probably only need either of these files if you are uploading files to some sort of repository, as they are mostly consumed by other programs.</p>
<p>If you try getting the source of a package, try <em>apt-get source hostname</em> then you will see that this downloads the .dsc file, and the releveant source files. If you want to unpack the source, you can use <em>dpkg-source -x *.dsc</em> (or if you want to build the binary package straight away, try <em>apt-get -b source hostname</em> and it will download and build though you might need to run <em>apt-get build-dep hostname</em> to install all the build packages needed for the hostname package)</p>
<h4>Advanced building</h4>
<p>So you can now create a simple package, you know how to set all the control files and how to increment the version in the changelog (hopefully using <em>dch</em>). Let&#8217;s look briefly at some more advanced building with dpkg-buildpackage.</p>
<p>Some packages want to be root to build. What they really want is to feel like they are root, so you can use the program <em>fakeroot</em> to build a package that complains it is not root (this way you don&#8217;t actually need root)<br />
<em>$ fakeroot dpkg-buildpackage</em> &#8230;.</p>
<p>If you have gpg set up, then you will have noticed that every time you build a package dpkg-buildpackage asks you to enter your passphrase. While this is great for giving the package to others, it can be really annoying if you are doing test builds. The flags <em>-us</em> and <em>-uc</em> (unsigned source, unsigned changes) will stop it asking you.</p>
<p>If you just want to build the source package you can use <em>-S</em> to force that.<br />
Similarly to just build the binary use the <em>-b</em> flag.</p>
<p>If your package is a non-native package, then dpkg-buildpackage will only put the .orig.tar.gz in the .changes file if the version ends in &#8220;-1&#8243;, otherwise it assumes your .orig.tar.gz is already on the server you are going to copy to (normally using dput). If you want to force it to include the .orig.tar.gz use the <em>-sa</em> flag</p>
<p>One thing worth doing if you do much packaging, is creating a chroot for building in. This way you will know that your build-depends are complete and that if you give the package to someone else (or use another computer) it will definitely build (it is easy to forget all the packages you installed on your box to make it build).</p>
<p>The simplest way to do this is to setup either a pbuilder environment or an sbuild environment, but I will leave an explanation of this for another post.</p>
<p>Enjoy creating your new .deb packages</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fixing broken LVM and Sofware Raid on Linux</title>
		<link>http://www.strangeparty.com/2010/05/23/fixing-broken-lvm-and-sofware-raid-on-linux/</link>
		<comments>http://www.strangeparty.com/2010/05/23/fixing-broken-lvm-and-sofware-raid-on-linux/#comments</comments>
		<pubDate>Sun, 23 May 2010 14:23:17 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=632</guid>
		<description><![CDATA[<p>I have been building a backup pc our of mostly spare parts, including several old disks. To get the most reliability and space our of the disks, which are all different sizes, I decided to use software raid to mirror each chunk of data in pairs (raid 0) and then use LVM on top of each <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2010/05/23/fixing-broken-lvm-and-sofware-raid-on-linux/">Fixing broken LVM and Sofware Raid on Linux</a></span>]]></description>
			<content:encoded><![CDATA[<p>I have been building a backup pc our of mostly spare parts, including several old disks. To get the most reliability and space our of the disks, which are all different sizes, I decided to use software raid to mirror each chunk of data in pairs (raid 0) and then use LVM on top of each piece of raid to make all the raid volumes appear as one storage device to the linux OS.</p>
<p>The disks are as follows: 250G, 200G, 160G 120G, so to get the most space out of them I divided them as follows (Note: this is a simplification for the purpose of explanation, the real disk also has a raid 0, mirrored /boot/ partition which is not mentioned below. You need this because LVM is not supported by GRUB, so you can&#8217;t boot from a LVM volume):<br />
250G: A (200G), C (40G)<br />
200G: A (200G)<br />
160G: B (120G) C (40G)<br />
120G: B (120G)</p>
<p>A,B,C are partitions on the disks for software raid &#8211; I then set up software raid for each pair of A,B,C and set the created LVM physical volumes on top of them, which then are grouped together into one large volume group, giving me around 360G (actually less once you convert to base 2 rather than 10) of mirrored data storage. Note that I can lose any one disk and still have all my data (though I wouldn&#8217;t want to hang around too long replacing the disk as a second disk failing could mean you lose most of your data).</p>
<p>I actually created 3 LVM logical volumes, one for mounting each of / (the root of the disk for all OS data), /home (for all the stuff I actually really care about), and a volume for swap that doesn&#8217;t really need to be in lvm or raid, but it was just easier to do.</p>
<p>I previously wrote instructions about <a href="http://">how to setup LVM and software raid</a>, but this time round managed to completely screw the whole lot up just near the end. I forgot to define one of the raid devices in /etc/mdadm/mdadm.conf so next time I rebooted this raid device was not found in the early boot stages. As this raid volume is needed to create the full set of LVMs for my root filesystem, the system stopped booting right at the beginning because the LVM array was incomplete.</p>
<p>Fixing it was actually not to difficult, but I mention it here in case it is of help to anyone else (or in case I manage to do it again, which is probably likely)</p>
<p>Fist I booted a Ubuntu Live CD (actually a USB stick image created from my running Ubuntu laptop and a spare Ubuntu CD), but nearly any live cd should do. Once booted, I had to install (in the live session) mdadm and lvm2 as Ubuntu does not have these installed by default. Once you have these tools you can start your recovery (note that this needs to be done with root permissions, so <em>sudo -s</em> or similar to get a root shell)</p>
<p>Find the raid devices with <em>mdadm &#8211;assemble &#8211;scan</em> and then use <em>pvscan</em> and <em>lvscan</em> as required until your system has found your lvm config, then mount it (don&#8217;t forget to mount /boot/ too as we will need to rebuild the initrd)</p>
<pre>mkdir /tmp/root
mount /dev/mapper/main-root /tmp/root
mount /dev/md0 /tmp/root/boot
chroot /tmp/root</pre>
<p>Now you should be pretty much inside your root filesystem on your lvm array. Now we need to make sure all the raid arrays are configured in /etc/mdadm/mdadm.conf</p>
<p>Run <em>mdadm &#8211;detail &#8211;scan</em> to generate the lines for the config file, and make sure each array is listed in /etc/mdadm/mdadm.conf</p>
<p>From here it is pretty simple, all we have to do is rebuild the initrd so that it knows how to find all the raid and lvm devices needed during boot. <em>dpkg-reconfigure linux-image-&lt;your current kernel version&gt; </em>It is imporant to<em> </em>make sure that you get the right kernel, so have a look in /boot to check you get the right version (<em>uname -r</em> wont work here because you have booted your live cd image and not the kernel your box will run)</p>
<p>I got several warnings about /proc/ not being mounted, but this did not appear to be a problem.</p>
<p>Reboot, and you should be ok. You may want to make a copy of your current kernel in case you accidentally break it, just copy the linux-image&#8230;gz and initrd&#8230;gz from /boot/ to new names and run <em>update-grub</em> and that should give you two kernels to choose from (hopefully booting choosing them in the right order, the order should be based on the version numbers in your kernel files so adjust if needed)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2010/05/23/fixing-broken-lvm-and-sofware-raid-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Book review: Python 3 for Absolute Beginners</title>
		<link>http://www.strangeparty.com/2010/04/02/review-python3/</link>
		<comments>http://www.strangeparty.com/2010/04/02/review-python3/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 11:08:34 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Reading]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=635</guid>
		<description><![CDATA[<p>Python 3 for Absolute Beginners, Tim Hall and J-P Stacey, Apress (ISBN: 978-1-4302-1632-2)</p>
<p>Disclaimer: I was asked to review this book through the Hampshire Linux User Group. I did not receive any instruction for the outcome of the review nor any payment for the review (though I did get to keep the book).</p>
<p> I believe it is <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2010/04/02/review-python3/">Book review: Python 3 for Absolute Beginners</a></span>]]></description>
			<content:encoded><![CDATA[<p>Python 3 for Absolute Beginners, Tim Hall and J-P Stacey, Apress (ISBN: 978-1-4302-1632-2)</p>
<p><em>Disclaimer: I was asked to review this book through the Hampshire Linux User Group. I did not receive any instruction for the outcome of the review nor any payment for the review (though I did get to keep the book).</em></p>
<p><em></em> I believe it is important to know something about a reviewer of a book, so that the statements made can be fully appreciated. I am a Software Developer, so spend most of my day reading and writing code. These days it is mostly Perl and Java, though some days it is all C++. I have never written Python before, though I have poked at about two scripts (and even made a fix to one), but it is probably fair to say that I have spent less than an hour looking at Python code before reading this book.</p>
<p>The book does actually mention that the source code examples are available for download from Apress.com however it is mentioned on the first inside page where all the copyright information is (and which you normally skip over automatically). If you want the exapmles, they are at <a href="http://apress.com/book/downloadfile/4500﻿﻿﻿">http://apress.com/book/downloadfile/4500﻿﻿﻿</a></p>
<p>The book opens fairly well for a beginners book, and seems strongly aimed at someone who has never programmed before (I have heard lots of people recommending Python as a good language to teach yourself programming with and can understand why). I was pleased to an early reference to <a href="http://en.wikipedia.org/wiki/Monty_Python">Monty Python</a> as well, as <a href="http://en.wikipedia.org/wiki/Python_(programming_language)#Neologisms">this is where the name Python comes from</a>.</p>
<p>The use of Python&#8217;s interactive interpreter is excellent and it makes for great examples of simple parts of the language, while also being so short that you actually want to type them into your computer and try them out! In particular the author&#8217;s use of Pythons interpreter to print out details of a data-type or variable, and even the outcome of comparisons (e.g. entering &#8220;1==2&#8243; into the Python interpreter returns &#8220;False&#8221; without having to actually use a print statement or any other debug methods which I think is fantastic for a new programmer and a real time saver)</p>
<p>It is a shame that the author fails to stress the differences between Python 2.x and 3.x strongly enough. While some code will work on both versions, there are very large changes and it should have been made more clear early on that Python 2.x code is unlikely to work in Python 3.x, and vice-versa, as I would expect users to also seek examples on the web and it will just be confusing if the examples don&#8217;t work because of changes between versions of Python.</p>
<p>By chapter two some software design principles have been introduced alongside the first actual program, which is of course &#8220;hello world&#8221;. The author spends a long time talking about Software Engineering and Design principles, which is all valuable information, but I doubt many readers will actually spend time reading this and will instead skip over it. It does cover pretty much everything from design approaches (inside-out vs top-down) all the way to code control, versioning, comments, documentation, etc so certainly tries to cover all the bases.</p>
<p>The book then moves on to explaining variables and datatypes, operators and precedence, integers vs floats and all the core basics of a language. I initially thought that explanations of Octal and Hexadecimal values were perhaps a little advanced for a book aimed at &#8220;Absolute Beginners&#8221;, but the author did make a good point that these are often used in file permissions and html colours and this makes them very useful to know.</p>
<p>The examples in the book start off short and sweet, but at some point the author had the idea to continually rework a text-based RPG game he invented for the book. The only problem with this is that you end up staring at several pages of code, and all you want to do then is skip over it, and then start skipping the explanations of this long code. I think the author was trying to teach some good refactoring techniques throughout the book by using this larger piece of code, however I feel that shorter, separate examples would have been easier to understand.</p>
<p>At one point the example programs start using  &#8217;#! /usr/bin/env python&#8217; as the first line of the code but without any explanation. My personal opinion is that &#8216;#!/usr/bin/python&#8217; is more common however even that has its problems. As Python 3 is still very new, pretty much all current Linux systems will have Python 2.x installed as /usr/bin/python so both of these methods would attempt to run the code with Python 2.x and not 3.x. Many of the example source files from the website are also the same, and because they do not define python3 as the interpreter via the hash-bang (#!) line they will not run if you just try to execute them, which is a real shame. Some of the downloaded source code gets very close with &#8217;#! /usr/bin/env python3.0&#8242;, however on Ubuntu Karmic the current Python 3.x version is 3.1, so this code still fails to run unless you explicitely call it with Python3.1 or edit the line to just have &#8220;#!/usr/bin/env python3&#8242; which is symlinked to 3.1  Some of the short examples, particularly around regular expressions, refer back to variables that were last shown to the reader four or give pages previously. This makes it very hard</p>
<p>Other than the above minor problems with the book, it makes a very thorough introduction to programming and Python 3. If you have never programmed, then this is a very good book to start with. If you have programmed, but never in Python then this book is still very good, though you will find yourself skipping sections here and there. If you already know Python 2.x then this book is probably not for you, as it only explains a few changes between version 2.x and 3, and you will probably know the rest already.</p>
<p>One thing to mention is that Python 3 is still very new, and in fact 2.6 is the default for the Ubuntu Lucid Lynx release as well as (at this stage) Debian Squeeze. I expect Python 3 is still a few good years from becoming the default &#8211; This is either a good thing as you have more time to learn version 3, or it can be seen as a bad thing as most existing code is based on 2.x and will need quite a bit of changing to work in version 3 (and vice-versa).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2010/04/02/review-python3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-platform realtime collaborative editing</title>
		<link>http://www.strangeparty.com/2009/11/11/cross-platform-realtime-collaborative-editing/</link>
		<comments>http://www.strangeparty.com/2009/11/11/cross-platform-realtime-collaborative-editing/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 12:04:21 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=590</guid>
		<description><![CDATA[<p>I recently stumbled across Gobby:</p>
<p>Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms.</p>
<p>It looks really cool, and the realtime-editing would be very well suited to trying to draw up any form of document or source code <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/11/11/cross-platform-realtime-collaborative-editing/">Cross-platform realtime collaborative editing</a></span>]]></description>
			<content:encoded><![CDATA[<p>I recently stumbled across <a href="http://gobby.0x539.de/trac/">Gobby</a>:</p>
<blockquote><p>Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms.</p></blockquote>
<p>It looks really cool, and the realtime-editing would be very well suited to trying to draw up any form of document or source code at the same time when you will have too much activity for trying to use a code repository.</p>
<p>It is a shame Gobby does not have hooks builtin to allow loading code from a VCS or DVCS (that would be cool), but you can launch it headless on a server with an auto-save directory and then all connect in and start loading documents. There are times when I have wanted something like this, particularly when you are starting out a new piece of code and have several people wanting to get started right away. Once the pace dies down, it probably makes a lot of sense to move the file to your source code control system, but for that initial burst this looks like a fantastic tool</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/11/11/cross-platform-realtime-collaborative-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Global Jam</title>
		<link>http://www.strangeparty.com/2009/09/22/ubuntu-global-jam/</link>
		<comments>http://www.strangeparty.com/2009/09/22/ubuntu-global-jam/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 17:14:01 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=558</guid>
		<description><![CDATA[<p>I recently noticed that 2nd-4th October is Ubuntu Global Jam. There is actually a meetup in Birmingham:</p>
<p>Ubuntu Global Jam – Birmingham (UK) &#8211; Source Guru
So, if you’re interested in helping make Ubuntu a better distro, and live in (or can travel to) the Birmingham Area in the UK, then you’re welcome to come along.</p>
<p>The Jam is <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/09/22/ubuntu-global-jam/">Ubuntu Global Jam</a></span>]]></description>
			<content:encoded><![CDATA[<p>I recently noticed that 2nd-4th October is <a href="https://wiki.ubuntu.com/UbuntuGlobalJam">Ubuntu Global Jam</a>. There is actually a meetup in Birmingham:</p>
<blockquote><p><a href="http://www.sourceguru.net/ubuntu-bugjam-birmingham-uk/">Ubuntu Global Jam – Birmingham (UK) &#8211; Source Guru</a><br />
So, if you’re interested in helping make Ubuntu a better distro, and live in (or can travel to) the Birmingham Area in the UK, then you’re welcome to come along.</p>
<p>The Jam is on the 2nd-4th October, and we’ll be around on all three days&#8230;.   Last year we had a great time, with refreshments (including beer) provided. Juggling penguins, and one person sleeping underneath the conference room table overnight.  Hopefully we’ll also have the live Video Streams up and running again for anyone who can’t make it (or other Ubuntu Jams) to join in with!</p></blockquote>
<p>However another question also occured &#8211; how much interest would there be in the south of England in order to try and organise one closer to home. We don&#8217;t really even need an official Ubuntu developer, as there is plenty of instructions and irc can provide access to developers real-time if we need them.</p>
<p>The only thing we need is a venue (I could possibly get use of the IBM site again) and enough people that want to contribute something to Ubuntu. The contribution could be packaging new programs, fixing bugs, raising bugs, improving documents, or translating documents (<a href="https://translations.edge.launchpad.net/ubuntu/karmic/+lang/en_GB">translation into British English</a> anyone?)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/09/22/ubuntu-global-jam/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux User Group @ Hursley</title>
		<link>http://www.strangeparty.com/2009/09/16/linux-user-group-hursley/</link>
		<comments>http://www.strangeparty.com/2009/09/16/linux-user-group-hursley/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 17:56:09 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[HantsLug]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[hants]]></category>
		<category><![CDATA[hursley]]></category>
		<category><![CDATA[lug]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=553</guid>
		<description><![CDATA[<p>On Saturday I hosted a group for 30 people at IBM Hursley for a Hampshire Linux User Group meeting.</p>
<p>We had a good set of talks, including Andy Stanford-Clark talking about his twittering house and mousetraps as well as the twittering Red Funnel Ferries [telegraph.co.uk] and his energy monitoring via Current Cost devices.
I did a brief (although <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/09/16/linux-user-group-hursley/">Linux User Group @ Hursley</a></span>]]></description>
			<content:encoded><![CDATA[<p>On Saturday I hosted a group for 30 people at IBM Hursley for a <a href="http://hants.lug.org.uk/">Hampshire Linux User Group</a> meeting.</p>
<p>We had a good set of talks, including <a href="http://www.twitter.com/andysc">Andy Stanford-Clark</a> talking about his twittering house and mousetraps as well as the twittering <a href="http://www.telegraph.co.uk/travel/travelnews/6188760/Twittering-ferries-alert-passengers-to-delays.html">Red Funnel Ferries</a> [telegraph.co.uk] and his energy monitoring via Current Cost devices.<br />
I did a brief (although rather technical) introduction to Debian packages (which will turn into a blogpost soon with any luck).<br />
Laura Cowen did a nice talk on <a href="http://activities.sugarlabs.org/en-US/sugar/addon/4042">InfoSplicer</a> which was originally designed for the Sugar platform of the <a href="http://laptop.org/">OLPC</a> hardware.<br />
Tony Whitmore gave a rather interesting talk on podcasting, from his experience in doing the  <a href="http://podcast.ubuntu-uk.org/">Ubuntu UK Podcast</a><br />
Adam Trickett talked about book reviews, and gave out a pile of free books for people to have in return for writing a review.</p>
<p><a href="http://lauracowen.co.uk/">Laura Cowen</a> also did an excellent writeup for <a href="http://eightbar.co.uk/2009/09/16/linux-users-descend-on-the-house/">eightbar</a></p>
<blockquote><p>On Saturday, we were mostly in the Auditorium (where Spitfires were built during WWII), then when we led everyone down to the Clubhouse for lunch, we took the usual site tour scenic route via the Sunken Garden and fish pond. Although Hursley is out in the country, seemingly the middle of nowhere, it’s actually on the bus-route from Winchester so we had an excellent turnout of about 30 people. IBM Hursley also has a lot of cool people who do cool things that we can tell people about (although one piece of feedback I heard from a LUG person was that they thought we didn’t talk enough about what IBM does!).<br />
&#8230;</p>
<p>It was a really enjoyable and relaxed day; kudos to Anton, Stephen, and John for organising it from the IBM end. Thanks also to the IBMers who came along and to the many HantsLUG members who turned up. I’d say it was a success and we should definitely do it again.<br />
<a href="http://eightbar.co.uk/2009/09/16/linux-users-descend-on-the-house/">Linux Users descend on the House | eightbar</a></p></blockquote>
<p>The day was terrific (at least for me) and I hope to organise another one in the near future, as it turned out to be nowhere near as hard as I thought it was going to be (I thought it was going to be difficult persuading security etc to let me bring 30 people on site over a weekend when the site only has minimal staff).</p>
<p>Thanks to all those that helped, particularly <a href="http://bluemonki.net/">John Wesley</a> and Stephen Godwin, and also thanks to all those who turned up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/09/16/linux-user-group-hursley/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apt-Pinning</title>
		<link>http://www.strangeparty.com/2009/04/22/apt-pinning/</link>
		<comments>http://www.strangeparty.com/2009/04/22/apt-pinning/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:16:25 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=511</guid>
		<description><![CDATA[<p>If you run a Debian or Ubuntu system and have more than one release in your apt-sources file (/etc/apt/sources.list) then you should probably learn the basics of apt-pinning. Apt-pinning allows you to have a specific package stay at a certain level or set a preference for it to be installed from a specific release. This way <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/04/22/apt-pinning/">Apt-Pinning</a></span>]]></description>
			<content:encoded><![CDATA[<p>If you run a Debian or Ubuntu system and have more than one release in your apt-sources file (/etc/apt/sources.list) then you should probably learn the basics of apt-pinning. Apt-pinning allows you to have a specific package stay at a certain level or set a preference for it to be installed from a specific release. This way you can have the latest version of package X from a cutting-edge server without worrying about the rest of your packages moving up to cutting-edge levels by accident.</p>
<p>Two excellent resources are:</p>
<ul>
<li><a href="http://wiki.debian.org/AptPinning">AptPinning &#8211; Debian Wiki</a></li>
<li><a href="http://www.howtoforge.com/a-short-introduction-to-apt-pinning">howtoforge &#8211; A short introduction to apt-pinning</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/04/22/apt-pinning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KDE 4.2 on Debian</title>
		<link>http://www.strangeparty.com/2009/04/21/kde-42-on-debian/</link>
		<comments>http://www.strangeparty.com/2009/04/21/kde-42-on-debian/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:13:13 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=509</guid>
		<description><![CDATA[<p>I recently installed KDE 4.2 on my Debian laptop, and found the whole process surpisingly easy and now working very nicely.</p>
<p>Following the instructions from The Debian KDE maintainers website, all that is required is enabling a sid repository and then installing the kde4 package which does the usual full-install of KDE. It is worth noting that <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/04/21/kde-42-on-debian/">KDE 4.2 on Debian</a></span>]]></description>
			<content:encoded><![CDATA[<p>I recently installed KDE 4.2 on my Debian laptop, and found the whole process surpisingly easy and now working very nicely.</p>
<p>Following the instructions from <a href="http://pkg-kde.alioth.debian.org/kde4.html">The Debian KDE maintainers website</a>, all that is required is enabling a sid repository and then installing the <strong>kde4</strong> package which does the usual full-install of KDE. It is worth noting that it will warn you about installing in a running KDE session, so it is best to logout and use another windowmanager (like the failsafe one) or just a virtual console.</p>
<p>Once done, log back in with KDE and the migration wizard will move your data over (backing up the KDE3 settings in case you want to revert).</p>
<p>For me the process was painless and fairly quick. Configuring KDE to my liking took a little while, but I am quite liking it now and the widgets are quite cool. I have yet to turn on the special effects as I never got round to sorting out the ATI 3D drivers on my laptop since installing it, as they have been rather poor in the past (not sure if they are better now, but I use less power without the effects anyway)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/04/21/kde-42-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian GNU/Linux 5.0 released (codenamed &#8220;Lenny&#8221;)</title>
		<link>http://www.strangeparty.com/2009/02/15/lenny-release/</link>
		<comments>http://www.strangeparty.com/2009/02/15/lenny-release/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 10:48:28 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[released]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=484</guid>
		<description><![CDATA[<p>The Debian Project is pleased to announce the official release of Debian GNU/Linux version 5.0 (codenamed &#8220;Lenny&#8221;) after 22 months of constant development. Debian GNU/Linux is a free operating system which supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments. It also features compatibility with the FHS v2.3 <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/02/15/lenny-release/">Debian GNU/Linux 5.0 released (codenamed &#8220;Lenny&#8221;)</a></span>]]></description>
			<content:encoded><![CDATA[<blockquote><p>The Debian Project is pleased to announce the official release of Debian GNU/Linux version 5.0 (codenamed &#8220;Lenny&#8221;) after 22 months of constant development. Debian GNU/Linux is a free operating system which supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments. It also features compatibility with the FHS v2.3 and software developed for version 3.2 of the LSB.</p>
<p><span id="more-484"></span></p>
<p>Debian GNU/Linux runs on computers ranging from palmtops and handheld systems to supercomputers, and on nearly everything in between. A total of twelve architectures are supported: Sun SPARC (sparc), HP Alpha (alpha), Motorola/IBM PowerPC (powerpc), Intel IA-32 (i386), IA-64 (ia64), HP PA-RISC (hppa), MIPS (mips, mipsel), ARM (arm, armel), IBM S/390 (s390), and AMD64 and Intel EM64T (amd64).</p>
<p>Debian GNU/Linux 5.0 &#8220;Lenny&#8221; adds support for Marvell&#8217;s Orion platform which is used in many storage devices. Supported storage devices include the QNAP Turbo Station series, HP Media Vault mv2120, and Buffalo Kurobox Pro. Additionally, &#8220;Lenny&#8221; now supports several Netbooks, in particular the Eee PC by Asus. &#8220;Lenny&#8221; also contains the build tools for Emdebian which allow Debian source packages to be cross-built and shrunk to suit embedded ARM systems.</p>
<p>Debian GNU/Linux 5.0 &#8220;Lenny&#8221; includes the new ARM EABI port, &#8220;armel&#8221;. This new port provides a more efficient use of both modern and future ARM processors. As a result, the old ARM port (arm) has now been deprecated. This release includes numerous updated software packages, such as the K Desktop Environment 3.5.10 (KDE), an updated version of the GNOME desktop environment 2.22.2, the Xfce 4.4.2 desktop environment, LXDE 0.3.2.1, the GNUstep desktop 7.3, X.Org 7.3, OpenOffice.org 2.4.1, GIMP 2.4.7, Iceweasel 3.0.6 (an unbranded version of Mozilla Firefox), Icedove 2.0.0.19 (an unbranded version of Mozilla Thunderbird), PostgreSQL 8.3.6, MySQL 5.0.51a, GNU Compiler Collection 4.3.2, Linux kernel version 2.6.26, Apache 2.2.9, Samba 3.2.5, Python 2.5.2 and 2.4.6, Perl 5.10.0, PHP 5.2.6, Asterisk 1.4.21.2, Emacs 22, Inkscape 0.46, Nagios 3.06, Xen Hypervisor 3.2.1 (dom0 as well as domU support), OpenJDK 6b11, and more than 23,000 other ready-to-use software packages (built from over 12,000 source packages).</p>
<p>With the integration of X.Org 7.3 the X server autoconfigures itself with most hardware. Newly introduced packages allow the full support of NTFS filesystems and the use of most multimedia keys out of the box. Support for Adobe(R) Flash(R) format files is available via the swfdec or Gnash plugins. Overall improvements for notebooks have been introduced, such as out of the box support of CPU frequency scaling. For leisure time several new games have been added, including puzzle games as well as first-person shooters. Also notable is the introduction of &#8220;goplay&#8221;, a graphical games browser offering filters, search, screenshots and<br />
descriptions for games in Debian.</p>
<p>The availability and updates of OpenJDK, GNU Java compiler, GNU Java bytecode interpreter, Classpath and other free versions of Sun&#8217;s Java technology, into Debian GNU/Linux 5.0 allow us to ship Java-based applications in Debian&#8217;s &#8220;main&#8221; repository. Further improvements in system security include the installation of available security updates before the first reboot by the Debian Installer, the reduction of setuid root binaries and open ports in the standard installation, and the use of GCC  ardening features in the builds of several security-critical packages. Various applications have specific improvements, too. PHP for example is now built with the Suhosin<br />
hardening patch.</p>
<p>For non-native English speaking users the package management systems now support translated package descriptions and will automatically show the description of a package in the native language of the user, if available. Debian GNU/Linux can be installed from various installation media such as DVDs, CDs, USB sticks and floppies, or from the network. GNOME is the default desktop environment and is contained on the first CD. Other desktop environments &#8211; KDE, Xfce, or LXDE &#8211; can be installed through two new alternative CD images. Again available with Debian GNU/Linux 5.0 are multi-arch CDs and DVDs supporting installation of multiple architectures from a single disc; and this release adds Blu-ray Discs, allowing the archive for an entire architecture to be shipped on a single BD.</p>
<p>In addition to the regular installation media, Debian GNU/Linux can now also be directly used without prior installation. The special images used, known as live images, are available for CDs, USB sticks, and netboot setups. Initially, these are provided for the amd64 and i386 architectures only.</p>
<p>The installation process for Debian GNU/Linux 5.0 has been improved in many ways: among many other improvements, support for installation from more than one CD or DVD has been restored, firmware required by some devices can be loaded by using removable media, and installations via Braille display are supported. The installer boot process has also received much attention: a graphical menu can be used to choose front-ends and desktop environments, and to select expert or rescue mode. The installation system for Debian GNU/Linux has now been translated to 63 languages.</p>
<p>Debian GNU/Linux can be downloaded right now via bittorrent (the recommended way), jigdo or HTTP; see Debian GNU/Linux on CDs [1] for further information. It will soon be available on DVD, CD-ROM and Blu-ray Disc from numerous vendors [2], too. Upgrades to Debian GNU/Linux 5.0 from the previous release, Debian<br />
GNU/Linux 4.0 (codenamed &#8220;Etch&#8221;) are automatically handled by the aptitude package management tool for most configurations, and to a certain degree also by the apt-get package management tool. As always, Debian GNU/Linux systems can be upgraded painlessly, in place, without any forced downtime, but it is strongly  recommended to read the release notes [3] for possible issues, and for detailed instructions on installing and upgrading. The release notes will be further improved and<br />
translated to additional languages in the weeks after the release.</p>
<p>1: <a href="http://www.debian.org/CD/" target="_blank">http://www.debian.org/CD/</a><br />
2: <a href="http://www.debian.org/CD/vendors" target="_blank">http://www.debian.org/CD/vendors</a><br />
3: <a href="http://www.debian.org/releases/lenny/releasenotes" target="_blank">http://www.debian.org/releases/lenny/releasenotes</a></p>
<p>Dedication<br />
&#8212;&#8212;&#8212;-</p>
<p>Debian GNU/Linux 5.0 &#8220;Lenny&#8221; is dedicated to Thiemo Seufer, a Debian Developer who died on December 26th, 2008 in a tragic car accident. Thiemo was involved in Debian in many ways. He has maintained several packages and was the main supporter of the Debian port to the MIPS architectures. He was also a member of our kernel team, as well as a member of the Debian Installer team. His contributions reached far beyond the Debian project. He also worked on the MIPS port of the Linux kernel, the MIPS emulation of qemu, and far too many smaller projects to be named here.</p>
<p>Thiemo&#8217;s work, commitment, broad technical knowledge and ability to share this with others will be missed. Thiemo&#8217;s contributions will not be forgotten. The high standards of his work make it hard to pick up.</p>
<p>About Debian<br />
&#8212;&#8212;&#8212;&#8212;</p>
<p>Debian GNU/Linux is a free operating system, developed by more than a thousand volunteers from all over the world who collaborate via the Internet. Debian&#8217;s dedication to Free Software, its non-profit nature, and its open development model make it unique among GNU/Linux distributions.</p>
<p>The Debian project&#8217;s key strengths are its volunteer base, its dedication to the Debian Social Contract, and its commitment to provide the best operating system possible. Debian 5.0 is another important step in that direction.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/02/15/lenny-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Secret Lives of Ubuntu and Debian Users</title>
		<link>http://www.strangeparty.com/2009/01/25/the-secret-lives-of-ubuntu-and-debian-users/</link>
		<comments>http://www.strangeparty.com/2009/01/25/the-secret-lives-of-ubuntu-and-debian-users/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 12:16:14 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=467</guid>
		<description><![CDATA[<p>The Secret Lives of Ubuntu and Debian Users is an article which looks at the package install and use date from the popularity-contest package. There are some interesting conclusions that can be drawn from this data:
</p>
<p>The Ubuntu results list 425,490 installations of Firefox 3.0, only 92,629 Votes and 63,034 Recent upgrades. In other words, although roughly <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/01/25/the-secret-lives-of-ubuntu-and-debian-users/">The Secret Lives of Ubuntu and Debian Users</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://itmanagement.earthweb.com/osrc/article.php/3796126/The-Secret-Lives-of-Ubuntu-and-Debian-Users.htm">The Secret Lives of Ubuntu and Debian Users</a> is an article which looks at the package install and use date from the popularity-contest package. There are some interesting conclusions that can be drawn from this data:<a href="http://itmanagement.earthweb.com/osrc/article.php/3796126/The-Secret-Lives-of-Ubuntu-and-Debian-Users.htm"><br />
</a></p>
<blockquote><p>The Ubuntu results list 425,490 installations of Firefox 3.0, only 92,629 Votes and 63,034 Recent upgrades. In other words, although roughly half of Ubuntu installations reporting include Firefox, only about 20% have used it in the last 30 days, and only 13% have upgraded it.</p>
<p>With IceWeasel, Debian&#8217;s non-branded version of Firefox, of 46,276 installs, only 25,797 46% are recently used, and 11,207 24% recently upgraded.</p>
<p>Percentages differ for other packages, but in almost every case, figures for use and upgrading are much lower than for installations. Probably this difference reflects how easy GNU/Linux distributions make the installation of software.</p>
<p>However, what is less obvious is why, when automatic upgrades are available on modern desktops, most people are not upgrading as soon as new packages are detected &#8212; or perhaps not at all. Apparently, the average Ubuntu user and, to a lesser extent, the average Debian user, are far more cautious about upgrades than you would expect from their availability.<br />
&#8230;</p>
<p>Another way you can use the popularity-contest data is as a measure of how comparable software is being used. For example, both Ubuntu and Debian show high numbers of GNOME desktop installations, as you might expect from such GNOME-centered distributions: GNOME is installed on 85% of Ubuntu installations and 50% of Debian installations, and has been used recently by 78% of Ubuntu users and 55% of Debian users.</p>
<p>The relatively low number of Debian users is probably explained by the fact that the distribution appeals to more advanced users than Ubuntu, and such users are more likely to choose one of the dozens of alternative desktops or window managers available, or even to use the command line.</p></blockquote>
<p>The article is well-worth a read and gives some insight into possible differences between Debian and Ubuntu users, though none are particularly surprising.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/01/25/the-secret-lives-of-ubuntu-and-debian-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A diagram of the apt system</title>
		<link>http://www.strangeparty.com/2009/01/14/a-diagram-of-the-apt-system/</link>
		<comments>http://www.strangeparty.com/2009/01/14/a-diagram-of-the-apt-system/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:38:06 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=461</guid>
		<description><![CDATA[<p>I found the following blog post which looks at how several of the apt related tools function together. It is interesting, well it is to me, and many Debian and Ubuntu users do not realise that the aptitude and apt-get are actually separate tools, and aptitude does not just call apt-get under the covers.</p>
<p>Anyway: A diagram <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2009/01/14/a-diagram-of-the-apt-system/">A diagram of the apt system</a></span>]]></description>
			<content:encoded><![CDATA[<p>I found the following blog post which looks at how several of the apt related tools function together. It is interesting, well it is to me, and many Debian and Ubuntu users do not realise that the aptitude and apt-get are actually separate tools, and aptitude does not just call apt-get under the covers.</p>
<p>Anyway: <a href="http://algebraicthunk.net/~dburrows/blog/entry/apt-system-diagram/">A diagram of the apt system<br />
</a>Worth a read in my opinion<a href="http://algebraicthunk.net/~dburrows/blog/entry/apt-system-diagram/"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2009/01/14/a-diagram-of-the-apt-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Error reading drive c:\</title>
		<link>http://www.strangeparty.com/2008/09/24/error-reading-drive-c/</link>
		<comments>http://www.strangeparty.com/2008/09/24/error-reading-drive-c/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 18:19:00 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=398</guid>
		<description><![CDATA[<p>So about a week ago I was deleting some files from my USB key, and the delete failed. So I tried the command line, then with sudo on the command line. I was surprised to see a message like &#8220;UID 1000 does not exist in password file&#8221;, so I opened a new shell only to be <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/09/24/error-reading-drive-c/">Error reading drive c:\</a></span>]]></description>
			<content:encoded><![CDATA[<p>So about a week ago I was deleting some files from my USB key, and the delete failed. So I tried the command line, then with sudo on the command line. I was surprised to see a message like &#8220;UID 1000 does not exist in password file&#8221;, so I opened a new shell only to be told by my computer that I don&#8217;t have a username.</p>
<p>Switching to a pure console I found I couldn&#8217;t log in with root, and after rebooting I found that /etc/passwd no longer existed.</p>
<p>At this point I was wondering if I had any data left at all. I figured that either a)my disk has died, or b)my OS decided to scramble the file system. I was sadly hoping that it was a disk failure, as that is just bad luck with hardware&#8230;<br />
After a thorough disk scan with the manufacturers disk tools I realised that my system must have done the damage to itself &#8211; oh dear!</p>
<p>I am not reinstalling my Debian box from scratch (thankfully my home dir mount seems to be fine) in a new LVM logical volume. I was suprised that had to mark the partition as a LVM physical volume, and write the partition table to the disk before the installer would let me choose LVM volumes to use as filesystems, but thankfully it worked fine.</p>
<p>It will still be a while before my system is back to its usual state, but at least a fsck check of my home parition came up perfectly clean. The old root parition however looks a mess. /etc/ looks rather sparse, which is not good.<br />
I am still unsure exactly how this sort of thing can happen &#8211; anyone want to pose a theory?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/09/24/error-reading-drive-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIC Microchip programming under debian</title>
		<link>http://www.strangeparty.com/2008/05/31/pic-microchip-programming-under-debian/</link>
		<comments>http://www.strangeparty.com/2008/05/31/pic-microchip-programming-under-debian/#comments</comments>
		<pubDate>Sat, 31 May 2008 14:12:16 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[16f690]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[pic]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[sdcc]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=330</guid>
		<description><![CDATA[<p>A while ago I bought a PICkit2 programmer, including 16f690 PIC. I installed piklab and sdcc (in Debian repositories) and got it working pretty easily. I did play with the programmer that came with it (mplab, windows only), which upgraded my firmware. piklab cannot use the new firmware, so if you need to get an old <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/05/31/pic-microchip-programming-under-debian/">PIC Microchip programming under debian</a></span>]]></description>
			<content:encoded><![CDATA[<p>A while ago I bought a <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en023805">PICkit2 programmer</a>, including 16f690 PIC. I installed piklab and sdcc (in Debian repositories) and got it working pretty easily. I did play with the programmer that came with it (mplab, windows only), which upgraded my firmware. piklab cannot use the new firmware, so if you need to get an old firmware, then try the <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en023073">old firmware downloads page<br />
</a></p>
<p>There is quite a difference in programming between mplab and piklab. Although there is support for a large number of chips in piklab, they are not supported as well as mplab. The big problem is that in mplab most special bits (i.e. each bit for an output port, one per pin) have a defined name so you can set them on or off individually. Piklab on the other hand has support for only a few of these, so if you want to turn on a pin, you have to set a value on the whole port (byte). Saying that, I prefer the piklab editor as it seems to do a better job with syntax highlighting etc.</p>
<p>Below is some code examples to help you get started if you are finding the learning curve steep</p>
<p><span id="more-330"></span></p>
<p>Some macros that may be useful to put in a header file are</p>
<pre style="padding-left: 30px;">#define ZERO    0x00  // 0000 0000
#define BIT0    0x01  // 0000 0001
#define BIT1    0x02  // 0000 0010
#define BIT2    0x04  // 0000 0100
#define BIT3    0x08  // 0000 1000
#define BIT4    0x10  // 0001 0000
#define BIT5    0x20  // 0010 0000
#define BIT6    0x40  // 0100 0000
#define BIT7    0x80  // 1000 0000
// macros to manipulate the bits
//set bit Y on byte X
#define SET_BIT(x,y) (x |= y)
//unset bit Y on byte X
#define UNSET_BIT(x,y) (x &amp;= ~y)
//toggle bit Y on byte X
#define TOGGLE_BIT(x,y) (x ^= y)
//test bit Y is set on byte X
#define IS_BIT_SET(x,y)  (x &amp; y)</pre>
<p>These can make coding much easier, as then you can just worry about setting the bits and not about conversions to binary.</p>
<p>For anyone not sure how to get anything working, the following code will get you started with the PICKit2 development board and the included 16f690. This is the code to light up different LED&#8217;s on the test board depending on what the variable resistor is set to</p>
<pre style="padding-left: 30px;">/* Configuration bits */
typedef unsigned int word;
word at 0x2007 CONFIG = _INTRC_OSC_NOCLKOUT &amp; _WDT_OFF &amp; _PWRTE_OFF
  &amp; _MCLRE_OFF &amp; _CP_OFF &amp; _CPD_OFF &amp; _IESO_OFF &amp; _FCMEN_OFF &amp; _BOD_OFF ;

void main(){
  while(1==1){
  PORTA = 0;//?
  TRISA = BIT0; //Set RA0 input
  ANSEL = BIT0;//  Just RA0 is an Analog Input
  TRISC=0;//Set All PORTC as output

  ADCON0 = BIT0;  //  Turn on the ADC 0000 0001
                  //   Bit 7   - ADFM,Left Justified Sample (0)
                  //   Bit 6   - Use VDD (0)
                  //   Bit 5:2 - Select AN0 channel (0000)
                  //   Bit 1   - GO/DONE - set separately (0)
                  //   Bit 0   - Enable ADC (1)

  ADCON1 = BIT4;//Set AD Control 0001 0000
                // Bit 7   - res
                // Bit 6:4 - Select the Clock as Fosc/8 (001)
                // Bit 3:0 - res

  SET_BIT(ADCON0, BIT1);//GO/DONE to start conversion
  while( IS_BIT_SET( ADCON0,BIT1 ) ){}//Wait until sample is done

  //Set 4 highest bits to write direct to led's. Ignore 4 LSB
  //ADRESH contains bits 9:2 of result
  PORTC = ADRESH &gt;&gt; 4;
  /*
    //Could also make ACDValue only contain upper 4 bytes
    ADCValue &gt;&gt;= 4;
    ADCValue &amp;= (BIT0 | BIT1 | BIT2 | BIT3); // could also do this with 0xF0 (i think)
    //And then set only those bytes
    PORTC |= ADCValue
    //This would mean other bits of portC would still be same
  */
}
}</pre>
<p>The datasheets for the pics can be hard to get started with, so hopefully that helps a bit. The examples I saw for doing similar things were ridiculously complicated and without good reason. Of course this code is specific to the 16f690, but it should be easy enough to convert.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/05/31/pic-microchip-programming-under-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPod Classic with Amarok on Linux</title>
		<link>http://www.strangeparty.com/2008/05/29/ipod-classic-with-amarok-on-linux/</link>
		<comments>http://www.strangeparty.com/2008/05/29/ipod-classic-with-amarok-on-linux/#comments</comments>
		<pubDate>Thu, 29 May 2008 12:02:48 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[programs]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=368</guid>
		<description><![CDATA[<p>When I first bought my iPod classic, Amarok hadn&#8217;t yet got support for the new SHA1 hashing that was being done in the song db. Then it was only in cvs, and while I remember compiling from source I don&#8217;t think I ever got round to running that code.</p>
<p>Of course I found out the hard way <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/05/29/ipod-classic-with-amarok-on-linux/">iPod Classic with Amarok on Linux</a></span>]]></description>
			<content:encoded><![CDATA[<p>When I first bought my iPod classic, Amarok hadn&#8217;t yet got support for the new SHA1 hashing that was being done in the song db. Then it was only in cvs, and while I remember compiling from source I don&#8217;t think I ever got round to running that code.</p>
<p>Of course I found out the hard way that Amarok didn&#8217;t have support for my iPod, and nearly bricked the thing. Thankfully a windows box and iTunes could reset it.</p>
<p>I now have it working, however it took a little fiddling. If you are trying to get it working, you absolutely must read <a href="http://amarok.kde.org/wiki/Media_Device:IPod">http://amarok.kde.org/wiki/Media_Device:IPod</a> before starting, especially <a href="http://amarok.kde.org/wiki/Media_Device:IPod#My_iPod_does_not_show_any_music">#My_iPod_does_not_show_any_music</a>, as this explains how to set up the magic ID number. Unfortunately earlier pages didn&#8217;t say whether to add the <strong>0x</strong> in from of the ID, and I remember having lots of difficulty just with libgpod and gtkpod. While I am mentioning it, the versions you need for an iPod Classic are: Amarok 1.4.8 and libgpod 0.6.0</p>
<p>So you have them installed, and you want to get Amarok managing your iPod &#8211; Well, I plugged it in, amarok detected it popped up a window asking if it should mount it as an iPod. I said yes, copied some songs, ejected it and BANG! &#8211; My iPod wouldnt show any songs.</p>
<p>It seems that the data uploaded by iTunes isn&#8217;t the same as by Amarok, and the iPod doesnt like that. Deleting the contents of the iPod_Control folder from the iPod seemed to make Amarok and the iPod happy. Of course Amarok needed to recreate some folder structure, but it asked nicely. Also, if you do this, don&#8217;t forget you have to recreate your SysInfo file again before Amarok uploads any songs.</p>
<p>Anyway, I now have an iPod that I can upload to with Linux (which is a hell of a lot faster than iTunes &#8211; iTunes took about 30 hours to copy ~30G of music, Amarok took about 3 hours), podcasts work and even some cover art has been copied.</p>
<p>If you have any problems, you can reboot the iPod by holding the Menu and select button down together for a few seconds. If the songs list comes up blank, then you have something wrong and Amarok didnt write the hash correctlty &#8211; check the SysInfo file, delete all music from the iPod in Amarok, and copy a few test tracks, disconnect and check if you have it right.</p>
<p>You can also use the <em>Smart Playlists</em> to sync to the iPod &#8211; <em>Favourite tracks</em>, <em>Newest tracks</em> and <em>All Collection</em> are good ones to use. Of course you can create your own custom smart playlists too.</p>
<p>Best of all, Amarok is properly multi-threaded so I can copy my entire music collection to my iPod, while playing music and Amarok and writing blog posts &#8211; on windows syncing an iPod used to make the system struggle, and iTunes became rather unresponsive&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/05/29/ipod-classic-with-amarok-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>software raid1 and lvm on debian etch</title>
		<link>http://www.strangeparty.com/2008/05/24/software-raid1-and-lvm-on-debian-etch/</link>
		<comments>http://www.strangeparty.com/2008/05/24/software-raid1-and-lvm-on-debian-etch/#comments</comments>
		<pubDate>Sat, 24 May 2008 11:47:38 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[filesystems]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=350</guid>
		<description><![CDATA[<p>Background</p>
<p>I have a fileserver box, which currently has 2x200GB disks in lvm to give me a 400GB virtual disk. This arrangement gets good use of space, but if one disk has a failure, then the whole filesystem is trashed and cannot be recovered.</p>
<p>The solution is to start using raid. Before I go on, raid is not <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/05/24/software-raid1-and-lvm-on-debian-etch/">software raid1 and lvm on debian etch</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>Background</strong></p>
<p>I have a fileserver box, which currently has 2x200GB disks in lvm to give me a 400GB virtual disk. This arrangement gets good use of space, but if one disk has a failure, then the whole filesystem is trashed and cannot be recovered.</p>
<p>The solution is to start using raid. Before I go on, raid is not a backup solution. It cannot protect you from accidentally deleting all your files, and will not protect you from a virus or malicious user or hacker. Raid just reduces the damage if a disk happens to fail (which knowing my luck, is sometime soon).</p>
<p>The final solution I want is 2x500GB disks in raid1 (mirrored) with lvm on top to split into my partitions. This way I could add another pair of disks in raid, add them to the lvm and not have to worry about which partitions get new space, as lvm will allow me to expand any parition onto the new space, and have a partition across multiple disks.</p>
<p>Why not raid5? Raid 5 is great for getting space, as you have n+1 disks, and get the space of n disks out of it as one is the redundant disk. The problem with raid5 is it is limited to the smallest disk in the raid. So 2 500GB disks and one 200GB disk will only give 400GB as each disk can only be used up to 200GB. Raid5 is great if all your disks are the same size, but if I want to add disks, and not have to replace all 3+ disks, then with raid1 I just have to buy disks in pairs. My pc has 4 ide slots and 2 sata slots, so raid1 should be fine (disks are getting quite bit these days).</p>
<p>So the plan is to add 2 500GB disks. put them in raid1 with a partition for /boot (which cant be in lvm) and the rest becomes part of a lvm group, with my / and /home partitions in there (and /tmp, swap)</p>
<p><strong>How I did it</strong></p>
<p><span id="more-350"></span></p>
<p><strong>Warning: This can seriously mess up your data. Please, please backup first &#8211; I didn&#8217;t and was sweating hard at one point when I thought I had lost my entire lvm array. I found the <a href="http://people.debian.org/~jgoerzen/dfs/html/">Debian From Scratch (DFS)</a> a fabulous rescue CD</strong></p>
<p><em>Note: This took me several attempts to actually finish writing, so there are probably some errors, so let me know if you spot anything that looks wrong or is ambiguous.</em></p>
<p>For background, my current setup has 2 disks. hda and sda. these are both 200GB, and /boot and swap are on hda, and the rest of hda and all of sdb are in my lvm group</p>
<p>I added my new 500GB disk as /dev/sdb and booted up.</p>
<p>Use fdisk to create a small (~100mb) parition for /boot. Set its type to <em>fd</em> (linux raid). This parition cannot be in lvm, as grub does not understand lvm.<br />
Create another parition using the rest of the space for our lvm. Also set its type to<em> fd</em></p>
<p>You may need to use partprobe or reboot to see the new partitions, however my Debian Etch box autodetected them when leaving fdisk</p>
<p><strong>Installing raid</strong></p>
<p style="padding-left: 30px;"><em>$apt-get install mdadm</em><br />
<em>$cat /proc/mdstat</em> should look something like</p>
<p style="padding-left: 30px;">Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
unused devices: &lt;none&gt;</p>
<p>if not, you may need to load some modules &#8220;modprobe md;modprobe raid1&#8243;</p>
<p>Next, you will need to create some raid device entries.</p>
<p style="padding-left: 30px;"><em>$mknod /dev/md0 b 9 0<br />
$mknod /dev/md1 b 9 1</em></p>
<p>This creates a block device, major number (like a type) 9. As etch uses udev, you need to tell udev to do this next boot too</p>
<p style="padding-left: 30px;"><em>$</em><em>echo M md0 b 9 0 &gt;&gt; /etc/udev/links.conf<br />
$echo M md1 b 9 1 &gt;&gt; /etc/udev/links.conf</em></p>
<p>Now we can create our real raid array:</p>
<p style="padding-left: 30px;"><em> $mdadm &#8211;create /dev/md0 &#8211;verbose &#8211;level=1 &#8211;raid-disks=2 /dev/sdb1 missing<br />
$mdadm &#8211;create /dev/md1&#8211;verbose &#8211;level=1 &#8211;raid-disks=2 /dev/sdb2 missing</em></p>
<p>or the short version</p>
<p style="padding-left: 30px;">$<em>mdadm -C /dev/md0 -n 2 -l 1 /dev/sdb1 missing<br />
</em>$<em>mdadm -C /dev/md1 -n 2 -l 1 /dev/sdb2 missing</em></p>
<p>This creates a raid1 array md0 which has parition sdb1 in it and is expecting another disk soon, similarly raid1 array md1 has partition sdb2 and also expects another disk. A raid array without all its disks is called a <em>degraded</em> array, as it is running and works, but is not in good condition.</p>
<p>Next we need to save the state of this array so that it will be loaded at next boot</p>
<p style="padding-left: 30px;"><em>$mdadm &#8211;detail &#8211;scan &gt;&gt; /etc/mdadm/mdadm.conf</em></p>
<p><strong>Adding/modifying VM</strong></p>
<p>To create a new lvm setup, the following commands are a quick guide to creating a single partition in your raid. You will probably want to create a few more paritions, as this just creates a single lvm logical volume called root</p>
<p style="padding-left: 30px;"><em>$pvcreate  /dev/md1<br />
$vgcreate vg0 /dev/md1<br />
$vgscan<br />
$lvcreate -L10G -n root vg0<br />
$mkfs -t ext3 /dev/vg0/root</em></p>
<p>Then edit /etc/fstab to mount <em>/dev/vg0/root</em> (you may need to refer to it as <em>/dev/mapper/vg0-root</em>) as <em>/</em>. Repeat for any other filesystems you may want, and then copy any data over</p>
<p style="padding-left: 30px;">e.g.</p>
<p style="padding-left: 30px;"><em>$mkdir /mnt/root<br />
$mount /dev/vg0/root /mnt/root<br />
$rsync -auHxv &#8211;exclude=/proc/* &#8211;exclude=/sys/* &#8211;exclude=/boot/* &#8211;exclude=/mnt / /mnt/root/<br />
$mkdir /mntroot/proc /mntroot/boot /mntroot/sys<br />
$chmod 555 /mntroot/proc</em></p>
<p>I already had a LVM setup, so I wanted to migrate it from the old disks to the new raid disks</p>
<p style="padding-left: 30px;"><em>$pvcreate /dev/md1<br />
$vgextend vg0 dev/md1<br />
$pvmove /dev/hda3 (this is gonna be slow)<br />
$vgreduce vg0 /dev/hda3<br />
$pvremove /dev/hda3</em></p>
<p>Don&#8217;t forget a swap partition (can be in LVM too)</p>
<p style="padding-left: 30px;"><em>$lvcreate -L2G -n swap vg0<br />
$mkswap /dev/vg0/swap</em></p>
<p>Make sure you copy over your /boot to /dev/md0 too!</p>
<p style="padding-left: 30px;">Then make sure you have edited /boot/grub/devices.map and /boot/grub/menu.lst to have the correct new devices</p>
<p><strong>Finishing off the config</strong></p>
<p>rebuild initrd to scan for raid devices<br />
<strong> !important, you need this for your initrd to load the raid so your kernel can find the root fs</strong><strong>!</strong><br />
<em></em></p>
<p style="padding-left: 30px;"><em>$dpkg-reconfigure linux-image-2.6.18-3-686</em></p>
<p>(or whatever your current kernel package is). This is better than mkinitrd or update-initramfs as you dont need to worry about which you are using and is the &#8220;debian way&#8221;</p>
<p>Someone suggested adding a fallback in grub and a second boot entry, but they don&#8217;t use the automagic grub updating, so it will just get trashed when they upgrade kernels<br />
edit /boot/grub/menu.lst if you want to do this</p>
<p style="padding-left: 30px;">[...]<br />
default         0<br />
fallback        1<br />
[...]</p>
<p>install grub on new disk(s)</p>
<p>you can reboot now if you want to see it working</p>
<p><strong>Add second disk to raid</strong></p>
<p>create same partition structure on /dev/sda, then add them to the raid as follows</p>
<p style="padding-left: 30px;"><em>$mdadm &#8211;detail &#8211;scan<br />
$mdadm /dev/md1 -a /dev/sda2<br />
$mdadm /dev/md0 -a /dev/sda1</em></p>
<p style="padding-left: 30px;"><em>$watch cat /proc/mdstat</em><br />
Personalities : [raid1]<br />
md0 : active raid1 sda1[2] sdb1[0]<br />
104320 blocks [2/1] [U_]<br />
resync=DELAYED</p>
<p style="padding-left: 30px;">md1 : active raid1 sda2[2] sdb2[0]<br />
488279488 blocks [2/1] [U_]<br />
[&gt;....................]  recovery =  0.1% (779328/488279488) finish=93.8min speed=86592K/sec</p>
<p style="padding-left: 30px;">unused devices: &lt;none&gt;</p>
<p>when done you should see:</p>
<p style="padding-left: 30px;"><em>$cat /proc/mdstat<br />
</em>Personalities : [raid1]<br />
md0 : active raid1 sda1[1] sdb1[0]<br />
104320 blocks [2/2] [UU]</p>
<p style="padding-left: 30px;">md1 : active raid1 sda2[1] sdb2[0]<br />
488279488 blocks [2/2] [UU]</p>
<p style="padding-left: 30px;">unused devices: &lt;none&gt;</p>
<p>delete the array lines from /etc/mdadm/mdadm.conf and run</p>
<p style="padding-left: 30px;"><em>$mdadm &#8211;detail &#8211;scan &gt;&gt; /etc/mdadm/mdadm.conf</em></p>
<p><em></em>I am surprised that raid cannot figure this information out itself, but every webpages I saw says you need these lines in the config, and I am too scared to try not having those lines.</p>
<p>Make sure you rebuild your initrd so that it knows the raid setup at boot time and can initialise your root partition.</p>
<p style="padding-left: 30px;"><em>$dpkg-reconfigure linux-image-2.6.18-3-686</em></p>
<p>Add grub to second disk if desired</p>
<p style="padding-left: 30px;"><em>$install-grub /dev/sda</em></p>
<p><strong>discussion</strong></p>
<p>some sites suggest that dmadm.conf needs &#8220;devices=/dev/sdb6,/dev/sda6&#8243; for each array. Not sure if this is necessary. If you think you need it, other sites also suggest to use /dev/.static/dev/sdb6 instead of just /dev/sdb6 to make udev work properly. I dont have any devices set for my arrays &#8211; I would assume that is what the uuid is for, and mdadm finds them by scanning all paritions</p>
<p>I found the following page really helpful &#8211; <a href="http://xtronics.com/reference/SATA-RAID-debian-for-2.6.html">http://xtronics.com/reference/SATA-RAID-debian-for-2.6.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/05/24/software-raid1-and-lvm-on-debian-etch/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Advanced Bash on the command line</title>
		<link>http://www.strangeparty.com/2008/05/17/advanced-bash-on-the-command-line/</link>
		<comments>http://www.strangeparty.com/2008/05/17/advanced-bash-on-the-command-line/#comments</comments>
		<pubDate>Sat, 17 May 2008 18:03:52 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/?p=319</guid>
		<description><![CDATA[<p>Deadman.org: Advancing in the Bash Shell &#8211; well worth a read to improve <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/05/17/advanced-bash-on-the-command-line/">Advanced Bash on the command line</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.deadman.org/bash.html">Deadman.org: Advancing in the Bash Shell</a> &#8211; well worth a read to improve your bash<a href="http://www.deadman.org/bash.html"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/05/17/advanced-bash-on-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Picasa updated on linux</title>
		<link>http://www.strangeparty.com/2008/03/30/picasa-updated-on-linux/</link>
		<comments>http://www.strangeparty.com/2008/03/30/picasa-updated-on-linux/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 14:00:40 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[photo editor]]></category>
		<category><![CDATA[picasa]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/2008/03/30/picasa-updated-on-linux/</guid>
		<description><![CDATA[<p>Google has released a new version of Picasa for linux &#8211; It&#8217;s been a long time in the making, as the linux version has been behind the Windows one <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/03/30/picasa-updated-on-linux/">Picasa updated on linux</a></span>]]></description>
			<content:encoded><![CDATA[<p>Google has released a <a href="http://picasa.google.com/linux/download.html">new version </a><a href="http://picasa.google.com/linux/download.html">of Picasa </a><a href="http://picasa.google.com/linux/download.html">for linux</a> &#8211; It&#8217;s been a long time in the making, as the linux version has been behind the Windows one for ages</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/03/30/picasa-updated-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote support for my family</title>
		<link>http://www.strangeparty.com/2008/03/30/remote-support-for-my-family/</link>
		<comments>http://www.strangeparty.com/2008/03/30/remote-support-for-my-family/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 12:26:42 +0000</pubDate>
		<dc:creator>Anton Piatek</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[vnc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.strangeparty.com/2008/03/30/remote-support-for-my-family/</guid>
		<description><![CDATA[<p>Andy Piper write about Remote PC support for family members a while ago, and I remember playing with the single click reverse vnc, based on ultravnc. However I dont run windows often, so the idea died.</p>
<p>Today I played with getting it working under linux. The single click reverse vncserver part is still the same, but for <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.strangeparty.com/2008/03/30/remote-support-for-my-family/">Remote support for my family</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://andypiper.wordpress.com/2006/09/07/remote-pc-support-for-family-members/">Andy Piper write about Remote PC support for family members</a> a while ago, and I remember playing with the single click reverse vnc, based on ultravnc. However I dont run windows often, so the idea died.</p>
<p>Today I played with getting it working under linux. The single click reverse vncserver part is still the same, but for the client I had three choices &#8211; Run a native vncviewer, which wouldnt support encryption, run the java ultravnc client which also does not support encryption, or get the ultravnc viewer working under Wine.</p>
<p>The third option was most enticing, as I want encryption working. Wine launches it fine, but getting the encryption to work was harder &#8211; fist make sure you have the version 1.16 of the <a href="http://msrc4plugin.home.comcast.net/~msrc4plugin/oldstuff.html">MSR4C plugin</a>, as the single click ultravnc builder uses that version. Then copy your encryption key and the plugin file to <em>~/.wine/drive_c/Program_Files/ultravnc/</em> so that when wine runs th program it finds them all in the right places. I then launch the viewer with wine (from within that dir to be sure everything finds the right files) as follows: <em>wine vncviewer.exe -dsmplugin MSRC4Plugin.dsm -listen</em></p>
<p>Then all you have to do is set up your firewall, and of course <a href="http://www.uvnc.com/addons/singleclick.html">customise your single click help executable</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strangeparty.com/2008/03/30/remote-support-for-my-family/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
