Here is another fun issue with linux that I had to deal with over the holidays. I figured since I was at my inlaws that I would do some updates on their various linux devices (firewalls mainly). I wanted to upgrade to 2.6.36-hardened-r6, but on reboot, I ran across a huge problem.
VFS: Cannot open root device "hda5" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tainted 2.6.36-hardened-r6 #1
Call Trace:
[<c126107d>] ? printk+0xf/0x12
[<c1260f79>] panic+0x5a/0x14f
[<c1361c93>] mount_block_root+0x1ef/0x1ff
[<c1091eb5>] ? sys_mknod+0x13/0x15
[<c1361d10>] mount_root+0x6d/0x75
[<c1361e20>] prepare_namespace+0x108/0x12f
[<c1361472>] kernel_init+0x17a/0x18e
[<c13612f8>] ? kernel_init+0x0/0x18e
[<c1002f56>] kernel_thread_helper+0x6/0x10
Here is another fun issue with linux that I had to deal with over the holidays. I figured since I was at my inlaws that I would do some updates on their various linux devices (firewalls mainly). I wanted to upgrade to 2.6.36-hardened-r6, but on reboot, I ran across a huge problem.
VFS: Cannot open root device "hda5" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tainted 2.6.36-hardened-r6 #1
Call Trace:
[<c126107d>] ? printk+0xf/0x12
[<c1260f79>] panic+0x5a/0x14f
[<c1361c93>] mount_block_root+0x1ef/0x1ff
[<c1091eb5>] ? sys_mknod+0x13/0x15
[<c1361d10>] mount_root+0x6d/0x75
[<c1361e20>] prepare_namespace+0x108/0x12f
[<c1361472>] kernel_init+0x17a/0x18e
[<c13612f8>] ? kernel_init+0x0/0x18e
[<c1002f56>] kernel_thread_helper+0x6/0x10
Okay.. this is weird. It’s acting like this could be an issue with kernel IDE support, udev or possible bad partition. I figured I’d roll back to the previously working kernel.. 2.6.28-hardened-r9.. but I was greeted with:
VFS: Cannot open root device "hda5" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tainted 2.6.28-hardened-r9 #1
Call Trace:
[<c126107d>] ? printk+0xf/0x12
[<c1260f79>] panic+0x5a/0x14f
[<c1361c93>] mount_block_root+0x1ef/0x1ff
[<c1091eb5>] ? sys_mknod+0x13/0x15
[<c1361d10>] mount_root+0x6d/0x75
[<c1361e20>] prepare_namespace+0x108/0x12f
[<c1361472>] kernel_init+0x17a/0x18e
[<c13612f8>] ? kernel_init+0x0/0x18e
[<c1002f56>] kernel_thread_helper+0x6/0x10
Okay.. starting panic.. thought I’d go WAY back to 2.6.28-hardened-r7, and this is what I got.. but at least I got a prompt to work with.
2.6.28-hardened-r7
* Checking root filesystem ...
bread: Cannot read the block (2): (Invalid argument).
reiserfs_open: bread failed reading block 2
bread: Cannot read the block (16): (Invalid argument).
reiserfs_open: bread failed reading block 16
reiserfs_open: the reiserfs superblock cannot be found on /dev/hda5.
Failed to open the filesystem
If the partition table has not been changed, and the partition is
valid and it really contains a reiserfs partition, then the
superblock is corrupted and you need to run this utility with
--rebuild-sb.
I was able to mount some of the hda devices after mknod (see “Nightmares with udev updates“), but it was still having problems mounting root. I’m starting to lean towards hda5 being bad.. and my udev is not making the nodes in /dev/
This is a older Pentium II machine, so I had to use a 2005.1 live CD to figure out what’s going on (after discovering that IDE cable was not seated for the CD ROM.. and after determining the CD drive was bad too.. yeah.. nightmare).
After getting into a LiveCD environment I was able to run fsck.reiserfs on all devices.. and they all came out with 0 corruption? WTF? I was able to mount the partitions and chroot there.. all good. I don’t get it. Now it HAS to be the kernel (and still possibly udev).
Looking on the forums, I came across this thread:
http://forums.gentoo.org/viewtopic-p-5926338.html#5926338
This thread mentions some important things. #1, that 2.6.30 does some dumb things with IDE.. like remove specific chipset support.. ahhhhhhh.
Looking at the config I noticed that IDE_SUPPORT was enabled. I ran a lspci in the chroot environment and saw that the controller chipset is PIIX.. AND it was NOT enabled in the kernel config. I rebuilt the kernel (along with a few other IDE (older support) as well).
I’m pretty much writing this down.. since there is another older box I’m responsible for, that I’ll probably have to deal with in the same manner.
I’m guessing, when I went WAY back.. that udev was the issue there. All sorts of dev issues, but the kernel recognized hda. The newer kernels had the new udev handling in there but without the proper IDE chipset support. What I don’t get… is how 2.6.28-hardened-r9 worked at all? This was running for a long time?