Toshiba++

Dec 5, 2005 / 0 comments

As I've previously said I bought a Toshiba Portégé R200 a few months ago. It's lovely and wonderful and makes my old laptop (a Compaq N200) look tiny, but is still quite small.

However I discovered it wouldn't hold charge. If I unplugged it and used it I'd quite happily get 3-4 hours use off the battery, but if I charged it up while off, then unplugged it (leaving it off) and didn't touch it for a couple of days it wouldn't power on and needed fully charged again. This is a bit of a bummer, but I hadn't got round to sorting it out as I wasn't finding it too inconvenient.

I decided I should really get it dealt with before I go back to my parents' for Christmas, so rang up Toshiba's repair line a few weeks ago. Told them what the problem was and they said they'd ring back in the morning to arrange a pickup time. Except they actually rang back that afternoon. It was too late for collection the next day, but they said they'd pick it up the following day in the afternoon. Also I wasn't to pack it or provide any of the accessories; just the bare laptop. Handy. Lo and behold the nice man from DHL turned up when Toshiba said he would, had a piece of paper with the right reference number on it (though in quite small print) and didn't want the laptop packed up as he had a suitable box already prepared.

Time passed and I heard nothing. I was getting a bit worried, but Tosh say it can take 5 working days and it hadn't been that long (and given the nature of the fault I guessed they'd need to charge and discharge to check). But it was a bit weird that they'd not asked me to do any of the stupid things you're normally asked to do. (Have you rebooted? Reinstalled? Repented?) Plus the laptop only has Linux on it, so I was worried they'd be freaked by that (though they'd been fine when I mentioned it on the phone).

It came to day 5 and I decided I'd ring them the following day. And then the nice man from DHL turned up with a big, well padded, box containing my laptop. At first glance it appeared to only contain my laptop, but when I opened up the laptop there was an A4 sheet saying that the battery had been replaced and the BIOS upgraded.

Since then the laptop has actually held charge, so it looks like they did the job.

So, congrats to Toshiba. More communication would have been nice, but it got fixed, you didn't wipe my Linux install (though I'd backed it up and removed any personal data anyway) and it was done within the period you claimed. I've not had to get a laptop fixed before, but iDunno hasn't had fun with Acer in the past, so I was prepared for the worst.

OpenWRT on the Netgear DG834G

Nov 30, 2005 / 0 comments

I spent too much time today reading MIPS disassembly of the ADAM2 bootload, as used on the Netgear DG834G. The problem is that the version used on the Netgear performs a checksum over most of the flash device on every boot. This makes the use of JFFS2, as done by OpenWRT, somewhat problematic. In an ideal world I'd try to compile up a newer, less restrictive version of ADAM2 but there's no JTAG on the Netgear that I've found and the thought of frying the bootloader and bricking the device wasn't appealing.

So what I've ended up doing is finding where the checksum is done and changing the branch instruction that aborts the boot to a nop. It's still scary, but it appears to do the job.

PLEASE NOTE THE BELOW COULD PERMANENTLY BREAK YOUR ROUTER

First, obtain your ADAM2 image. This is 128K and is mtd2 from the bootloader view. It should have an md5sum of 0530bfdf00ec155f4182afd70da028c1. If it doesn't, stop. The version I'm talking about is 0.18.01 as distributed by Netgear.

Assuming you have the right md5sum you want to go to offset 0x3944 where the 4 bytes should be 44 09 00 0C (representing a jal 0x90002510 during execution). Replace these 4 bytes with 0 (representing nop) and you should end up with a new image with an md5sum of d8a2f4623bf6f64b7427812f0e849aa7. You'll then need to do something like dd if=adam2-fix.bin of=/dev/mtdblock/2 on the device (I don't believe you'll be able to rewrite the bootloader from the bootloader for some reason...).

After that ADAM2 will still checksum the flash, but will continue to boot it after printing a checksum error message. This means you can go off and build yourself an OpenWRT AR7 based image and install it on your Netgear. Rock.

X session management

Nov 29, 2005 / 0 comments

I use evilwm as my window manager. I like it; I mainly end up with a whole bunch of xterms and only a handful of graphical apps (Firefox, Psi, xmms and GKrellM). evilwm's minimal decorations mean I can fit everything nicely on my screen without clutter, and the virtual desktops let me have various separated out bits (eg Firefox gets a full desktop to itself).

What I would like however is some form of session management. I'd like to be able to shutdown down my machine and when I restart it have my X setup look similar to when it was shut down, rather than having to start up a dozen apps and position them as I like them. I know I can do software suspend, but that doesn't cover kernel/library upgrades. I had a play with xsm, but although it could start up my xterms it didn't place them correctly. And didn't seem to restart Firefox, but I didn't poke that hard once I realised the xterms weren't getting placed.

Am I doing something wrong? Do I need some different window manager setup? I think I'd rather live with having to place stuff myself rather than pull in large amounts of GNOME. I've previously used Window Maker and Fluxbox for prolonged periods of time - can either of those do what I want better?

I was a brave boy at the dentist today

Nov 25, 2005 / 0 comments

My main fear in life is pain. I'm a wuss. Nowhere is this more obvious than when I'm at the dentist. I literally start shaking when I sit in the chair. While he's prodding around inside my mouth I can feel myself tense up more and more until I force myself to relax and then the process repeats. Being 6'1" I don't get a lot of people believing me when I tell them just how nervous the whole thing makes me.

Anyway. When I came to Norwich I managed to find a dentist who claimed to be suited to nervous patients. I went and didn't find them that good, but did make an appointment for my next checkup 6 months after my initial appointment. And then they cancelled it and I spent the next 3 years thinking I should really get round to sorting it out again and not doing so. Then several weeks ago I was having a conversation at an ALUG meeting with Becca and she recommended her dentist. So I decided I should give them a go and discovered that Phill also uses the same one and said they were good too.

I finally got around to going today (having filled out all the forms last week). The dentist was nice and friendly and took me on board about being shit scared. And said some consoling words about my teeth being in reasonable shape. I got away with a scale and polish (which I have to go back to get completed in a couple of weeks) and no mention of a drill anywhere. Rock. Now let's see if I can manage a regular checkup schedule. :)

Oh, it's the Guildhall Dental Practice at 9 Upper Goat Lane, Norwich if anyone else is looking. 01603 760032.

Network installing FreeBSD

Nov 24, 2005 / 0 comments

So, Black Cat Networks have a bunch of nice dedicated servers and I've been working on various network installs for them. Debian was of course easy; there's a nice netboot.tar.gz that has everything you need (including configs for serial consoles).

Fedora Core was a bit harder; there's mention about network boots and installs, but not a lot of docs. A pxelinux entry like:

label fedora
	kernel fc4/vmlinuz
	append initrd=fc4/initrd.img ramdisk_size=8192 console=ttyS0,9600n8 serial

does the right thing, with vmlinuz and initrd.img coming from http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/images/pxeboot/. Fedora's a bit annoying in that it doesn't offer you a selection of mirrors to network install from though, so you need to have worked that out for the install.

FreeBSD however, was much harder. Firstly, there aren't any decent docs about it that I could find. Secondly, it really wants to use NFS, even though TFTP will be required anyway for the PXE boot stage.

So, I ended up recompiling the pxeboot loader with LOADER_TFTP_SUPPORT enabled and LOADER_NFS_SUPPORT removed (though it still tries to do NFS mounts it seems). Of course, you can't do this under Linux easily. Nor can you do it on FreeBSD 4.10 it seems (I was recompiling the FreeBSD 6 loader). However you can on FreeBSD 5.4. You need the lib and sys source trees to do so. Or you can have my prebuilt copy, freebsd.0.

pxelinux config looks like:

label freebsd
	kernel boot/freebsd.0

assuming you put it in a boot subdirectory under your tftpboot root dir. You then need http://ftp.uk.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/6.0/6.0-RELEASE-i386-bootonly.iso to get the rest of the /boot contents from. Burn it to CD or loopback mount it or work whatever magic does the trick for you to get access to the files in that image. Then copy all of /boot on it to boot in your tftproot. You don't actually need boot*, cdboot, loader or pxeboot, but they're all small files. Then, add the following to loader.conf:

boot_serial="YES"
console="comconsole"
kernel_options="-h"
vfs.root.mountfrom="ufs:/dev/md0c"

So, now you can type "freebsd" at your pxelinux boot prompt and it'll boot up the installer. Rock. I don't quite understand why I had to include the kernel_options line above - I thought setting boot_serial would do that for me. However, it works. With the only real pain being having to recompile pxeboot and the lack of docs. Which I've now sorted for you. ;)

subscribe via RSS