Smörgåsbord

Ambachtelijk bereide beschouwingen.

Doorgaans vat ik het invallen van de avondschemering op als een hint dat er zo zoetjes aan en uiteindelijk naar bed gegaan moet worden. En inderdaad, keer op keer blijkt weer dat het na verloop van tijd echt donker is en dat alle normale mensen naar bed zijn.
Hier in Umeå kan ik op de duisternis wachten tot Sint Juttemis, oftewel tot ergens halverwege augustus. Avondschemering gaat ongemerkt over in ochtendschemering. Dan ben ik verdiept in ‘t een of ander, wachtend op mijn slaapcue, en dan hhheeeeehallogoeiemorgen-wicher-hopsatralala-wat-een-mooie-nieuwe-dag-he-ik-ben-dus-de-zon-en-ik-kan-stralen-kijk-maar-pats-hupsakee-je-hele-kamer-in-lichterlaaie-mooi-he-ben-je-nou-niet-blij-dan?

parkeerplaats achter

De parkeerplaats achter om tien over twee ’s nachts. 1/30 s belichtingstijd. De lichtintensiteit in de foto komt heel aardig overeen met de lichtsterkte zoals-ie in het echt was.

zonsopgang

Zelfde tijdstip, maar genomen met een veel kortere sluitertijd zodat er wat van het gloren te zien valt.

Naast mooie schemertaferelen levert de nachteloosheid nog het volgende op:

  • Schorre zangvogels, want die draaien shifts van zes uur zonder pauze.
  • Warmte. Al die zonneschijn maakt dat we ook hier de 25 °C hebben kunnen aantikken.
  • Ontploffende bossen en parken. Waar een maand geleden nog sneeuw lag is het gras nu alweer gemaaid. In Nederland heb je vroeg- en laat uitlopende bomen en struiken. Hier is het gewoon een kwestie van WHAM-groeien-groeien-go-go-GO! zodra de grond ontdooid is. Alles tegelijk. Als je ’s ochtends het bos in gaat moet je een bijl meenemen ’s middags hetzelfde pad terug te kunnen nemen.
  • Chronisch vermoeide Wichers. Mijn kamerraam is op het noorden. ‘t Is er om 3:00 ’s ochtends lichter dan op elk ander moment van de dag. Het is een zieke grap van de architect, want dit betekent dus ook dat het ’s winters de klok rond nacht is. Mmmm, nacht. Maar voor nu zoek ik zo’n ding dat wintervermoeide mensen gebruiken, zo’n kunstzon – maar dan omgekeerd. Een kunstnacht. Een apparaat waar ik dan elke avond even voor moet zitten en dan straalt het verrukkelijk koude en stille donkerte in mijn gezicht.

Niet technisch en dus voor sommigen des te leuker:
Een panorama op de Storgatan in Umeå, van individuele foto’s aan elkaar genaaid met Hugin. Gemaakt op 20 maart. In de verte de bevroren rivier de Umeälven, rechts mijn fiets.

panorama-storgatan-umea
Wel even een paar keer klikken om ‘m in volle glorie en scrollbaar in je browservenster te krijgen, anders zie je niet veel.


Tags: ,

gentarisFor some years now I have been adminning seth.leper.phil.uu.nl; a Solaris zone (virtual private server) acting as a web server for various student organizations and nonprofits. Over time it has become messy. There’s the Solaris environment, arid and archaic. There’s your usual webserver stack, more powerful GNU replacements for the Solaris utilities, and FOSS stuff all semimaintained on read-only NFS, mostly outdated and outside of my control. And there’s my own ghetto-style compiled tree with various stuff that makes the system useful (GNU screen, some Apache DSOs, etc). Just getting PHP with mundane extensions to compile is an intense respiratory exercise because of all the sighing, moaning and cursing involved. PHP’s build system is terrible in that it makes so many assumptions on where to find its deps that for anything out of the ordinary (no write access to places such as /usr, deprecated versions of libs installed in /usr/(local/)lib but preferred libs installed elsewhere), it requires guns-drawn cowboypatching of the configure script. Not to mention the nasty street fights between /usr/ccs/bin/ld and an outdated GNU ld.
So over the years this system has become like the bastard part of multizygotic interspecial Siamese triplets bred by a hippie commune in its entirety and whatever livestock they may have been keeping. Madness.
I was in heavy need of a sound and modern compiler toolchain, and a way to keep my software up to date and isolated from the streetfights. So how about some package management? Some sort of metadistribution? Not just any – I need headers to compile random stuff against, and it should not make any assumptions about where I’m going to install this metadistro, as there are read-only NFS mounts all over the place. And there should be no dicking around with LD_PRELOAD or chroots. That rules out most (all?) precompiled Solaris metadistros.
Now what? Well, there’s always Gentoo, which has kept me company since the 1.2-release of yore. Its flexibility and tinker-friendlyness is what makes this my favourite Linux distribution. But it’s not just Linux. The Gentoo-Alt Prefix project does exactly what I need. It installs a compiler toolchain and features over 2000 ported ebuilds. Huzza!
It took some ad-hoc patching and fiddling beyond the bootstrapping instructions but Netcraft confirms it: I have now migrated to a shiny new and comfy webserver stack. I am in love with it so much that I’ve GIMPed and Inkscaped together a nice badge to go with it. Gentoo logo guidelines make me state that although you see a Gentoo G, that does not mean there’s any official connection with the Gentoo Foundation.


Tags: , , ,

Samsung does not provide a way to flash the BIOS of NC10 netbooks from within Linux. That does not come as a complete surprise for this type of consumer hardware. What is worse is that you won’t even find DOS utilities (for flashing from a bootdisk) on the NC10 page at samsung.com, for that; you have to somehow guess that you need to go to samsungpc.com (!?!!?). Anyway, with FreeDOS and a bootable thumbdrive I am able to flash my BIOS. I then dump the BIOS from Linux with the Flashrom utility.
These are the dumps so far:

You can use flashrom to flash your BIOS with these images, all without leaving Linux. I’ve signed them with GPG (keyID 08B6A4AE), and I also provide an MD5 hash which you should check before flashing. You might even want to verify your current BIOS against a provided dump of the same version; this way you can reassure that you have the exact same hardware:

root >>>flashrom -v NC10-07A.rom 
Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH7M", enabling flash write... OK.
Found chip "Macronix MX25L1605" (2048 KB) at physical address 0xffe00000.
Flash image seems to be a legacy BIOS. Disabling checks.
Verifying flash... VERIFIED.

It’s probably wise to use flashrom to make a backup dump of the original BIOS of your NC10.
I have an NP-NC10-KA03UK. KA03 is the revision code, printed on the white sticker on the netbooks’ bottom. The roms have been proven to work on other revisions, too — check the comments, or just try it on yours. Please post your revision code if you successfully flashed a revision that hasn’t been posted yet.

One further note: The purchase time in the BIOS will be set to ‘2009/01′ which is when I got mine. But, should the need arise, you may be able to hex-edit the dump and reflash to reflect your true date of purchase (or any date really – you can may as well edit it to announce you bought it in August, 1982 if you feel like it). In the 11CA release you’ll find the date at offset 18031E. If that doesn’t work, just flash it with the backup dump you made. You did dump your original BIOS, didn’t you?

Needless to say, these BIOS images are unofficial. But then again, even flashing your bios with the utilities provided by on samsungpc.com void your warranty. You and you alone are responsible for any damages arising from the use or inability to use the images I provide. They are provided ‘as-is’.


Tags: , ,

The other day I compiled Firefox 3.5-beta4, and, apart from many improvements, I noticed that I am now affected by the infamous ‘hiccups’. Firefox will stall for seconds at a time on my poor netbook. Details on how this relates to the many fsync() calls made by the persistance layer (SQLite) can be found all over the net.
But I don’t want Firefox to stall and I don’t want to keep my harddisk awake with all these writes when I’m on battery power.
Luckily, both these problems go away if you put your Firefox profile on a ramdisk. There are numerous guides out there that save you from working out the details; I used this one from the Gentoo forums.
The guide uses cron to sync the (presumably) modified contents of the ramdisk – bookmarks, cookies, whatever – back to permanent storage (harddisk). You and I both know that while it’s often convenient to use cron, it’s not always the Right Way of Doing Things®. Why sync if nothing’s changed? I wrote a script that employs the inotify system to do the syncing only when necessary. You’ll find it in the forum thread I linked to earlier, but I post it here “ter lering ende vermaeck”. Depending on your browser there might be a vertical scrollbar at the bottom which lets you read up to the EOL’s ;-)
You can find the latest version at my public repo.

#!/bin/bash
 
# Packfox, a tool to facilitate running Firefox with its profile stored
# in RAM (tmpfs). Copyright 2008-2009 Wicher Minnaard, wicher@gavagai.eu .
# Distributed under the WTFPL, http://smormedia.gavagai.nl/dist/packfox/COPYING
# Latest version available at http://smormedia.gavagai.nl/dist/packfox/
 
 
# Change this to match your profile
PROFILE=$(hostname)
PFDIR="${HOME}/.mozilla/firefox"
# Tar every .. seconds (regardless of changes)
TMOUT="1800"
# But not more often than every .. seconds (regardless of changes)
TMMIN="60"
# Regex for which files not to act on when they're changed.
# Use inotifywait -m -e modify -e move -e create -e delete --exclude '(/Cache/)' -r your_profile_dir
# and watch the output while browsing to determine which regex will be right for YOU.
IEXCL="(.sqlite-journal$)|(\-log.txt$)|(cookies.sqlite$)|(sessionstore\-[0-9].js$)|(/weave/)|(/Cache/)"
# Have you read everything and have you made the necessary adjustments? Then remove the line below ;-)
echo "I should read the README and adjust the script variables before running this." && exit 2
 
 
# No user servicable parts below this line.
TGT="${PFDIR}/${PROFILE}"
 
# Global vars
INOTYPID=""
SLEEPPID=""
PACKLOCK=""
 
# Cleanup function
terminate(){
  # If we are the daemon and we get SIGINTed/SIGTERMed, kill our children
  # and if not already packing, do one last round of packing.
  if [ "$(basename ${0})" == "packfox-daemon" ]
  then
    if [ -n "${INOTYPID}" ]; then kill ${INOTYPID}; fi
    if [ -n "${SLEEPPID}" ]; then kill ${SLEEPPID}; fi
    if [ -z "${PACKLOCK}" ];then packup; fi
    exit
  fi
}
 
# For cleaning up 
trap terminate SIGINT SIGTERM
 
# Suicide with goodbye note. If gxmessage is installed, use that.
seppuku(){
  echo "${1}" 1>&2
  which gxmessage > /dev/null 2>&1 && gxmessage -nofocus -title "$(basename ${0})" "${1}" || xmessage "${1}"
  exit 2
}
 
# Checks and setup
test -d "${PFDIR}" || seppuku "Profile dir doesn't exist"
if [ -z "$(mount -t tmpfs | grep -F "${TGT}" )" ]
then
    mount "${PFDIR}/${PROFILE}" || seppuku "Mounting of profile's tmpfs failed. Check /etc/fstab and the output of 'dmesg'."
fi
test -f "${TGT}/.unpacked" || tar -xpf "${PFDIR}/${PROFILE}.packed.tar" -C "${PFDIR}" \
&& touch "${TGT}/.unpacked" || seppuku "Error unpacking the profile tarball. You might want to use the backup tarball located in ${PFDIR}."
 
# This tars up the profile
packup(){
  PACKLOCK="locked"  
  cd "${PFDIR}"
  tar --exclude '.unpacked' -cpf "${PFDIR}/${PROFILE}.packed.tmp.tar" "${PROFILE}"
  mv "${PFDIR}/${PROFILE}.packed.tar" "${PFDIR}/${PROFILE}.packed.tar.old"
  mv "${PFDIR}/${PROFILE}.packed.tmp.tar" "${PFDIR}/${PROFILE}.packed.tar"
  PACKLOCK=""
}
 
# No daemon, just packing
if [ "$(basename ${0})" == "packfox" ]; then packup; fi
 
# The daemon loop
if [ "$(basename ${0})" == "packfox-daemon" ]
then
  which inotifywait >/dev/null 2>&1 || seppuku " You'll need the 'inotify-tools' package for this script. Get it at http://inotify-tools.sourceforge.net or from your distro's repos".
  while true
    do inotifywait -q -q -t ${TMOUT} -e modify -e move -e create -e delete --exclude "${IEXCL}" \
    -r "${PFDIR}/${PROFILE}" &
    INOTYPID=${!}
    wait ${INOTYPID}; INOTIFYPID=""
 
    packup
 
    sleep ${TMMIN} &
    SLEEPPID=${!}
    wait ${SLEEPPID}; SLEEPPID=""
    done
  exit
fi

Tags: , , , ,
© 2009-2010 Wicher Minnaard | electronic mail | theme: righteously modified "dark strict"