Thursday, January 31, 2008

Gutsy LDAP NSS and boot failures

So there are lots of bugs out there by disgruntled gutsy upgraders failing to boot their systems once the upgrade is complete. I was bitten by the same thing.

The upshot is that gutsy has done something with the boot order of services (especially udev it seems) which means there isn't a chicken, or an egg, to start the user DB, so the system just waits forever for nss resolution to work.

The solutions mentioned aren't quite right. The various mooted answers are as follows:
  1. Grep /etc/udev/rules.d/ for instances of GROUP= and ensure that all the groups mentioned are in the local /etc/group.
  2. Edit nsswitch.conf, putting [UNAVAIL=return] at the end of the ldap references.
However, these don't work for some reason.

There is one (fairly nasty) solution which does seem to work though, as follows:
  1. Copy /etc/nsswitch.conf to /etc/nsswitch.conf.ldap and /etc/nsswitch.conf.noldap.
  2. Edit the /etc/nsswitch.conf.noldap file to (you guessed it) not include ldap.
  3. Add the following at the end of start_slapd() in /etc/init.d/slapd:
    cp /etc/nsswitch.conf.ldap /etc/nsswitch.conf
  4. Add the following at the end of stop_slapd() in /etc/init.d/slapd:
    cp /etc/nsswitch.conf.noldap /etc/nsswitch.conf
  5. Create the file /etc/network/if-down.d/nsswitch-noldap:
    #!/bin/bash
    cp /etc/nsswitch.conf.noldap /etc/nsswitch.conf
  6. chmod +x /etc/network/if-down.d/nsswitch-noldap
Although on the face of it this is quite nasty, it does in fact mean that the system will keep working whether slapd is running or not, which to my mind is a good thing!

Blogged with Flock

Thursday, January 24, 2008

On a coach, at far too early in the morning

It's just past 5am, and I'm sitting on a coach on the way to Heathrow on the way to San Francisco - I'm awake, so I thought I'd write a blog entry - yawn.

I'm doing it in Flock's blog editor, which at first glance seems pretty nice; we'll see if it stands the test of time and me beating at it with a large stick (aka tables and other complicated HTML).

It's been a little while since I blogged last (as ever) and, as ever, a lot has happened. I'll try to attack it in order, but I expect I'll fail. Live with it.

Firstly, I realise I never mentioned our trip to Wicked in December in my previous post. Hmm - not really impressed. Visually it was amazing, the story was well written and good fun, the music however was uninspiring (read generic and nothing inventive / new) and the sound was positively awful - you shouldn't be straining to hear the words, even if we were up in the upper circle. I think part of this was due to insufficient delay speakers, but most seemed to be just bad mixing. Hrm. Ah well.

Hazel and I had a fun long weekend up in the Peak District with Rocky (Hazel's Cocker Spaniel) - a lovely cottage owned by a really nice couple right in the middle of Bakewell. It was a bit damp, as you can see from the picture but we had a good time. Without dog we probably would have found it easier to do more walking but still - another time!

New Years was fun - we went to 206 after having Tamsin and Ian over for dinner, and (as it turned out) rather too much G&T - sorry Tamsin :) Was a fun evening, but Hazel was out of sorts, and I didn't really feel like staying much after midnight either so was fairly short. Had a good game of Mao, and fun with Ian's comedy ice-cube curling.

Where are we now? Baldock. Ah right, good. Where was I?

Blog. right - have I got to January yet? Oh yes... Well, Pirates. I've been busy. I'm TDing Pirates of Penzance for The Cambridge G&S Society at the Cambridge Arts Theatre, which should be a really good show with a great cast and a fantastic design team - yey!

Hmm, the gate has just opened (I'm in the airport now if you didn't guess) - I suppose I ought to wander in that direction... More later.

Blogged with Flock

Saturday, January 05, 2008

Linux does just work out-of-the-box

I'm impressed - Mum has been using a linux-based laptop I provided for a while now, and I've just bought her a new scanner (Canon CanoScan LiDE25) - It just works, plug it in, ensure you enable scanner access in System->Administration->Users and Groups, and run XSane - marvellous - now to train mum on how to use SANEs rather over-specced interface... Hmm.

Also, I plugged my ipod into said laptop to charge it, and Rhythmbox opened up and displayed it immediately. Not only that but I could navigate the music in it, and even play it from the PC - something that iTunes can't do... Nice!

Back to doing ABN database migrations

Friday, January 04, 2008

Long time no blog, golden compasses, techie stuff, Christmas, etc...

Well, it has been a long time. Largely 'cos I've been:
  1. Ill
  2. Reconstructing / sorting / working out my PC and storage solutions both in the office and at home
  3. Spending far too much time watching Stargate...

Ah well - in order. Illness :( I came down with a nasty head cold / fluey thing the week before last, which hit me quite hard - I took two days off work and stayed in bed most of those days (although did do bits 'n' pieces of work here and there).
That's that. I'm over the worst of it now, so catching up on all the hierarchy work I haven't been doing - argh. Other than that I setup a virtual machine with a friend (www.loho.co.uk) in order to move the emails and websites that I'm hosting on a couple of machines in the office and free up both machines, noise, and hard drive space. This setup was very successful - upgraded & moved http://gallery.shippen.org.uk/, my site and the Campus one (my main web 'customer') - Campus, JK's email (the most critical of the services I host), and my email. This involved an exciting trip to Loho's DC in Canary Wharf to take a look at their services - quite fun, if you like being deafened by aircon and large racks...

This jaunt to the DC and conversations about virtual private hosting led me to think about offsite backups for Spiralinks, and what to do about this obvious hole in our setup. In the end we decided to purchase a large shiny 8-drive NAS box for Alex and I to configure as offsite backup (Loho using 1/2 of it as a main NAS for his VPS). This should work really well & takes the load off my hands for network backups. The NAS has arrived, Loho have installed it, and drafted a backup solution (which is very nice - yey!)... but, annoyingly, the drive that was posted before Christmas still hasn't arrived - grr...

I've also been consolidating the machines I use in the office as well - Albatross, which used to be my main linux workhorse has kinda fell to the wayside since I've started using my tablet as my primary PC. So, I decided to install it as a virtual machine server (using Xen thanks to Alex's influence...) for windows and linux virtuals (such as ACT, which still refuses to work on my laptop). I had a mare of a time getting the hardware to work (dodgy IDE controller, dodgy drive, dodgy USB devices, you name it!) but it's finally up and running and copes with VMs remarkably well. I've got a Windows XP image sysprepped so I don't need to go through the 100 or so updates any more! Just waiting for gnome to compile (will take about a day) before the machine itself has a usable interface... Since I wrote that bit, I've actually been using it as my main development PC in the office as well - and now I have accelerated graphics working it's really quite nice and quickly.

All this hassle means that I end up with about 1 TB of spare disk space - most of which is now sitting in the media centre at home for TV recording niceness - yey! It's nearly all working as a mythtv setup :)

We went to see 'The Golden Compass' a while ago - we were both pleasantly surprised in fact. I'd just read the book (The Northern Lights is its UK name) by Philip Pullman. We were impressed by how true to the book the film actually way - the characterisation was brilliant - there were clearly a number of simplifications, but not so many as to lose the book entirely - very good.

Christmas happened - was a nice family occasion in Horsham - I ended up cooking, and (if I may say so myself) it went fairly well - lots of lovely meat (Turkey, Beef and Ham !) and of course good company - not even too many arguments for once!

Boxing day I did yet more cooking for a few people left in Cambridge over Christmas. I had got some venison and pheasant from the butcher's in Horsham and cooked 'Vension Steaks and Pheasent Breast on a bed of spinach cream potato with mushroom and a redcurrant sauce.' - it actually worked, which was good, although the Venison was a little overcooked. I'll try again as there's lots of Venison left in the freezer...

Am tired so will sign off now - more later as I haven't even got to the end of December yet!