Your Linux Data Center Experts

I've just installed the CentOS 4 release candidate, it looks real nice. Part of what I am doing with that box is installing the Xen kernel. However, after installing that kernel and booting, it was failing to boot. It looks like the “mkinitrd” has problems, and that this may impact RHES as well.

On boot, with the new kernel, I was getting the following:

switchroot: mount failed 22
mount /initrd/dev failed: 2
Kernel panic - not syncing
Rebooting in N seconds

One thing is that I was using a KVM over IP, and the 5 seconds that it would display this message before rebooting was barely enough to see this message. I was also having problems with capturing the message using a screen capture, because it would cause a refresh of the window. In the end I used the movie mode on my camera, which I always carry with me, to capture the message on my screen.

Anyway, it seems the some systems have a problem with this. First, I found that the length of time this message is displayed can be increased by adding “panic=30” to the kernel boot line.

The problem can be resolved by creating the initrd using the same mechanism as the kernel packages. This can be found with “rpm -q –scripts kernel”, and is: “/sbin/new-kernel-pkg –package kernel –mkinitrd –depmod –install

After doing this, you may need to modify the grub.conf file, as the above will add the kernel to that file. It may be that if you omit one of the (undocumented) options above, this does not happen. After doing the above, though, my kernel booted with no problems.

comments powered by Disqus

Join our other satisfied clients. Contact us today.