Too Busy For Words - the PaulWay Blog

Thu 26th Feb, 2009

Error: insufficiently sincere headdesk

I discovered one of the servers that I manage had been placed in my hands with SELinux turned off. This, when SELinux is available, is a mistake, because if you ever need to turn SELinux on again you will find that nothing in the file system has the correct SELinux contexts, and everything will fail. Since this was a server that didn't have anything important running on it, I decided to reboot it with the /.autorelabel file in place and SELinux in permissive mode, thus re-establishing the permissions while the server wasn't heavily relied on.

After an hour with the server not appearing on the network, I started wondering what had happened. The console, it turns out, was displaying this message:

Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!

Googling mount error 6 showed mostly complaints of disk and file system drivers not being compiled correctly, but further up the page (fortunately still on screen) I could see that the correct modules were being loaded. Pulling out my trusty rescue CD, I did a file system check. All fine. I tried recompiling the initrd file. All fine. I looked at the LVM information. All fine. Something niggled at the back of my head. I looked at the /boot/grub/grub.conf file. Then I discovered my error.

Concurrent to this reboot, I had renamed the logical volumes from the unhelpful (e.g. "LogVol00") to the sensible (e.g. "root_lv"). This can be done while the system is live (I discovered) so long as you also edit the /etc/fstab file to rename any device names. However, I hadn't renamed the devices in the Grub configuration - I usually make sure that the volumes are labelled and use root=LABEL=/root in the kernel parameters to set where the root volume is. So the kernel was looking for a non-existent block device and failing with the unhelpfully-named "mount error 6".

After a brief bit of enthusiastic head slapping, I fixed the Grub configuration, rebooted and all was well. Hopefully the next time someone encounters this error, they'll find this information useful.

Last updated: | path: tech | permanent link to this entry

All posts licensed under the CC-BY-NC license. Author Paul Wayper.

Main index / tbfw/ - © 2004-2016 Paul Wayper
Valid HTML5 Valid CSS!