UPDATE: After many false starts, it turned out that the line in /etc/fstab that loads /boot to the correct partition had been commented out. After uncommenting that, I could load new kernels normally with apt, and the computer boots normally now.
My Ubuntu machine (20.04) is booting into a much older kernel version and is ignoring several newer kernels. The GRUB menu only shows kernel entries that are prior to the one that is being loaded, so I don't have the option to switch. Any suggestions appreciated.
The kernel being loaded is 5.4.0-80-generic.
When I run sudo grub-mkconfig | grep menuentry | grep generic it shows several more recent kernels:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-92-generic
Found initrd image: /boot/initrd.img-5.4.0-92-generic
Found linux image: /boot/vmlinuz-5.4.0-91-generic
Found initrd image: /boot/initrd.img-5.4.0-91-generic
Found linux image: /boot/vmlinuz-5.4.0-90-generic
Found initrd image: /boot/initrd.img-5.4.0-90-generic
Found linux image: /boot/vmlinuz-5.4.0-89-generic
Found initrd image: /boot/initrd.img-5.4.0-89-generic
Found linux image: /boot/vmlinuz-5.4.0-88-generic
Found initrd image: /boot/initrd.img-5.4.0-88-generic
Found linux image: /boot/vmlinuz-5.4.0-81-generic
Found initrd image: /boot/initrd.img-5.4.0-81-generic
Adding boot menu entry for UEFI Firmware Settings
done
menuentry 'Ubuntu, with Linux 5.4.0-92-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-92-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-92-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-92-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-91-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-91-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-91-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-91-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-90-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-90-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-90-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-90-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-89-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-89-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-89-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-89-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-88-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-88-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-88-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-88-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-81-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-81-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
menuentry 'Ubuntu, with Linux 5.4.0-81-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-81-generic-recovery-fe6a612c-184d-443a-a4b3-3254e11ff7eb' {
Updating etc/default/grub with GRUB_DEFAULT="gnulinux-5.4.0-92-generic-advanced-fe6a612c-184d-443a-a4b3-3254e11ff7eb" and then running sudo update-grub does nothing--it still boots into the old kernel and only shows old kernel options.
It's as if my GRUB options have been frozen. A couple of months ago I had a problem where some software update made the computer fail to boot. I had to boot via USB and then log in remotely to update the kernel (to the currently loading version). It's possible that I made a mistake when doing this, but I have no idea what.