Archive for Tech

Hi from San Francisco

I’m in San Francisco for this year’s WWDC. Looking forward to meeting all of you there :-)

Went to the Haight Ashbury Street Fair today … here are some pictures I took.

Haight Ashbury Street Fair

Yummy Food Dazed Out Guy Smokin’ Kermit Hare Krishna Chanters

Comments (1)

Clueless New Year

Two years ago, I posted a Happy New Year greeting shortly past midnight on January 1. I attached a picture of fireworks I had taken just that night. Not even a particularly good one, but for some reason I still decided to include a link to a high resolution version of the picture.

Over the coming year, that high res version of the fireworks photo shot up to be search result number 3 on Google Images for the search terms “Happy New Year”.

Google Image Search Results

Then, one year later, “the clueless” started to flock in. Or should I say “hot-link in”? People started including the photo in their new year’s greetings on MySpace and other sites. And they didn’t just go and copy it, but they hot-linked the full resolution version, using <img> tag attributes to scale it down to about 300 pixels width (what a shame!). While guestbooks and forums were certainly the worst offenders, people also hot-linked it from official city web sites and in their emails to their office mates. I often got 100 or 200 downloads from the same company with an email referrer.

Email

The first year, I tried to decrease bandwidth use (and the level of fun for the clueless :wink: ) by serving a 30 pixel black and white version of the image to the worst hot-linking offenders. It didn’t help, so this year I tried serving an image with a polite message to please not hot-link. It seems people just don’t care. In fact, there’s websites out there that consist of nothing more than an endless list of hot-linked images taking forever to load. I now removed the high-resolution version entirely, after my usage graph looked like this for two New Year’s straight.

Comments

Playing with WordPress

After using WordPress for another site for a while, I moved my website to WordPress as well. Maybe I’m going to blog more often if I don’t have to locally generate and then upload my posts every time ;)

At the same time, I decided to finally get rid of the old /archives/yyyy-mm-ddThh-mm-ss.html permalink structure. Of course, permalinks are … sort of … not meant to be changed. I didn’t want to pollute my .htaccess file any further by using individual redirects, and using mod_rewrite was not possible, since the new permalink URLs contain more information than the old URLs did. I ended up writing a shellscript to create an HTML file with a redirect for each of the old archive pages and put those files into the /archives directory.

The only thing that remains to be done is importing the comments from HaloScan. Oh … and apologies to everyone who just had a year’s worth of blog entries pop up in their news reader :cool:

Comments

Algorithmic Poetry

I think that I shall never see
A graph more lovely than a tree.
A tree whose crucial property
Is loop-free connectivity.
A tree which must be sure to span.
So packets can reach every LAN.
First the Root must be selected
By ID it is elected.
Least cost paths from Root are traced
In the tree these paths are placed.
A mesh is made by folks like me
Then bridges find a spanning tree.

from R. Perlman: An Algorithm for Distributed Computation of a Spanning Tree in an Extended LAN (PDF)

On that note: I passed my computer networks + mobile computing exam today … only two more exams and the diploma thesis left. Yay! :-)

Comments

Something I’ve been working on …

This is our new student lab, in beta-testing since Friday. The machines run Windows XP and Ubuntu Linux.

Ubuntu Lab Photo

Installation of Ubuntu is fully-automated through Debian installer preseeding. Its partitioner is replaced with a custom udeb that provides formatting for the Linux partitions, while preserving the complex partitioning scheme that Windows/Norton Ghost needs.

Updates and patches get distributed using a custom toolkit written in Python (originally designed by Fabi for RedHat-based systems). It consists of an NFS mount with directories for different classes of machines, and a script (run by cron or on-demand) that checks for new updates to the machine classes a system belongs to. Updates are represented by numbered symbolic links to files, tars, text files with package names to be installed through apt, debs, patches and shell scripts. The on-demand updating and other administrative tasks are initiated through SSH Forced Commands. The postinstall process is also done using the same system, through rc-style numbered scripts.

Each machine has a separate installation partition, containing a netboot kernel, initrd, and the machines’s boot loader (Grub) installed into its boot sector along with the associated configuration files. The installation partition is distributed by Norton Ghost (which is used by the Windows guys anyway to distribute their images), and has the “bootable” flag set. This enables Ghost to install Windows and reboot it multiple times by simply removing the flag and restoring it after installation is complete. By providing a Grub configuration file that will boot into the installation kernel with appropriate kernel parameters for preseeding, any machine running Linux can be re-installed at any time by simply mounting the installation partition and copying the special installation configuration over the normal menu.lst (of course it will have to be reset before the installation reboots for the first time, or we’ll end up in an endless cycle of base installs).

I’ll probably have more to say on this later, but here’s a random collection of “lessons learned” while setting up this lab:

  • FAI and other 3rd party tools are not the only solution, plain Debian installer preseeding works too — or even better than FAI in Ubuntu’s case.
  • Expert recipes for use with partman in Debian installer are unable to deal with complex partitioning setups. We use our own tiny udeb to accomplish this, and radically eliminate partman from the installation process.
  • Debconf does not export DEBIAN_FRONTEND, so when using “noninteractive” as the frontend, make sure the variable is set to “noninteractive” before running anything that might use debconf (such as installing packages). Otherwise some postinstall scripts fail miserably.
  • NIS password changes are broken in pam_unix in every version whose source code I’ve seen so far. I’ve modified 0.76 to make it work, but it’s hardly a good solution (otoh NIS isn’t either, and there’s a chance we won’t have to use it much longer).
  • Python rocks :-)

Comments

« Previous Entries Next Entries »