I was previously using Ubuntu 20.04 while booting using the kernel header 5.4.0-112 generic. Someone used my computer while I wasn't around, and now I don't see the option to boot using that kernel in the grub menu anymore.
I still see the kernel headers in /lib/modules though. I tried loading the module using the command
modprobe 5.4.0-112-generic
and I got a very interesting result. The result was
modprobe: FATAL: Module 5.4.0-112-generic not found in directory /lib/modules/5.4.0-131-generic
I found this interesting, because I don't think modprobe is supposed to search in the directory of the kernel currently in use?
The questions
- Is there some way that I can get the kernel recognized by grub again?
- Is there a way to specify where modprobe should look? I tried
modprobe -d /lib/modules 5.4.0-112-generic, and it returned modprobe: FATAL: Module 5.4.0-112-generic not found in directory /lib/modules/lib/modules/5.4.0-131-generic
- I think my objective is to load the header in /lib/modules, but modprobe says that it looks in /lib/modules/
uname -r by default. Is that a problem? Can I direct the command elsewhere so that grub can find it at boot time?