Monthly Archives: March 2011

update-grub not working on your Debian Squeeze domU?

We‘ve been having a spot of bother with update-grub not working on our Debian Xen guests since upgrading them to squeeze.

The symptom: update-grub (as run after the installation of a new kernel package) fails because it’s ‘unable to find [a] GRUB drive for /dev/sda2 – check your’. This happens using both grub-legacy and the new grub-pc package.

You’ll probably have run into this if your guests were created using xen-tools.

Skipping over the related bugs, the long and short of it seems to be:

  • The way Xen pokes /dev/sda1 and /dev/sda2 (which are probably LVMs on your dom0) into your guests without a corresponding block device confuses grub
  • grub used to be dumb enough to ignore the mysterious presence of ‘partitions’ with no block device and carry on anyway
  • The versions in Debian Squeeze are just clever enough to be dangerous and fall over in this situation

Happily, we’ve worked out the fix. Grub is hard-coded to do the right thing in this situation if your disk devices are called ‘/dev/xvd[a-z]’, so you need to:

  1. Fix all references to ‘/dev/sda2’ to read ‘/dev/xvda’ (and /dev/sda1 to /dev/xvdb). In practice this means grub’s menu.lst and possibly your /etc/fstab if that isn’t by UUID
  2. Edit the /etc/xen/guest-name file on the dom0 to rename the partitions (change the ‘root’ specifier and the lines in the ‘disk’ list)
  3. Destroy (sudo xm destroy) your guest. Note that you must destroy and recreate it; rebooting won’t give Xen a chance to rename the devices.
  4. Bring it up again with xm create -c config-file
  5. Profit.

India diary, day 4

In June/July 2010 I spent ten days travelling in Rajasthan, India with friends; this is my diary of the trip (full list of entries here).

Today we left Jaipur to start on the second leg of our trip; unfortunately all of us are feeling a bit off, but that’s possibly unsurprising after all the rich food we’ve eaten over the last 48 hours coupled with the intense heat. Anyway, we’re OK to travel, and our car and driver to Jodhpur await!

A somewhat dull day in the car, trying not to let the sun dazzle us and stay out of the heat. Quick stop at the services, and into Jodhpur by 4pm. Much faffing before we found a hotel that wasn’t full – apparently some sort of conference is in town, and the guest-house we had in mind took one look at us and said ‘no foreigners’.

I considered asking K to ask the bloke ‘what makes you think my friends are foreign?’ but decided on balance we wouldn’t get away with that…

Finally secured a couple of nights in a decent-ish hotel for not too much; our driver is apparently perfectly happy to sleep in the car. A different world…

Dinner in the hotel and an early night under the best air conditioning we’ve had on the trip so far; turned firmly up to maximum and with ‘turbo mode’ on. Can’t help but reflect that having it on is pumping out CO2 which is likely to make the heat worse in the long term; but when the heat outside is bad enough to kill you if you’re used to colder climes, it’s not the time to entertain such thoughts.

India diary, day 3

In June/July 2010 I spent ten days travelling in Rajasthan, India with friends; this is my diary of the trip (full list of entries here).

Quite a day today!

First, we drove out (supposedly before the worst of the heat, but certain people didn’t get up early enough…) to see Jaipur’s fort.

Then, back to K’s grandparents’ place for a splendid lunch laid on by caterers for us and a large number of visiting members of his family including my first taste of an authentic Indian curry (chicken, obviously, not beef). Delicious!

After hiding from the heat with my book for the rest of the afternoon; as darkness fell we dressed up and ventured out for one of the highlights of the trip: the last night of a genuine Indian wedding (apparently they typically last several days!). Friends of K’s family were getting married in style with 300 guests, and we caught up with the wedding procession marching up Jaipur’s equivalent of the A34, much to the annoyance of passing traffic.

It had elephants, a man on stilts, a marching band, 300 dancing guests, a lot of electric lights, and a man throwing fireworks into the air overhead.

After going round the block a couple of times, the procession marched into the grounds of the hotel where the dinner was being held. As we gorged ourselves on a wide range of delicious Indian food, TV cameras whizzed overhead on wires, televising the whole thing to screens on stands around the place. I felt quite sorry for the bride and groom, sitting on the grand stage at the front, being congratulated by and photographed with all their guests in turn – no chance to get at all the food!

Returned to our hotel thoroughly full and with lots of happy memories of an amazing night.

When Sixxs met BytemarkDNS

Edit: Those of you coming across this post by googling for ‘Sixxs rDNS’ should note that Bytemark’s DNS service isn’t free unless you already have a server with them, but there are a number of free alternatives out there.

With IPv4 address space exhaustion practically upon us, I decided it was high time my house got IPv6. This is quite easy to do even if your ISP, like ours, doesn’t support it natively. Get a Sixxs tunnel, apply for a subnet, set up radvd on the Linux box behind your sofa (you do have one, right?) and there you are.

Even Windows XP can be trivially prodded into IPv6ing itself up, and my router seems not to mangle the radvd broadcasts so even wireless clients can have v6 if they support it.

What really impressed me, though, was what happened when I wanted to set up reverse DNS for my new Sixxs subnet. I’ve been assigned 2a01:348:1af::/48 and the Sixxs page tells you that you’ll need your own DNS server to host the necessary records. I don’t run my own DNS; I use Bytemark’s content DNS service.

I wasn’t expecting Bytemark to support adding rDNS records for random IPv6 /64s, however as it turns out, once you work out what the TinyDNS file needs to look like:

# IPv6 rDNS authority for Sixxs subnet 2a01:348:1af::/48

# Machines in the first /64 (home network)

… it Just Works:

$ host 2a01:348:1af::1 domain name pointer

Nice one, Bytemark!