A day in a nerd's life

Last week, I took a small but important step on my career as a professional nerd: I changed the BIOS settings of a running computer through a GPRS connection. I'd rather omit the details on why this was necessary. Well... ok. We made a mistake. We shipped an Otos people counter to Saariselkä some time ago, but forgot to set the autoboot flag in the power management set-up. The result: every single power shortage turns the computer off, and it needs to be manually restarted. Shame on me, it didn't have a UPS.

I found it unappealing to travel to Saariselkä (it is over 460 km from here) just to switch a single bit in BIOS settings, but there seemed to be no remedy. No, wait. Hadn't I heard about something called /dev/nvram? I had to grab my laptop and give it a quick check at about 11:30 pm.

Next day at work. Remote connection to the Otos box at Saariselkä. Save the CMOS dump. Take similar dumps of all our computers to find one with the same binary layout. Only one seemed to match, but that should be enough. Now find out the bit that needs to be changed. Turn on the computer, make the change to its power management settings, take the CMOS dump again and see what was changed. Great, I got you.

When the CMOS battery goes low, the memory will soon get garbled. That is why the boot-up software places a checksum somewhere into the memory. I knew it was a CRC16, but had no clue where in the memory it was placed. Worse yet, I had no idea which bytes it was actually calculated from. So I wrote a short C program that tried all reasonable combinations. Finishing the job was easy: take the original dump, change the autoboot bit, recalculate the checksum, and store it, copy the modified memory dump back to the computer at Saariselkä, and reboot the machine.

Finally, with all tests, it had taken me four hours to change a single bit in a computer's memory! Some people calculate productivity based on the number of lines written...

(Posted by Topi)

Addendum 2008-09-30: It works! Heikki returned from his trip to Nuorgam and reported that he had succesfully tested the machine. He also installed an UPS there.