Clint Adams: They will hear me say as the pavement whirls




Here's a handy incantation I use with the Intel X.org graphics driver on my laptop.
Put this script somewhere convenient:
#!/bin/sh
if xrandr grep '^VGA connected' >/dev/null
then
#echo "VGA connected"
xrandr --output VGA --above LVDS --auto
xrandr --output LVDS --auto
else
#echo "VGA not connected"
xrandr --auto
fi 2>&1 logger -t xrandr-hotkey
and bind it to your "switch video mode" key, e.g. Fn+F7 on my Thinkpad X60s. For instance, I run xbindkeys, so I saved it as autoxrandr and put this in ~/xbindkeysrc:
"exec /home/smcv/bin/autoxrandr"
XF86Display
Now if you press the "switch video mode" key with a monitor plugged in, you'll get the external monitor appearing above the laptop panel (my preferred configuration - I've balanced my monitor on an N800 box to get the bottom of the screen level with the top of my laptop's screen). If you press that key again after unplugging the VGA cable, the laptop will turn off the VGA output and pull all the windows onto the built-in screen.
Working!
In an old post I dealt with the nice mod_chroot module to secure your multisite server. I also adopted recently vlogger in order to manage better apache logs for virtual hosts, when you have dozens or hundreds of them. Unfortunately the suggested way to use it (a simple piped command) does not work nicely with mod_chroot, because the piped command has to run in the chroot jail.
I’ve climbed up above the tagclouds and appear to be back in the “blogosphere” whatever that is. I hate that “blog” word. I also hate the word “prosumer.”
Spent last weekend in Raleigh at FUDCon which was a lot of fun. I doff my fedora to the organizers. It was great to finally have the opportunity to meet a lot of my coworkers who I haven’t yet had a chance to run into at conferences.
Poked a bit at btrfs in my idle cycles… managed to make it fall-over-go-boom on parisc64. Fixing that up should keep me busy in my spare time for the next little while…
Oh. And if anyone would like to make me a new disembodied head^W^Whackergotchi, I’d very much appreciate it.
After the debacle
last time I tried to grow the size of my existing RAID1 when I put new
disks in daedalus, I thought this time I'd do my homework.
I did some research, I found out the way I should
have done it. I did a practice run on a USB key. I fully planned how I
was going to do it:
mdadm /dev/md2 --fail /dev/sdb3 <delete /dev/sdb3, recreate at new full size> reboot mdadm /dev/md2 --add /dev/sdb3 <wait for sync> mdadm /dev/md2 --fail /dev/sda3 <delete /dev/sda3, recreate at new full size> reboot mdadm /dev/md2 --add /dev/sda3 <wait for sync> mdadm --grow /dev/md2 <wait for sync> pvresize /dev/md2Everything went as planned, until I went to grow the RAID1 volume. It still thought the underlying device was the same size. There was nothing to grow. So at this point, I decided to do something similar to what I did last time to get around the failing disk, and should have done last time anyway. I broke the mirror, created a new degraded RAID1 using the full size of the new partition on the half I pulled out of the mirror, and did a pvmove from the old non-full-sized degraded mirror to the new full-sized degraded mirror. All of that went swimmingly until the pvmove was around 50% complete, when the kernel decided to oops spectacularly. I had to power cycle daedalus to get it back under control, and even in single-user mode, without me doing anything, the kernel started oopsing again. Dammit. I had to boot into emergency-mode (insert standard gripe about Debian's single-user mode being far too non-singular here), then I could resume the pvmove without any further oopsing. After that completed, I was able to ditch the old non-full-sized degraded RAID1 device and resync the new one onto the old partition. There was still some minor filesystem corruption, more likely because I had everything mounted at the time of the crash. Yes, I still haven't learned not to do this kind of thing in multi-user mode. It seems every time I try to minimise the size and duration of an outage, it bites me in the arse. Even though I should have been able to move open logical volumes between physical volumes, the kernel oops seemed to be in the dm_mirror code. daedalus is running a fairly old kernel. The annoying thing is that getting some additional disk space on board was the dependency for doing a general upgrade of all of the software on it. Argh. Anyway, it's done. I hope not to have to go through this again. I just have to sit through a potentially nail-biting remote upgrade of Debian now, and I should be good for a couple more years hopefully.

Recently I bought a new desktop PC and rotated my existing machines around, leaving me with one spare. Last night I donated that PC to a local friend, (co-incidentally the same woman who had been out cat-sitter when I went to stay at Megan's parents for Christmas).
I said "Its got Debian on it, that funny operating system that you used when you were looking after our kitten, remember?".
She said "Linux ssems to be getting popular these days I might as well try it out".
But seriously she used it. It had GNOME, it had firefox, she seemed happy. It isn't rocket science these days to point a technicalish user at a Debian Desktop and expect them to know what to do with it. The only minor complication was the lack of flash/java since it was etch/amd64 - but thats probably a plus with the amount of flash adverts!
In other news I made a new release of asql last night. This now copes with both Apache's common and combined logformats by default. (Yet another tool of mine which is now being used at work, which motivated the change.)
I've also started pushing commits to xen-tools last night, so there'll be a new release soon. Mostly I'm bored with that code though, it doesn't need significant updates to work any longer. All the interesting things have been done, so it's probably only a matter of time until I drift off. (To the extent that I've unsubscribed myself from xen-users & xen-devel mailing lists)
Virtualisation is increasingly a commodity these days. If xen dies people probably won't care, there are enough other projects out there doing similar things. Being tied to one particular platform will probably come to be regarded as a mistake.
(Talking of which I should try out this lguest thing; I just find it hard to be motivated...)
I've been quietly
coveting the Zonbu
for a number of months now. I finally caved in and ordered one when we got
back from Australia, with the intention of using it to replace
minotaur, the computer that exports my RAID10 via ATA over Ethernet
to my MythTV box.
minotaur is the old daedalus, which I bought back around
2000. It's a VA Linux Pentium III. It's old, noisy, and has no idea what
power management is. The Zonbu has more grunt than it (in terms of
BogoMIPS), and it's a fraction of the size. Our linen cupboard is now
significantly quieter (and hopefully cooler). Heck, hopefully the power bill
will be lower as well.
Anyway, I put the order in when we returned from Australia, with the
expectation that it'd turn up some time while Sarah was in hospital, or
shortly afterwards, and I could use the rest of the month that I was off
work to play with it. Well, I got an email on the 31st of December, telling
me they were out of stock, and unless I wanted to pay $29 more for one with
built-in WiFi, I'd have to wait until mid-January.
As I just couldn't see the point of having WiFi (or spending more money) and
not needing the thing in a hurry anyway, because I had more important things
to worry about in the meantime, I opted to wait. This morning, I emailed
them to enquire about whether or not more stock had arrived, and they
emailed back to say that they were still waiting, but they'd found one they
could sell to me anyway. The company happens to be close by in Menlo Park,
so I picked it up today in our travels.
Let me just say that it is a very cool little computer, just if you use it
for its intended purpose. It's running a customised Gentoo Linux, with a
2.6.22 kernel. I'm a bit surprised about their choice of Gentoo. I think
they'd be better off partnering with Canonical, given that Mark Shuttleworth
is trying to make a Linux distribution easy enough for his grandmother to
use. That'd take the work of engineering the operating system out of the
equation, then they could just focus on the hardware and a bit of
integration with Amazon's S3.
The thing I have to give them mad props for is documenting how to hack the
tripe out of the box. They tell you how to enable
root. They tell you how to enable PXE
booting. So once I figured out that the front USB port seems to get
treated slightly differently for a USB keyboard than the back ones, it was
very easy to PXE boot it and install Debian.
I initially started with trying to install Etch, but I kept getting missed
interrupts on the CompactFlash device, which resulted in the filesystems
panicking. So I gave up and went with Lenny, and presumably because it also
uses 2.6.22, everything seemed to go fine. The box comes with a 4Gb
CompactFlash card, which is ample for my needs. It's running the
686-optimised kernel, which is probably not ideal, but works. We'll see how
things go.
Interestingly, I blew another hard drive power supply, exactly
like last time. I've no idea if it's the act of plugging everything back
in again that's causing the problem, or they're generally flaky, and they
don't fail until they're powered off and back on again. Maybe that IEC
Y-cable wasn't such a good idea after all. I've now run out of spare power
supplies, so I'm going to have to get some more for when these two
inevitably fry themselves.
Overall, I'm very pleased with this purchase, but it's a bit early to see
how it's going to perform. I can't imagine it's going to perform
worse than the computer it's replacing, but it was probably never intended
for what I'm using it for either...
Oh, and I discovered vblade-persist, which seems to be a very nice
framework for managing ATA over Ethernet exports.
Now I just need to get my hands on a big tub of Lego to build a nice chassis
for the whole thing.
While Italian politicians are discussing the German model or the Spanish model, the French president is fucking an Italian model.
Erich Schubert's two
posts
about embedding spamtraps in web pages got me wondering about trying to
track the web crawlers that harvest such addresses.
If the pages that had the embedded spamtraps could be dynamically generated,
it'd be interesting to generate email addresses that encoded the time of the
crawl (well the page load I guess) and the IP address of the remote host.
I expect that most of the harvesting is done by botnets, so it possibly
wouldn't tell you a lot, but it'd be kind of cool to maintain a central
blacklist of known harvesting IP addresses, that sites like mailing list
archives could use to try and block the harvesters with.
I've spent the evening poking at the panel display that seemed to ship on some of the Philips Freevent desktops (some sort of abortive rebadging exercise). It's a TriGem part with a USB vendor ID of 0x0aa8 and product ID of 0xa001. It has four 7-segment numbers, a volume display and miscellaneous legend indicators. There's also some bizarre spinning circle thing that seems to be under programmatic control, but I haven't figured that bit out yet. It takes bulk writes of 16 bytes to endpoint 1, and the following format seems to be enough to drive the informational display.| Bytes 0-7 | Don't seem to do anything - perhaps on systems with more lights? | ||||||||
| Byte 8 | Bits 0-4: Volume lights 3-7 | ||||||||
| Byte 9 |
|
||||||||
| Bytes 10-13 |
|
||||||||
| Byte 14 | Doesn't seem to do anything | ||||||||
| Byte 15 | Must be 0x01 |
Hm, time for some nostalgia. The original Sim City game is now GPL'd under the new name Micropolis, and currently being packaged for Debian. There goes my 3.7 minutes of spare time per day...
If you're into such games, the Lincity clone has been around for some time now, too. And, as I found out yesterday, there's also Lincity-NG, which is a more recent clone with better (3D/isometric) graphics, sound, etc.
$ apt-get install lincity-ng(run it as lincity-ng --sdl if you don't have 3D-accelerated drivers) Have fun!
First I want to say shame on you for plain out laying. I had the laptop in service once, not twice. That was for the battery. The HDD is fine and I never had hardware issues with it. Now I am writing from that laptop, is that proof good enough for you?
I've been a bit behind with the ISC DHCP v3 package of late. I've had a
package of 3.1.0 for a few months, but I'm becoming more and more reluctant
to make uploads of this package without giving it some rudimentary testing.
Real life has been demanding of late, so I haven't had a chance to do that
testing. Nothing's gone wrong with the package to date, I just feel
negligent not giving it some basic testing before throwing it out there.
So I chucked a spare QFE card in my workstation brutus, put
unstable on the second hard drive, installed Debian unstable on the spare
10G partition of Sarah's old PowerBook, and lashed the two together with a
bit of CAT-5, and voila, instant DHCP client/server testbed.
So now that I'd verified that version 3.1.0 wasn't blatantly broken, I could
have a fiddle with the new support for option 119 (domain-search) that has
people at work very excited. I spent a bit of time off on a wild goose chase
trying to figure out how to configure the DHCP server for this new option
before I realised it was as simple as option domain-search "foo bar
baz"; and then made the necessary tweaks to dhclient-script.
I'm figuring that since one of the blokes who wrote the RFC works at Apple, and
since Leopard supports option 119, the way they're doing it in Leopard must
be approximately correct, so I've altered the behaviour of the DHCP client
accordingly.
All of this assumes you're not using resolvconf.
Prior to 3.1.0, if you had the domain-name option set, the
/etc/resolv.conf created by dhclient-script would set the
search directive to the domain name. With 3.1.0, I've decided to
make this set the domain option instead. The resolver behaviour
remains the same, as best as I can determine.
With 3.1.0, if the domain-search option is set, then the
search directive is set to this. If the domain-name option
is set, this is prepended to the list of domains in the
domain-search option. This is consistent with what MacOS X 10.5
(Leopard) does. I'm not sure what Windows does (nor what version started
honouring the domain-search DHCP option)), and since it doesn't
have an /etc/resolv.conf equivalent, it's a bit hard to test. I'm
going to hazard a guess and hope that since the other bloke who wrote the
RFC works for Microsoft, that maybe, just maybe, Windows and MacOS X at
least behave the same way.
Currently, if resolvconf is in use, you get the old
behaviour whereby the search directive is populated with the
contents of the domain-name option, and the domain-search
option is ignored completely. I've filed #460609 with a patch to fix this.
Interestingly, resolvconf itself internally collapses the domain
and search directives into the search directive of the
/etc/resolv.conf it generates, so I can't quite get the same
/etc/resolv.conf generated as would be generated without resolvconf
being used. No big deal, the behaviour should be the same. The
domain directive is largely unnecessary as I understand it.
I have unearthed what I consider to be a bug with the domain-search
option handling code in the client. It seems to be largely benign, apart
from causing the client to emit some errors when it's obtaining a lease that
contains the domain-search option, and possibly not splitting the
domains in the domain-search option correctly. There's also another
(I think unrelated) warning that gets emitted as well. I'm waiting to hear
back from upstream about both.
I'm not going to package the recently released 4.0 DHCP until I've figured
out a transition plan to go from the old DHCP v2 packages to the v3 ones.
Next.