kernel upgrade: CONFIG_SCSI_VIRTIO was somehow disabled
I did a routine upgrade of a Gentoo VM this morning, which included a kernel update. Should be no big deal: copy the old config into the new kernel source, genkernel --oldconfig all
, grub-mkconfig >/boot/grub/grub.cfg
, and reboot…done it plenty of times before.
This time, somehow, CONFIG_SCSI_VIRTIO got disabled. This meant that the root disk was not available, so the VM won't boot. Grr. Furthermore, I had deleted the old kernel before rebooting, not after as I usually do. I don't think I'll do that again. :-|
I'm using gentoo-sources, and had upgraded from 5.15.16 to 5.15.19. I did the same upgrade on my home workstation yesterday, and while it's running on bare metal, CONFIG_SCSI_VIRTIO was still set to build as a module. Why would it have switched off here?
The VM is currently rescue-booted, and I'm rebuilding the kernel again after flipping CONFIG_SCSI_VIRTIO from "no" to "yes."
1 Reply
Changes to your disk would not have been made by Linode, however you may not have had the kernel you expected running at the time you reconfigured your build. i.e. If genkernel is pulling config from a running kernel, it may not have been able to get at the virtual filesystem entries containing the running kernel's configuration options and fell back on some other defaults. (i.e. /proc/config.gz)
What kernel selection do you have in your Linode's configuration profile? Has it changed recently?
You may be able to check your Linode's Activity Feed to see what kernel was previously booted.
Method | Kernel | Description |
---|---|---|
Direct Disk | Not Linode Supplied Kernel | Uses your own boot loader to load your own kernel. |
GRUB (Legacy) | Not Linode Supplied Kernel | Uses GRUB Config on your Disk to load a Kernel on Your Disk |
GRUB 2 | Uses Distro Supplied Kernel or Custom Kernel from primary disk | Uses Linode Supplied RAM Disk with GRUB 2 to use GRUB Config on disk. Can use Distro Supplied Kernel or Custom Kernel depending on your GRUB Config |
Latest 64/32 Bit | Linode Supplied Kernel (Not on disk) |
Won't be using a kernel from disk Should definitely have VirtIO drivers |
Specific Linode Kernel | Linode Supplied Kernel (Not on disk) |
Won't be using a kernel from disk Should definitely have VirtIO drivers |
https://www.linode.com/docs/guides/managing-the-kernel-on-a-linode/
https://www.linode.com/docs/guides/linode-configuration-profiles/
From https://wiki.gentoo.org/wiki/Genkernel:
Note
It is a common misconception that genkernel will "automatically" generate a custom kernel configuration. genkernel automates the kernel build process and assembles the initramfs, but does not generate a custom kernel configuration file. If a kernel configuration is not provided, genkernel will use a generic kernel configuration file which will produce a general purpose kernel suitable for daily usage (at the expense of a large modular kernel).Same is true for genkernel's initramfs: Its primary job is to bring up only the basic stuff needed to mount a (block) device containing the root filesystem so that it can hand off control to real system as soon as possible.
It is not genkernel's goal to load all available modules, to start all available devices, to unlock additional volumes, to start network or do other fancy stuff. So don't forget to set up normal boot services so that the real system can finish boot and do all of the things mentioned above.