Little T in the Cog linux

Archive for April 2011

Read the Instructions

2011-04-15

Just got completely schooled by a xen upgrade - the XEN kernel got upgraded from 2.6.26 to 2.6.32 on squeeze and the device naming changed in the process. When I first upgraded to squeeze I was still booting the guests using the old kernel, but decided the time had come to get them onto the latest and greatest.

So I shut down this web server guest, mounted the drive on the bare metal and copied the kernel module tree across, tweaked the guest XEN config to use the new kernel and initrd and fired it back up again only to discover that it couldn't find it's root disk and dropped me into a busybox shell. Sure enough a quick shufty through /dev/ revealed the lack of any sd devices. Was I missing a module in initrd? No, /proc/modules looked pretty much as I would expect. Five minutes of furious googling later and I had the answer - in kernel 2.6.32 (and presumably later kernels) the XEN guests get a new disk naming scheme - instead of (say) /dev/sda2 it is now /dev/xvda2. I tweaked the guest config again, changing all instances of sda to xvda and fired the guest up again, this time to be greeted with a login prompt.

That'll teach me to RTFM. Still, better to discover this now on my own rig than out on a customer site...