Stefano Rivera (tumbleweed)'s Website, Blog, collected bits of code, cruft and other stuff.

BIOS Recovery

A couple of months ago, I was looking at a friend’s laptop. It had definite motherboard problems and a dead HDD. As part of the service, I updated the BIOS. Unfortunately, it died mid-flash.

I tried the local Fujitsu-Siemens service center, but they said the motherboard had to be replaced. On an aging laptop, that’s just not worth it. New HDD, yes. New Mobo, no.

I asked around UCT everywhere, looking for someone with a PROM programmer, but the only one I could find was an ancient device attached to a 286. The “new” programmer (not much newer) was broken… I waited a couple of months, but it still isn’t fixed.

So, I tried a mail-order BIOS flashing service, They found a compatible chip, programmed it (with the update I’d been trying to install), and put it in the (registered) post within 24hrs. 2 weeks later, I’ve got it, and it installed it in the laptop.

It works!

Usually this kind of kind of thing means the laptop is written off. (Desktops normally have some kind of bad-flash recovery procedure, but it’s rare in laptops, and not foolproof anyway). I’m very impressed with for only €15, the machine is no longer a brick.

Now to replace that HDD

Automated backups to external disk

I remember somebody asking how to do this on the CLUG lists a while back. But here’s the problem:

You’ve got an automated backup system, but you want offsite backups. DVDs are too small, external hard drives are the only option. You want the user to be able to plug in the firewire disk, have the backup start automatically, and let them know when it’s done.

Here’s how I implemented it:

The backups are implemented with backup-manager, they backup into /mnt/backup-tmp/

The external hard drive connects by firewire. Running udevinfo -a -p /sys/block/sdd on it showed me it’s ID:


I created this UDEV rule file /etc/udev/rules.d/local-backup.rules:

ATTRS{ieee1394_id}=="0090a9787b339de6:1:0", SYMLINK="backupdisk", RUN+="/usr/local/sbin/"

And the relevant fstab entry:

/dev/backupdisk /mnt/backup-disk vfat   sync                    0       0

And the backup script /usr/local/sbin/

#!/bin/sh -e


logger "Backup disk detected"

# Test for expired locks
if [ -e "$LOCKFILE" ]; then
  if ! kill -0 `cat "$LOCKFILE"`; then
    rm "$LOCKFILE"

lockfile -r0 "$LOCKFILE"
echo $$ > "$LOCKFILE"

sleep 5s

logger "Backup to external begun"

mount /mnt/backup-disk
rsync -a /mnt/backup-tmp/ /mnt/backup-disk/
umount /mnt/backup-disk

beep -l 1000 -f 3000 -r 5
echo -e "You can disconnect the disk now.\nThank you.\n\nThe backup System." | mail -s "Backup completed" the-secretary@email.address

logger "Backup to external completed"

CLUG Talk videos

CLUG is one of the more active LUGs around, and has had fortnightly meetings with technical talks consistently since at least 1999 (the extent of our records, and my involvement).

While this heritage is a testament to a strong LUG, there are only about 20 people who regularly attend meetings, and thus get the benefit of these talks. With a LUG membership of around 800 (my best estimate from mailing list figures), this is a tiny fraction of our community. People who can’t make it have been requesting videos of talks for a while, and recently Jonathan Carter brought his camera, and we started playing with videoing them. He has been stuck in Johannesburg for a few weeks and left me his camera, so I’ve been playing around with encoding.

So far, the lessens learned:

  • Video quality: A camera, high up at the back of the room produces reasonable, compressible video without having to have someone pan around following the presenter.
  • But the built-in microphones on a cheap camera just aren’t effective at that range (especially when you’ve got a quiet speaker).
  • Audience questions are hard to record.
  • Audio editing is do-able, and necessary. But so far, we haven’t ventured into video editing (on linux, this isn’t trivial).
  • You can’t normally read all the slides (or demos) with SD video. At full PAL resolution, most slides are legible. Screen-capture is an option, but most presenters make their slides available, which is far more bandwidth efficient.

Our progress so far is these procedures, and these videos: UK, ZA. We are using Ogg/Vorbis/Theora, and 3 different qualities of video. The three qualities are overkill, but I’m still experimenting with settings. I’d like some feedback - especially from a codec expert :-)

We lost Wikimania 2008

We lost Wikimania 2008, quite badly (by points). I’m obviously sad, because I was hopeful, and had invested the odd weekend into comparative flight pricing, bid editing, and sitting on the phone…

According to the published criteria, we should have done well. Somehow we managed to score lower than Alexandria on “rotation” which is odd because Wikimania has never been held in the Southern Hemisphere.

I’d have liked too see the IRC log from the judges meeting, to see where we lost our points, but of course that isn’t going to happen, so we’ll have to work it out ourselves, by comparing the bids.

In retrospect, our bid wasn’t that great. We were pinning more hopes on our location, and Cape Town’s attractions, then on the bid itself. It was expensive, last-minute, and lacking sponsership & good accommodation. By losing, we got our chance to get it right next time.

The good news, is bidding opens for Wikimania 2009 almost immediately. I don’t know what the chances are of 2009 being in Africa again, but I’m assuming we are going to bid, if everyone can pick themselves up and get going on it. To do it, w e are going to need firm sponsors. Find any friends you have corporate contacts, and twist their arms.

BIOS Flashing with memdisk

I’ve just discovered memdisk. It’s part of the syslinux package on Debian/Ubuntu, and hides in /usr/lib/syslinux/memdisk.

Memdisk lets you boot a floppy image, via grub or pxelinux. In this modern era of computers without floppy drives, it means you can do BIOS updates without having to go through the whole procedure of turning a floppy image into a bootable CD.

In PXELINUX, the config file would look like this:

DEFAULT memdisk initrd=FILENAME.img

In Grub, like this:

title     Bios Flash
kernel    /boot/memdisk
initrd    /boot/FILENAME.img

Thanks ThinkWiki for the idea.

Caveat emptor: apparently some flash tools don’t like memdisk, so YMMV

Syndicate content