2

I have a Linux system with kernels 3.10.17 and 4.8.4 installed, but only the older kernel can boot. Trying the newer one, "Gave up waiting for root device" occurs along with a bunch of "modprobe: Can't load module".

Since the root device in fact contains the modules, I am inclined to think the former causes the latter. Both GRUB Legacy menu.lst entries are identical, and blkid and /dev/disk-by-uuid/ confirm that they contain the correct UUID. Adding a rootdelay does not help (and is anyway not needed for the older kernel to boot).

The other common problem helpfully mentioned in the error text is missing modules. The location of usb-common.ko did change between these two kernels; but modinfo agrees that the usb-common module at the path given is for kernel 4.8.4. Also, if the disk is missing, how could the module format have even been assessed?

What's stopping the system from booting kernel 4.8.4?

Booting the kernel.
Loading, please wait...
modprobe: Can't load module usb_common (kernel/drivers/usb/common/usb-common.ko): invalid module format
Gave up waiting for root device.  Common problems:
- Boot args (cat /proc/cmdline)
 - Check rootdelay= (did the system wait long enough?)
 - Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/f0b6aabc-433a-46b6-9e03-1aba89384d48 does not exist. Dropping to a shell!
modprobe: Can't load module usb_common (kernel/drivers/usb/common/usb-common.ko): invalid module format
modprobe: module ehci-orion not found in modules.dep
modprobe: Can't load module usb_common (kernel/drivers/usb/common/usb-common.ko): invalid module format
...
  • I'm making a few assumptions about how you've configured your system. Have you compiled the 4.8 kernel yourself? The 'invalid module format' suggests the usb_common.ko has the wrong version magic (module is for another kernel version). – Eli Heady Feb 19 '17 at 10:16
  • @EliHeady, yes, I did compile it. modinfo reports that the module has vermagic: 4.8.4 SMP preempt mod_unload modversions, which seems all right. – Aaron Brick Feb 19 '17 at 20:28
  • I'd double check that the modules in your initramfs are for the correct kernel. Also ensure that the modules needed for your root disk are present. There are distro specific tools for managing the initramfs, I can offer more detail if needed. – Eli Heady Feb 20 '17 at 0:40
  • @EliHeady I appreciate the suggestion that the initramfs might be built wrong -- that is very possible. i built it with mkinitramfs. using the test modinfo $( lsinitramfs /boot/initrd.img-4.8.4 | grep \.ko$ ) | grep vermagic: i see every module has version 4.8.4. is that the check that you meant? – Aaron Brick Feb 20 '17 at 1:30
0

I upgraded GRUB, compiled the kernel again, rebuilt the initramfs, and it works. I don't know what the problem was, but a new kernel worked around it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.