checking dns glue records

This is mostly a reminder to myself. Here’s a way to check a domain’s DNS glue records. For example, for google:

 dig +trace +nosearch +all +norecurse google.com
Posted in Sysadmin | Tagged , , | Leave a comment

Jaunty’s stabilizing

A quick update on some of the bugs reported in my previous post bugs, bugs, bugs: upgrading to jaunty jackalope.

The two most serious problems were atrocious Intel video performance, and ongoing sound issues. Thankfully, the Intel issues have been addressed. Specifically, a really nice Troubleshooting Intel Performance document by Bryce Harrington has appeared. It lays out what is happening (in short: major driver refactoring), why it is affecting performance on some hardware, and specifically what to check and how to work around speed issues.

I ended up going back to the xserver-xorg-video-intel-2.4 package which fixes my main issue – really slow workspace switches. Looks like kernel and X.org fixes have already made it to Karmic Koala, but I’m happy to use the older driver until Karmic is released.

As for tor, Jaunty packages are now available so to install tor, just add

deb     http://mirror.noreply.org/pub/tor jaunty main
deb-src http://mirror.noreply.org/pub/tor jaunty main

to your

/etc/apt/sources.list

and apt-get install tor.

Finally – there’s a better way to reload the sound modules:

alsa force-reload
Posted in Free Software/Open Source | Tagged , , , , | Leave a comment

counting known_hosts

All right folks, time to fess up. What’s your count?

$ wc ~/.ssh/known_hosts -l
1470

Obviously there are some old machines in there – this file goes back at least five years. There are some duplicates as well as there is one line per host/port/user combination. It’s annoying that I can’t weed out old entries easily, as ssh now encrypts the entries in known_hosts by default. Of course that is a very sensible thing to do from a security perspective, but it’s a shame from a statistics point of view.

Posted in Sysadmin | 1 Comment

bugs, bugs, bugs: upgrading to jaunty jackalope

I upgraded my laptop to Jaunty Jackalope. Here’s the list of issues (and solutions) I’ve run into:

1. Tor is not packaged anymore, apparently there is no Ubuntu maintainer. Upstream provides Ubuntu packages, but they have no jaunty package yet. So, we need to build from the intrepid source package. Add

  deb-src http://mirror.noreply.org/pub/tor intrepid main

to your /etc/apt/sources.list, and

  apt-get update
  cd /usr/src
  apt-get build-dep tor
  apt-get source tor -b

2. Bug 270046: Apparmor *still* fights with cups-pdf. This one’s been around since the Hardy days. You’d think it would be fixed by now… Specifically, print jobs to the PDF printer will just vanish because apparmor does not allow cupsd to save them in ~/PDF. Solution: disable apparmor for cupsd:

  apparmor_parser -R /etc/apparmor.d/usr.sbin.cupsd
  /etc/init.d/apparmor restart

3. Bug 339555: Intel video is really really really really slow. Case in point: workspace switching takes seconds. (Partial) fix: upgrade to a experimental 2.6.30rc3 kernel. Even with that kernel, video performance on this GM965/GL960 based system is still not what it should be. To be continued, no doubt.

4. Bug 334657: Subpixel/Lcd mode with VRGB/VBGR makes fonts on qt4 applications unreadable. Really, really unreadable. Fix: use experimental patched qt4-x11 packages.

5. Sound has been an issue on this laptop from day one. It’s a Dell inspiron 1420N that shipped with Ubuntu preinstalled, but at the time a special Dell-supplied kernel was necessary to get working sound. The sound hardware is

$ lspci -vnn
00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio Controller [8086:284b] (rev 02)
	Subsystem: Dell Device [1028:01f3]
	Flags: bus master, fast devsel, latency 0, IRQ 21
	Memory at fe9fc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: 
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

First of all I had to add my user to the pulse-rt group – pulseaudio was complaining loudly about that in /var/log/syslog. That’s a Jaunty upgrade bug.

Secondly, for some reason I can not get sound to work until I unload the snd_hda_intel module and reload it. Sadly, that means closing all applications that are using the sound hardware – mpd, firefox, pidgin, the gnome volume control applet, etc. I don’t know what’s causing this, but I had the same problem on Intrepid after the last kernel upgrade. Again, to be continued.

Posted in Free Software/Open Source | 2 Comments

Drupal: disable caching for an entire module

I have a legacy php application that had to be integrated into a Drupal site, so I wrapped it in a simple drupal module. The code needs to run for anonymous users.

The wrapping worked fine, but the Drupal cache really gets in the way sometimes. For instance, my legacy code does not use the drupal_set_message functions when a form submit fails. That means that the page that tells the user they made a mistake gets cached, leading to all sorts of unexpected results.

I looked around for a way to disable the Drupal cache for an entire module, but only found some results that didn’t quite do the trick. But then I stumbled across the CacheExclude module, which does exactly what I want. I didn’t want to include yet another module for something as simple as this, so just duplicated the ‘magic’ lines in my module:

function your_module_name_init() {
  // We don't want caching for this module
  if (drupal_match_path($_GET['q'],'url_of_your_module/*')) {
    $GLOBALS['conf']['cache'] = FALSE;
  }
}

In that snippet, you’ll want to change ‘url_of_your_module’ to a string unique to the path of your module. For instance, if your module lives a http://my.web.site/the-wrapped-module/, then you could put ‘the-wrapped-module’ in the place of ‘url_of_your_module’.

And that does the trick. Now, I’m by no means a Drupal expert, so there may well be a better way to do this. Feel free to leave a comment if you know how.

Posted in Free Software/Open Source | 2 Comments

Asterisk vs. Telemarketer: 1 – 0

We’ve been getting telephone spam from Affiliated Mortgage Protection

Affiliated Mortgage Protection
292 Terminal Ave W,
Clark, NJ- 7066.
(732)-499-0700

We answered five of their calls the past three weeks, and each time asked them to stop calling. Apparently, they happily ignore these requests.

They called again this evening and the lady on the phone had the nerve to say that she would have to put me on hold to get taken off their list, because I would have to talk to a supervisor. I hung up. We’re on the do not call list, so I filed a complaint.

Anyway – no more. I decided to let Asterisk deal with them:

; Affiliated Mortgages.
exten => XXXXXXXXXX,n,GotoIf($["${CALLERID(num)}" = "7324990700"]?Telemarketer)

; Telemarketers. Let it ring for 5 minutes and then hang up on them.
exten => XXXXXXXXXX,n(Telemarketer),Ringing
exten => XXXXXXXXXX,n,Wait(300)
exten => XXXXXXXXXX,n,Hangup

Make sure you have

[general]
unanswered = yes

in your cdr.conf if you want to log the call attempts from frustrated telemarketers :)

Posted in Free Software/Open Source | Tagged | 1 Comment

virgin america rocks

Flying from Boston to San Francisco right now on Virgin America. The plane is new, the entertainment system runs GNU/Linux, you can order food and drink (soft drinks free, the rest is sadly overpriced) right from the touch screen in front of you, and the wifi is rock solid and not too expensive ($12.99 with 25% off – about $10) for a 6 hour flight. And there are 2 power plugs for every 3 seats in economy.

SSH is entirely useable, latency between 100 and 300ms. The wireless is offered by GoGo, and apparently they use an EVDO uplink.

If you are so inclined you can pay to watch movies and TV (overpriced IMO, at $8/movie), but the games and music are free. Good music selection too, and you can build your own playlist. I couldn’t keep listening to it though, as the system fed a really annoying high-pitched hiss into my headphones. Also, the switch between PA announcements (of which there are very very few, thankfully) and back made one song just go super super quiet for me, and I couldn’t get normal volume again until I skipped to the next song.

I also saw some funky decoding artefacts on a neighbour’s screen, who was watching a movie. And there are quite a few features that are still to be implemented (the button is there but you just get a message stating .

The travel map is made with Google maps, and it has some nice features – it lets you zoom in/out and recenter the map. It also tells you how fast the plane is going and what the temperature is outside, but curiously an arrival estimate or even a display of the time at the place of arrival is missing. The system has a number of preferences that can be set, but it won’t allow you to switch to metric for the readouts, sadly.

So, all in all this flight has been very pleasant – and productive. I’ll hate to fly with a conventional carrier after this…

Posted in Everything else | Leave a comment

recycling a ton of old computing gear

We recycled at work this week – literally over a metric ton (estimated) of old servers. This is what about two thirds of that amount looked liked:

old_computers

Apologies for the low quality picture – I only had a crappy cell phone camera on hand…

Posted in Environment, Hardware, Sysadmin | 2 Comments

howto: replace a PLCC chip with a socket “ghetto style”

I used Peter Stuge’s “ghetto” method to replace a PLCC bios chip with a socket on an asus m2a-2vm board. This board has excellent coreboot support.

The method basically consists of cutting off the legs of the PLCC chip as close to the package as possible, so as to minimize strain on the paths on the motherboard while cutting. After that, the legs can easily be de-soldered from the board, and it’s trivial to solder on a PLCC socket. Obviously you loose the PLCC chip in the process, but this method is a lot easier than removing the PLCC chip with a heat gun. It’s also safer for the surrounding components.

Here are some photos:

PLCC chip before removal
The chip prior to modification.

PLCC chip with some legs cut off
Legs cut off on two sides of the chip. It’s important to use the right cutter for this job – it needs to be able to cut very closely to the package of the chip. I used a Hakko CHP Ergonomic Micro Cutter, part number TR20M.

PLCC chip removed
PLCC chip removed.

PLCC chip without legs
PLCC chip without legs.

legs de-soldered from board
The legs have been de-soldered. If you look carefully near pins 1 and 2 on the top row, you’ll see I was foolish and used too much force and a too small soldering tip while de-soldering. I damaged the board. Luckily the pins involved are all on the same big pad, and everything still works.

the socket prior to soldering
This is the socket prior to soldering. I had to remove the plastic ‘floor’ of the socket in the center to allow easy access to the pins for soldering. You can put that piece of plastic back in the socket after it has been soldered onto the board, even loose. It will prevent PLCC chips from being pushed too deep into the socket, where not all pins might make contact with the socket.

socket installed
The PLCC socket, installed.

Posted in coreboot, Hardware | Leave a comment

and so…

the great patent war begins. This is the big one.

Posted in Copyright, patents, and trademarks | Leave a comment