2008

0

Translation template updated

Posted on Monday, 22 December 2008

Something that I've consistently failed at previously is uploading new translation templates in a timely fashion before a release. The translation community is absolutely fantastic and I want to make the best use of them that we possibly can, so beginning now I'm making more of a focus on regularly uploading templates to allow these multi-lingual rockstars enough time to make sure that the next release of Terminator has as much coverage as possible in your favourite language.

0

New Terminator feature: Directional terminal navigation

Posted on Saturday, 20 December 2008

One of the nice side effects of being at an Ubuntu Developer Summit is the interesting conversations you have with people outside of the sessions themselves (which, as a sysadmin present to support the event itself, I was not particularly involved in).

One such conversation was over lunch in a busy Google canteen with Kees Cook, one of our rocking security engineers and a thoroughly decent chap. After a while we came to the subject of Terminator and some of the features we'd like to implement, the ones that have been requested and we're not particularly motivated to work on, and the odd ones.

I was trying to remember the things people have asked us to add, that for one reason or another we probably aren't going to and mentioned one about the ability to navigate between terminals in a directional way: That is, rather than doing Ctrl-Tab to cycle through the terminals in the order they were created, you could press something to move to the terminal to the left, or above, right or below the currently focussed one.

On the surface it sounds like a good idea and probably not too tricky, but only if you think from the point of view of a grid. That really would be easy, but our UI is produced by way of a tree structure, not a grid. This means you need to do some proper thinking to figure it out. Kees' face lit up and he said something like "that sounds like a graph theory problem!" and expressed an interest in working on it.

I'm very glad to say that in just under a week after we all went home from UDS, I've just merged his results into trunk.

Thanks very much to Kees for his code and helpful suggestions (such as resurrecting Marcus Korn's simultaneous-typing branch, which I did one evening at UDS - rewriting it and then merging it into trunk). Also thanks to the other Terminator users I met there :)

So that's two new features, although not really the big ticket ones that are holding back 1.0 ;)

4

My new project: juicyD (maybe)

Posted on Wednesday, 17 December 2008

Being a sysadmin I tend to install operating systems quite often on various bits of hardware. This means a lot of CDs. I carry at least 4 CDs in my laptop sleeve and that's not really enough, plus I sometimes burn CDs to update firmwares in laptops, etc.

It doesn't sound like the end of the world, because it's not, but that doesn't mean the status quo is worth keeping. I've been thinking for a while now that it would be great to have a solid-state device I could use as a USB CDROM. I could load it up with a bunch of ISOs and boot from them without having to carry round a load of CDs or waste blank CDs for BIOS/firmware upgrades that are only a few MB.
A little research showed that, as ever, Linux was the perfect candidate because of its USB Gadget subsystem, which lets it act as USB Mass Storage, USB Ethernet, USB Serial, USB MIDI and other things.

While the Mass Storage support currently in the kernel doesn't include CDROM support, there is a patch kicking around which adds it as an option when loading the g_file_storage kernel module.

Next up - selecting some suitable hardware to test this on.



Atmel's NGW100 ticks all of the boxes for a test rig, it's got a serial port, a USB port, a power port and an MMC card slot. It's much bigger than a gumstix, and not powered by USB (although there is a dubious sounding hardware hack for this), but this is a low cost board to prove the project is possible.

The board comes with linux pre-installed, but the kernel isn't super-new, and since the CD-ROM patch isn't in mainline yet, I needed to get the board up to date.

Fortunately there is a great community of people around embedded linux. With a bunch of googling and help from HcE on #elinux, last night I got stuck in and built a toolchain, kernel, root image and upgraded the bootloader. This morning I uploaded a new image with a slightly old version of the CD-ROM patch (because I only just found the newer version while writing this post).

There's also plenty of information around about this, but it can be a challenge to wade into a brand new system and immediately know the right places to look (the avr32linux.org wiki turns out to be supremely useful, as was HcE).

So the question is, does it work? The simple anwer is yes, a Linux machine sees it as a CD-ROM drive and can mount it as such. The more complex, and slightly worse answer is not yet, because a test against a BIOS didn't work. It's possible this is a hardware issue, but it could be a software issue too, so I'm casting around for ideas :)
(the name "juicyD" is probably temporary, and I noticed about 6 hours after I chose it that someone commented on an earlier post with that nick a while ago. Weird)

1

Foo Fighters Wembley Concert, the tale of a weekend like no other

Posted on Wednesday, 19 November 2008

It seems like I have failed utterly to comment on the towering totem of raw awesome that was the Foo Fighters concert on a balmy Saturday in June.

To put the event in context, I spent a few hours during the day with Rike, Alex and Simon in Hyde Park at the Red Bull Flügtag. We ate, we drank, we watched ridiculous people flinging themselves from a raised platform into The Serpentine in craft that almost invariably were capable solely of an ungraceful and undignified plunge. The notable exception being a poor attempt at a basic hangglider design, which somehow stalled and dived its way to a distance record.

We then said goodbye to Alex and headed half way across London toWembley Stadium, where we arrived to a bigger queue for the toilet than for the gates, so we were inside in a jiffy. We'd missed the support acts nonsense and things were gearing up for the Foos. It was a pretty impressive sight and sound to walk out onto what would normally be the pitch, amongst an almost capacity crowd (Dave Grohl seemed to think there were 86,000 people there).

Then noise, then cheering, then rock. Twenty minutes of rock go by before they take so much as a beat of a break to say hello. More rocking. Rock. Rockity rock. Rock. Special appearance by Jimmy Paige and John Paul Jones from Led Zepplin. Rock. Good night. Massive firework show.
Best gig I've ever been to, and I'm not expecting it to ever be beaten.
I would describe the show in more detail, but if you weren't there then you lose, sorry.

Except you don't lose! You can now buy a DVD or a Bluray of the show, and I am here to tell you that you absolutely should, especially if you own a Bluray player.

My copy of the Bluray arrived yesterday and I've watched the entire 2 hour show twice so far. There seem to be cameras everywhere and they're edited together well, so it's a treat to watch. The show was presented in conjunction with BBC Radio One and they broadcast it, so the sound recording is very good. What else do you care about? There are no extras, but who cares.

As if the weekend hadn't offered up enough excitement already, Simon and I went to Silverstone on the Sunday to see a day of Renault motorsport.

1

Using inotify in a pygtk application without pyinotify

Posted on Friday, 24 October 2008

I am lazy. There's no denying it, it's simple fact.

That means, for example, when I am working with pygtk and I look at the API for pynotify, I am sad, because it's a polling API and I hate polling.

What I like is GTK's event model. I like telling it what to run when things happen and letting it take care of all the pain for me. Obviously it's possible to write some code which will do the polling and then trigger an event, but that compromises my freedom to be lazy.

Step in pygobject, which contains the bindings for GIO. Within the bowels of this beastie are the required components to monitor a file for changes in a very few lines of python:

#!/usr/bin/python
import gtk
import gio

def file_changed (monitor, file, unknown, event):
  if event == gio.FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
    print "file finished changing"

file = gio.File('/path/to/some/file')
monitor = file.monitor_file ()
monitor.connect ("changed", file_changed)
gtk.main()

That's it. I don't know what the "unknown" argument for the callback is, probably the optional user_data connect() argument and this is but a small part of what inotify/GIO can do, but if you just care about being told when a file is updated, it'll do (with caveats that you can never really know when a file has finished being changed, so be careful to validate it before you trust its contents).

0

Ubuntu 8.10 (Intrepid) power performance

Posted on Thursday, 9 October 2008

In one word: wow.

Out of sheer curiosity last night I fired up the excellent powertop and decided to see how my system was doing. It was producing a couple of hundred fewer interrupts per second than it did in 8.04 (Hardy), and was using 1-2Watts less power.

Previously I have always resisted applying tweaks to my laptop that would attempt to reduce power, but since things were improving, the temptation was simply too great and I started digging out all the resources on this (by far the most useful being the tips on Intel's grammatically horrific http://www.lesswatts.org/). I had two reasons for not doing this previously - firstly I didn't want to deviate too much from a default install of Ubuntu (if only because it makes it much harder to reproduce bugs), but secondly I kept running into little weirdnesses. The most inconvenient of these was enabling AHCI link power management (which basically puts the hard disk bus to sleep when there is no IO); Enabling this and then suspending the laptop produced a 5 second delay on resuming because the kernel was forgetting it had put the bus to sleep and so had to wait for it to time out and be reset.

This particular niggle is fixed in 2.6.27 and so my 3-4 second resume times are preserved and I can save power! \o/

After a little while tweaking disk, AHCI, USB, filesystem, wireless, sound and ethernet options I ended up with a system which runs between 8 and 9 Watts when idle, down from 10-14 Watts, which I think is a pretty impressive saving and I'm very curious to find out from other Thinkpad X300 owners how well Windows performs in the power usage stakes - we always hear that Linux is a bit worse, but I'd be really quite surprised if the machine can run with very much less - it's spending (when idle, obviously) 99% of its time in the deepest processor sleep state and is only generating about a hundred interrupts per second (about 70-80% of which are due to my using a 3D desktop and wireless).

16

openssh 5.1 chrootdirectory permissions issue

If you're playing with the excellent new ChrootDirectory and internal-sftp options in recent OpenSSH releases (such as 5.1 which is in Ubuntu 8.10 Intrepid), you may have hit an error like:

fatal: bad ownership or modes for chroot directory

You may also have searched on Google for what to do about it and come away with very little useful information.

Well no more! I did the same thing and got bored of reading mailing list posts, so read the source code instead. The relevant section is in session.c:
    if (stat(component, &st) != 0)
      fatal("%s: stat(\"%s\"): %s", __func__,
          component, strerror(errno));
    if (st.st_uid != 0 || (st.st_mode & 022) != 0)
      fatal("bad ownership or modes for chroot "
          "directory %s\"%s\"",
          cp == NULL ? "" : "component ", component);

This is quite simple really, it's stat()ing the directory specified for "ChrootDirectory" and all its parents up to / and checking that they are:

  • owned by root

  • not group or other writable

  • (it also checks they are actually directories, but I'm going to assume you're not stupid enough to try and chroot into a file ;)


Note my emphesis that these checks apply to the chroot directory itself and its parents and /, so if you are chrooting users into /srv/chroot/ then you need to ensure that /, /srv and /srv/chroot are owned by root and not writable by the group (even if it's root, bizarrely) or other users.

Sorted.

0

Quick guide to saving power with USB devices

I have a laptop with some USB stuff built in. Some devices (such as Bluetooth) can be made to entirely disappear from the USB bus, however, the fingerprint reader and webcam can't, but they sit on the USB bus and draw power.

Fortunately the USB specs allow devices to be put to sleep if they're not being used and support that feature. Unfortunately many devices advertise they support it when they really don't, so Linux is unable to automatically put every USB device to sleep.
Fortunately you can control the setting by hand, and this is how. Firstly, start off with a Terminal and run the command "lsusb":

cmsj@kodachi:~$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 17ef:4807 Lenovo
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
cmsj@kodachi:~$


You can ignore the "root hub" entries, the interesting two are "SGS Thomson Microelectronics Fingerprint Reader" (guess which device that is ;), and "Lenovo" (this is the webcam).

So now we need to poke at those devices to enable their autosleeping. If we look at the entry for the webcam:

Bus 004 Device 002: ID 17ef:4807 Lenovo



I've highlighted "4807". This is the Product value for this USB device (if you're curious, the "17ef" part is the Vendor value and uniquely identifies the maker of this device).

Now we need to find out where abouts the webcam lives in the /sys/ filesystem (which is something the kernel provides to give applications lots of information about the hardware in your system).

The following command will put us on the right path:
grep 4807 /sys/devices/*/*/usb*/*/idProduct

Which, on my laptop, returns:
/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/idProduct:4807

Take that information you get, and chop the "idProduct:4807" bit off the end, just leaving "/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/" (yours will look a little different to this) and add "power/level" to the end.

You should now have something that looks pretty much like "/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/power/level" and if you get the current setting:
cmsj@kodachi:~/Desktop$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/power/level
on
cmsj@kodachi:~/Desktop$

you can see it is "on", which means it will not be automatically put to sleep. To change that, run:
echo "auto" | sudo tee /sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/power/level

and test if your device still works (so if it's a webcam, fire up "cheese", or if it's a fingerprint scanner that you use, test if it still accepts your finger). If everything is good then you can put something in /etc/rc.local so the power saving will be set up every time you reboot your computer:
echo "auto" > /sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/power/level

and that's it! Repeat this for all the USB devices in your laptop and enjoy the power saving (run "powertop" about 10 minutes before you start doing this so it has time to get a good average of your power usage, then see how much difference this makes. It could be up to 0.5Watts per device). Note that this won't work particularly well for external USB devices you plug in, becuase the /sys/ path won't exist until you plug the device in, so you'd need to do the above steps every time you connect it.

Hopefully HAL will start whitelisting devices which can be suspended, but I don't know of any work in this direction at the moment.

0

Terminator 0.11 released!

Posted on Sunday, 21 September 2008

Head over to the Terminator Homepage to get the goodness that is version 0.11. Mostly just bugfixes this time, for things which hurt 0.10 users. Also present is support for X Session Management, although until we have proper profiling support, this is of limited use.

The source tarball is up, of course, and the Hardy/Intrepid PPAs should have packages by the time you read this.

0

Script for funky SSH titles in GNU Screen

Posted on Friday, 19 September 2008

I just uploaded a script that I've been using and refining for some while, with help from a variety of people too numerous to mention.
Basically the deal is that when you ssh somewhere from inside a GNU Screen session, the screen's title is set to the hostname you ssh'd to. Simple.

The page for the script is here

2

Terminator 0.10 released

Posted on Friday, 29 August 2008

It's been a week or so shy of two months since we pushed 0.9 out of the door and originally we planned on following up with a 0.9.1 release shortly after to clear up some bugs, but for a variety of not particularly good reasons this never happened.

Instead we've got a new release for you... 0.10.

It doesn't have any shiny whizz-bang features like 0.9 had, but it does bring a bunch of bug fixes and the groundwork necessary for our 1.0 release.

As usual, head over to the homepage, or Launchpad to get the goodness.

2

Software fail

Posted on Friday, 1 August 2008

Update: It has been suggested that it is not productive or collaborative to talk negatively about some developers releasing software for unixy operating systems without really trying to integrate it with the versions of widely deployed software available in those operating systems.

It is a fair point. It's not productive or collaborative. It may be true, but ranting about it doesn't help anyone but me.

More productive and collaborative would be to nicely ask these ISVs to establish a less isolated packaging process with our communities and companies (but I don't mean LSB or a new package format). Clearly some people won't work with them on ethical grounds, but a more pragmatic position will accept that commercial software exists, so it might as well not make our lives unnecessarily hard. And the companies shifting Linux are hot on ISVs.
Jorge: No, I don't like having multiple JVMs, but I have been in corporate situations before where it has been necessary because specific applications have required different versions :(

0

Iphone shortcomings

Posted on Monday, 28 July 2008

There's no doubting that the iphone is a hugely capable machine. It's powerful yet easy to use, but it's not perfect. Here are some things which I think are missing:

* DAAP - it would be great to be able to play music via wifi since the thing is a bit low on storage.
* Background apps - I understand the huge problems implied by this, but certain apps could be blessed with the ability. Either that or the excellent last.fm client should be integrated with the iPod app. Not everything can be made a push app (the api for which isn't even available yet)
* IMAP subscriptions - I have loads of mail folders I don't want to see, which is dead easy in most mail clients, because of the ability to only subscribe to certain mailboxes. I would like to see this in the iPhone mail client.
* IMAP new mail checking - I don't have all my new mail go to my inbox, some gets filtered to other folders an I would like to be able to tell the mail client to check these too.

1

Terminator 0.9 released!

Posted on Tuesday, 8 July 2008

It's been far too long, but here it is. Terminator 0.9.

As usual, head over to the home page to get all the links and information you need.

"So what's new in this release?" Well let's have a little look at the ChangeLog:

* Tab support
* Drag & Drop support
* Added support for ~/.config/terminator/config
* Switch the meanings of "horizontal" and "vertical" wrt splitting,
after extensive user feedback. Added context menu icons to try and
make the meaning clearer.
* Added keybindings for terms size and scrollbar manipulation. Thanks
Emmanuel Bretelle.
* Completely revamped config system which now transparently makes use
of gconf settings if they are available, falls back to sensible
defaults if not, and can be overridden entirely by ~/.config/terminator/config
* Support terminal zooming - now you can quickly hide all terminals apart
from one and either scale the fontsize or not.
* New application icon from Cory Kontros
* FreeBSD support (thanks to Thomas Hurst)

and a whole heap of bug fixes. Rock on!

0

Terminator 0.9 almost ready

Posted on Sunday, 6 July 2008

It's taken us some time to get there, but as this page shows, we now have all of the bugs we want solved for 0.9, solved :D

The string freeze came way too late unfortunately, so I'm expecting we'll want to do a 0.9.1 consisting of translations and fixes for any other bugs we figure out on the road to 1.0.
I now need to prepare all of the parts required for a release and push out a final RC build into our PPA and if all is well, 0.9 will be released very shortly! Please test it now and tell us if you hit any last minute problems.

0

0.9 ready for translation!

Posted on Saturday, 5 July 2008

The list of milestone bugs is now clear of items which affect the UI, so we are now in string freeze. I uploaded a new POT for 0.9 so the wonderful, wonderful community of translators can weave their magic. We did have a small false start which required changing one string, but unless anyone shakes out any new bugs, that's it. 0.9 is one step closer to release.

0

Terminator 0.9 Betas

Posted on Thursday, 19 June 2008

The list of bugs left for Terminator 0.9 is getting shorter (although I do keep failing to resist the temptation to add more) and so it's time to try and get some wider testing.

Therefore, we've started uploading beta packages of 0.9 to our PPA. If you want to help test and you run Ubuntu, add this apt source:

deb http://ppa.launchpad.net/gnome-terminator/ubuntu hardy main

If you have Terminator installed already from a package, it should then be offered to you as an upgrade, otherwise run:

sudo apt-get update && sudo apt-get install terminator

Please report any bugs you find to http://bugs.launchpad.net/terminator/ and please feel free to drop by #terminator on irc.freenode.net with any feedback!

0

0.9 loose feature freeze

Posted on Friday, 30 May 2008

The tabs feature is in. drag&dropping terminals is in. For bonus points we've even thrown in a branch that lets you quickly hide all the terminals apart from one (I'm experimentally calling this "terminal zooming").
So that's it for new features for 0.9 and apart from fixing bugs we are now only tweaking the existing features to get them right.
In the next week or so I'll declare a string freeze and get a translation template up so our fantastic translators can get to work while we take care of the final bugs. Right after that, a glorious 0.9 will roll out of the door and into a tarball/PPA/Intrepid near you!

0

A good day

Posted on Thursday, 22 May 2008

After learning to use Meld and much chatting with chantra, I'm pleased to announce that we have landed his dnd-tabs branch into Terminator trunk.

What does all of that mean? Well, it means that we are a major step closer to being able to release 0.9 (which I have arbitrarily decided should be released only when we have tab support). That's not to say that the release will be today or even in the next week - the branch landing may bring us all the infrastructure we need, but it needs some UI and behaviour love to make sure people don't get lost in a maze of nested tabs (although this seems like such a powerful feature for some users that it may well be available as an option). This is the sort of thing I want to avoid out of the box:
Tab madness

One other nice thing we get from chantra's branch is drag&drop re-ordering of terminals. You can kind of see it at work in the screenshot below - we highlight the area of the window where the terminal being dragged will end up (note that you can't see the mouse pointer - it should be over the grey square with a drag icon of a terminal):
Drag and drop glory

Thanks very much to chantra for his hard work on this, and indeed all of the team who have been rocking trunk for weeks now. We'll get this polished and fixed ASAP and into a tarball/PPA and hopefully into things like Fedora and OpenSUSE :)

0

Further Terminator Progress

Posted on Wednesday, 21 May 2008

It's a month since my last news item and since it's also now almost a month since Ubuntu 8.04 (Hardy) was released, work has picked up again on Terminator.
We're landing lots of fixes and architectural tweaks all the time, with a few features slipping in there too.


There's no firm deadline for 0.9 yet, but tabs is still the main blocking feature (drag&drop terminal arranging will be included free with that, which is extremely nice).
The team continues to grow, and we're getting more and more blog coverage. Thanks to everyone involved!

1

Let's be perfectly clear here...

Posted on Tuesday, 20 May 2008

Scientology is not a religion, it is a dangerous cult.
It's utterly outrageous that we have a law which supposedly prevents individuals from expressing their opinion.

3. A system of intense religious veneration of a particular
person, idea, or object, especially one considered
spurious or irrational by traditional religious bodies;
as, the Moonie cult.
[PJC]


even if you don't like that, there's:

2. A system of religious belief and worship.
[1913 Webster]


so that covers every religion as a cult. As for dangerous - they have a well documented history of legal threats, intimidating behaviour, etc.

Update: It seems that sanity is not lost and the guy isn't going to be prosecuted because, as should have been fairly obvious, his sign wasn't inciting anything \o/

4

A couple of X300 tidbits...

Posted on Sunday, 20 April 2008

... neither of them good.

First off, in a stunning piece of fail, Lenovo have used a drive from one of the few manufacturers that enforces region coding on DVDs in hardware - Matshita, aka Matsushita, aka Panasonic. This is very frustrating and made worse by the drive shipping in a state with no region code set, so no DVDs at all will play. I now either have the choice of changing it no more than 5 times, or risking the drive with some custom firmware which claims to remove the region code.
Secondly, and more worryingly, there is a new BIOS release for the X300, but one report from a Linux user thus far suggests that the machine has started hard locking. I can't confirm because this machine is far too important to me (ie I use it for work), so I am holding back on the update until I know what's going on.

Update It occurred to me that it might be useful to document how I changed the region code - install regionset and run it. It will show you your current region code (0xFF for me, ie region 0) and how many changes you have left, then ask if you want to change it.

Second update Lenovo actually withdrew the BIOS update, so clearly something was wrong with it. This page lists the models for which they have pushed out a fixed version. The X300 is currently still listed as "Coming Soon" :(

0

Terminator progress

Posted on Friday, 18 April 2008

Just a quick update on how things are going.
I've been pretty slow lately because of trying to get as many bugs fixed in Hardy as possible.
However, we've still been working away a bit and the team has continued to grow.


Reliance on gnome is being reduced, and portability is being increased - you can now run Terminator on FreeBSD without a full GNOME install.
Configuration has been entirely replaced - we now offer a stack of config options. If you have gconf available we will look there for gnome terminal settings. If that doesn't work out we'll look for a config file in your home directory and if that fails we have comprehensive default settings.
I'm hoping to push out a release soon because we've also accumulated a few small bugfixes.
The plan from here is to have a major release to land the tabs feature, and then go all out for a massive 1.0 when we can save/restore meta-profiles.
Woo!

0

getting information out of a badly broken debian installer

Posted on Tuesday, 8 April 2008

You have new hardware (most likely server).
You pop in a debian/ubuntu installer CD, tell it what kind of keyboard you have and expect it to scan the CDROM for packages, but....uh-oh, it can't find the CD!
What do you do?! Well, realistically there's not a lot you can do to make it work, but you can do a lot to help get it fixed.

You need to pull off /var/log/syslog, the output of lspci, lspci -v and lspci -vvnn.

You may very well find yourself having a problem with that though, because you're still pretty early in a typical linux boot process, so you probably don't have any disks mounted and you may find yourself missing any modules to make that happen.
You should have usb-storage.ko though. That and isofs.ko.

Can you see where this is going? :)

find the .udeb's on your install CD with a working computer, ar -x the core fs modules one and pull out ext3 (and jbd and mbcache), or vfat and its dependencies. put them in a directory, then do mkisofs -o /dev/usbstick1 /path/to/modules.

You now have a partition on your USB stick that is an ISO9660 filesystem (ie a CD). Obviously make sure you don't do this on a USB stick you care about the contents of.

Chuck the USB stick into the broken server, modprobe usb-storage, mount the newly appeared partition and copy the modules over to the right place in /lib/modules/. Unmount the USB stick, modprobe the drivers and now you can put in an ext3/vfat formatted USB stick and you have somewhere to write the debugging information to!

Easy! :) Now file a bug with the debugging information you collected.

0

Esoteric command line argument parsing in python

Posted on Tuesday, 12 February 2008

Terminator will soon appear in GNOME's Preferred Applications preferences if you have it installed and as such I figure we need to support -x in the same way gnome-terminal does.
What that basically means is that *anything* which occurs after -x on the command line is the command to execute and its arguments, so:

terminator -x screen -U

should cause terminator to execute screen -U. By default, most options parsers will see this as the -U being passed to terminator and screen being the argument to -x.

After looking around the docs and asking on #python, optparse seemed to be a better option than getopts, so I switched it over and implemented a callback to extend the default argument processing for -x. It wasn't quite working, so after another quick foray into #python I ended up reading this page which provided everything I needed. More than I needed, in fact, since their while loop has conditionals which affect whether or not the next arguments are added. I just want to gobble them all up and stop them from being parsed :)

0

Terminator PPA plans

Posted on Thursday, 31 January 2008

Some administrivia about my PPA builds of Terminator.
Firstly, and somewhat late (for which I apologise), the 0.7 release should be available shortly from the PPA. It's just been accepted, so should be built for gutsy soon.
Secondly, as some people may have noticed, Terminator is now included in the Universe repository of hardy (for which I humbly thank all involved in making it happen).
When hardy is released, I will remove terminator from my PPA. at that point, we can consider publishing further gutsy packages in the Terminator team's PPA, however, I'm not hugely keen on supporting old distro releases that I don't run myself anymore.

0

Migrating Ubuntu to RAID1

I have a fair stack of data that I quite like, some of which is vitally important, stored in multiple places and generally not at concern for loss without some very bad things happening already.
The rest I'd just like to keep. For example, I wouldn't cry if I lost all my uni work, but it would be a shame. Same for the working emulation of my trusty Amiga that I used for so long, but now barely remember how to use.
So, not wanting to trust it all to a single hard disk, I bought a second so I can could clone the data onto two disks with RAID1. Not a problem in Linux thanks to software RAID. I knock up a RAID1 with a single partition on the new disk (which the tools like doing as much as they make sandwiches, grr). rsync across the existing / to the raid volume, modify fstab, grub and maybe something else and reboot expecting tenshu to finally live up to its name...

Except that's not its name.

Not when it's booting.

It turns out that having created the RAID volume while fully booted, it had been tagged as being for a machine with a hostname of "tenshu". The initramfs does not know your hostname because your hostname is stored on your root partition, which is a RAID partition that hasn't been mounted yet. It is possible for the initramfs to have a hostname, and I expect it might even have a kernel commandline option to specify it, but either way it's not there by default.

As any string comparison function will tell you, "tenshu" is not an acceptable match for "(none)".

So to fix this, boot the system and it should sit for ages waiting for the RAID arrays to assem ble (this timeout is *far* too long. what the hell takes this long to be detected by the system?!). After a while it will get bored and give you an initramfs shell. Busybox to the rescue!

I suspect you can run mdadm -A /dev/md0 --auto-update-homehost, although I ran mdadm -A /dev/md0 /dev/sdb3 --update=homehost to be specific and because I found those options first.
Reboot and bam, the orange bar of progress skips up merrily.

Assured that my data is safe on the new partition, I can now proceed to trash the original disk and grow the RAID1 to include it.

0

More Nokia n95

Posted on Friday, 4 January 2008

The awesomeness of this phone continues... as well as a rash of cool apps I've installed, I also just tried out the "Home Network" features. What this actually refers to is uPnP, specifically DLNA.

What does all that mean? It means I can view/copy the photos/movies/music from the phone with my PS3, which also means I can not only use the TV out to display arbitrary things, I can also view the media digitally, via wifi through a easily available/usable interface.

This feels like the future!