Posts Tagged ubuntu

Trouble with apt-get and Squid

I recently started having trouble with APT transactions on my Kubuntu desktop. “apt-get update” would fail for some source entries with the error “The HTTP server sent an invalid reply header”. I thought it was something specific to (K)Ubuntu, but when I had the exact problem on my NSLU2 running Debian I figured the problem must be elsewhere…

I’d recently updated the machine that provides the transparent web proxy function for the network; one of the updates took Squid up to version 3.0 (from 2.6). This was the first thing I was suspicious of.

There’s an option in Squid that controls how it handles an “If-Modified-Since” request from a client. The default is for Squid to respond based on the age of the item in the cache, not based on the real item on the source web page. The comments in the Squid config file indicate that some clients use an IMS when requesting a reload — looks like APT is one of those clients.

Setting this option to “on” (from the default of “off”) in squid.conf fixed the issue for me:

refresh_all_ims on

Tags: , , ,

Ubuntu 8.04 Wireless Weirdness

Over the last fortnight I finally got the wriggle-on to upgrade all my (K)Ubuntu systems to Hardy Heron. Various issues occurred with each of them, but overall the entire exercise went smoothly (my wife’s little old Fujitsu Lifebook was probably smoothest of the lot). I had one rather vexing issue however, on my old (I’m tempted to say “ancient”) Vaio laptop.

The onboard wireless on this thing is an ipw2100, hence only 802.11b, and I had a PCMCIA 802.11g NIC lying around (actually it came from the Lifebook, liberated from there after I bought it a Mini-PCI 802.11g card on eBay). On Gutsy, I used the hardware kill-switch to disable the onboard adapter to make double-sure that it wouldn’t try and drag the network down to 11Mbps.

This laptop was the last machine I upgraded to Hardy, and I was playing with KDE 4 on it so I was looking forward to seeing what KDE4-ness made it into Hardy. While the upgrade was taking place the wi-fi connection dropped out, but I didn’t think anything of it since Ubuntu upgrades try and restart the new versions of things and I figured NetworkManager had fallen and couldn’t get up. After the reboot, however, KNetworkManager (still the KDE3 version, don’t get me started there) could find no networks — could find no adapters, in fact.

I logged back into KDE3 and poked. Still no wireless (as if the desktop would make a difference, but I had to make *some* start on pruning the fault tree). The Hardware Drivers Manager was reporting that the Atheros driver was active (for the PCMCIA card), and an unplug-plug cycle generated all kinds of good kernel messages.

On a whim, I flicked the hardware kill-switch for the onboard wifi[1]. Almost instantly, KNetworkManager prompted to get my wallet unlocked — it had found my network and wanted the WPA passphrase. I provided it, and got a connection: via the PCMCIA NIC.

“That’s odd”, I thought, and flicked the switch. A few seconds passed, and the link dropped. Flicked the switch on, link came back. Flicked the switch off again: this time a few minutes went past, but again the link failed. Tried it several times again, and the same thing happened. The state of the kill-switch for the onboard NIC was influencing the other NIC too!

It seems that this is altered behaviour in NetworkManager, applying the state of the hardware switch to all wi-fi adapters. If it annoys me significantly I’d like to think I’ll trawl changelogs, or even better lodge something on Launchpad… more likely though I’ll forget all about it having found a kludgy workaround.

I’ve now added ipw2100 to the module blacklist and things work okay (presumably because the state of the onboard switch can’t be reported any more). I’ll also have a think about whether a few dollars for another g-capable Mini-PCI NIC will be throwing good money after bad, as this laptop really is quite long-in-the-tooth.

Oh yes, that’s right… KDE 4. Next time perhaps. 🙂

[1] I can’t think why I did this. I knew that I’d disabled 802.11b in my access point, to make triple-sure an 802.11b device wouldn’t slow my network down… The onboard 802.11b NIC would never successfully get a connection.

Tags: , ,

Edgy comes to visit

For ages I’ve toyed with running Linux on the ex-lease Sony Vaio I’ve got.  When I first picked it up, Centrino was a dirty word as far as Linux was concerned, so it’s been a Windows box all along.  But now that the lease is over and it’s all mine, I decided to take the plunge.

The announcement of Ubuntu 6.10 (Edgy Eft) gave me an additional prod.  I had a DVD of Ubuntu 6.06 LTS (Dapper Drake) that I figured I could install and upgrade to Edgy, and that process went alarmingly well.  Even installing kubuntu-desktop was painless.  It looks like a really well-integrated distro with just the right amount of knobs and dials to keep me running.

Or so I thought, until it came time to get wireless working.  I run WPA, and the network config tools in Dapper don’t grok it.  I figured that Edgy would be an improvement, but alas not.  I’ve tried just about every network config tool available, in both GNOME and KDE, with no luck.

About the closest I’ve managed to get was using kwlan, but it seemed to get confused in trying to save the configuration and activate the link.  Start wpa_supplicant prior to configure, and things seem to save but nothing activates.  With wpa_supplicant stopped, I cannot save a profile.

I’ve seen forum notes that recommend downloading and building CVS versions of NetworkManager and wpa_supplicant — seems to go against the Ubuntu ethos a bit in my mind (if I’ve got to build stuff from source, I might as well be running Gentoo on it).

So I’m wired, but not for sound.  I like (K)Ubuntu though, so much so I’m downloading a Xubuntu install CD to try it out on a low-spec laptop I am trying to make use of.  Time will tell if the Edgy Eft is just visiting or gets to say a while. 🙂