Cannot Switch to Most Recent Installed Kernel

Just like here I have the same problem: Cannot Switch to Most Recent Installed Kernel Via GRUB

I used the Manjaro settings and the terminal to install kernel 6.6.8-2 to replace my unsupported 6.2 somewhat.

However it still booted into the old kernel. So I used the terminal again and reinstalled + removed the kernel. After that the GRUB boot entry was still only 6.2 and failed, because it was removed. Lucky me the old 5.15 LTS is still installed and I could boot the device. I tried the same with kernel 6.5, but it looks like there is a bug with updating the GRUB entries so I can not boot the other installed kernels.

I wanted to check the GRUB entries, but even holding the SHIFT button doesn’t show up GRUB. I always just get to the decryption dialog.

Can you please show

mhwd-kernel -li
pacman -Q linux

This script should actually output a good amount of info about grub and old kernels etc

#!/usr/bin/env bash
# gcspt
# grub+ configuration search presentation tool
# <3 cscs <3

gcspt=$(find /boot -type f -name '*.cfg' 2>/dev/null | sort);
gscpt=$(find /etc/grub.d -type f ! -name 'README' 2>/dev/null | sort);
initz=$(find /boot -type f -name 'initramfs*' 2>/dev/null | sort); 
imgz=$(find /boot -type f -name 'vmlinuz*' 2>/dev/null | sort); 
modz=$(find /lib/modules -maxdepth 1 -type d 2>/dev/null | sort);
mkinitz=$(find /etc -type f -name 'mkinitcpio*' 2>/dev/null | sort); 
mkinitzd=$(find /etc/mkinitcpio.d -type f 2>/dev/null | sort);
dracutz=$(find /etc -type f -name 'dracut*' 2>/dev/null | sort); 
dracutzd=$(find /etc/dracut.conf.d -type f 2>/dev/null | sort);

_gcspt_format () {
    while read in; do ls -l --time-style=+'%F %R' "$in" | cut --complement -d ' ' -f1,2,3,4,5; done | column -t

#printf '\n...Bite-Sized Boot-Info...\n';

printf "\nCurrently Running Kernel:\n$(uname -s -r)\n";

printf '\nGrub Configuration Files:\n';

echo "$gcspt" | _gcspt_format;
echo "$gscpt" | _gcspt_format;

printf '\nInstalled Kernels:\n';

echo "$imgz" | _gcspt_format;

printf '\nInitramfs Images:\n'; 

echo "$initz" | _gcspt_format;

if which mkinitcpio >/dev/null 2>&1; then

printf '\nmkinitcpio:\n';

echo "$mkinitz" | _gcspt_format;
echo "$mkinitzd" | _gcspt_format;

if which dracut >/dev/null 2>&1; then

printf '\ndracut:\n';

echo "$dracutz" | _gcspt_format;
echo "$dracutzd" | _gcspt_format;


printf '\nModule Directories:\n'; 

for i in $modz; do du --time --time-style=+'%F %R' -sh $i; done | awk '{print $2,$3,$4,$1}' | column -t; 

printf '\nHibernation:\n';

grep -o 'resume=' /etc/default/grub || printf 'No "resume=" option found in /etc/default/grub\n';

printf '\nSettings of /etc/default/grub:\n';

awk 'NF && !/^ *#/ { print; }' /etc/default/grub;

printf "\n"

(save file as gcspt, mark executable with chmod +x gcspt, and run with ./gcspt

The following kernels are installed in your system:

linux515 5.15.145-1

Can you run the script as well?
It should output any kernel files actually in the filesystem.
(as well as some other things, including grub options like if it is ‘hidden’ or ‘menu’, etc)

Currently Running Kernel:
Linux 5.15.145-1-MANJARO

Grub Configuration Files:
2023-04-22 01:21 /boot/grub/grub.cfg
2022-06-24 21:55 /boot/grub/x86_64-efi/load.cfg
2023-12-22 15:12 /etc/grub.d/00_header
2023-12-22 15:12 /etc/grub.d/10_linux
2023-12-22 15:12 /etc/grub.d/20_linux_xen
2023-12-22 15:12 /etc/grub.d/25_bli
2023-12-22 15:12 /etc/grub.d/30_os-prober
2023-12-22 15:12 /etc/grub.d/30_uefi-firmware
2023-12-22 15:12 /etc/grub.d/40_custom
2023-12-22 15:12 /etc/grub.d/41_custom
2023-06-15 13:12 /etc/grub.d/41_snapshots-btrfs
2023-05-07 19:57 /etc/grub.d/60_memtest86+

Installed Kernels:
2024-01-03 21:17 /boot/vmlinuz-5.15-x86_64
2024-01-03 23:11 /boot/vmlinuz-6.5-x86_64
2024-01-03 23:49 /boot/vmlinuz-6.6-x86_64

Initramfs Images:
2024-01-03 21:17 /boot/initramfs-5.15-x86_64-fallback.img
2024-01-03 21:17 /boot/initramfs-5.15-x86_64.img
2024-01-03 23:12 /boot/initramfs-6.5-x86_64-fallback.img
2024-01-03 23:11 /boot/initramfs-6.5-x86_64.img
2024-01-03 23:50 /boot/initramfs-6.6-x86_64-fallback.img
2024-01-03 23:49 /boot/initramfs-6.6-x86_64.img

2022-06-24 21:55 /etc/mkinitcpio.conf
2023-12-18 20:52 /etc/mkinitcpio.conf.pacnew
2022-04-16 07:10 /etc/mkinitcpio.d/linux515.preset
2022-06-24 22:52 /etc/mkinitcpio.d/linux518.preset.pacsave
2022-10-31 18:10 /etc/mkinitcpio.d/linux60.preset
2023-04-22 01:20 /etc/mkinitcpio.d/linux62.preset.pacsave
2024-01-03 23:11 /etc/mkinitcpio.d/linux65.preset
2024-01-03 23:49 /etc/mkinitcpio.d/linux66.preset

Module Directories:
2024-01-03 23:49 /lib/modules 421M
2024-01-03 21:17 /lib/modules/5.15.145-1-MANJARO 120M
2024-01-03 23:11 /lib/modules/6.5.13-7-MANJARO 150M
2024-01-03 23:49 /lib/modules/6.6.8-2-MANJARO 152M
2024-01-03 21:15 /lib/modules/extramodules-5.15-MANJARO 8,0K
2024-01-03 23:11 /lib/modules/extramodules-6.5-MANJARO 8,0K
2024-01-03 23:49 /lib/modules/extramodules-6.6-MANJARO 8,0K

No “resume=” option found in /etc/default/grub

Settings of /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT=“quiet cryptdevice=UUID=680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83:luks-680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83 root=/dev/mapper/luks-680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83 udev.log_priority=3”
GRUB_PRELOAD_MODULES=“part_gpt part_msdos”

Ok, lets do a few things.

sudo mhwd-kernel -r linux65

That should be enough to remove 65, but its included in the next section just in case it was not.

sudo pacman -Rns $(pacman -Qsq linux65)
sudo pacman -Rns $(pacman -Qsq linux62)
sudo pacman -Rns $(pacman -Qsq linux60)
sudo pacman -Rns $(pacman -Qsq linux518)

If any of those dont work, thats fine … I just want to try to remove them.

sudo rm /etc/mkinitcpio.d/linux65.preset
sudo rm /etc/mkinitcpio.d/linux62.preset.pacsave
sudo rm /etc/mkinitcpio.d/linux60.preset
sudo rm /etc/mkinitcpio.d/linux518.preset.pacsave

Same thing - some of those may fail if the file was removed with the package, but we want to remove them if they are still there.

Next we will try to reinstall desirable kernels.

sudo mhwd-kernel -i linux515
sudo mhwd-kernel -i linux66

And in the case those did not work

sudo pacman -Syu linux66 linux515

Now lets edit grub so that it is not hidden.
You may use your preferred editor, here I use micro:

sudo micro /etc/default/grub

You want to edit the GRUB_TIME_STYLE option for menu, like so;


Save and close the file.

Here I should say something about pacnews as you seem to have some.

But I dont want to clutter this post and it has been outlined in other places, so a link for now.

You can print all of them with pacdiff -o

Now lets rebuild initramfs

sudo mkinitcpio -P
sudo update-grub

EDIT - update-grub may not be preinstalled. It can be installed first, or use instead

sudo grub-mkconfig -o /boot/grub/grub.cfg

I might also suggest the new utility to keep the installed bootloader updated;

sudo pacman -Syu install-grub

And run it

sudo install-grub

After a reboot you should see grub and your available kernels for selection. :crossed_fingers:

Wanted to see first the grub menu, but

sudo update-grub

Command not found.

It used to be included on all installs. I guess not anymore.
You can install it first;

sudo pacman -Syu update-grub

Or just use the equivalent;

sudo grub-mkconfig -o /boot/grub/grub.cfg

GRUB-Konfigurationsdatei wird erstellt …
Thema gefunden: /usr/share/grub/themes/manjaro/theme.txt
Linux-Abbild gefunden: /boot/vmlinuz-6.6-x86_64
Initrd-Abbild gefunden: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Linux-Abbild gefunden: /boot/vmlinuz-6.5-x86_64
Initrd-Abbild gefunden: /boot/intel-ucode.img /boot/initramfs-6.5-x86_64.img
Found initrd fallback image: /boot/initramfs-6.5-x86_64-fallback.img
Linux-Abbild gefunden: /boot/vmlinuz-5.15-x86_64
Initrd-Abbild gefunden: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warnung: Zur Erkennung anderer bootfähiger Partitionen wird os-prober ausgeführt.
Dessen Ausgabe wird zur Erkennung bootfähiger Programmdateien und Erzeugen neuer Boot-Einträge verwendet.
Bootmenü-Eintrag für UEFI-Firmware-Einstellungen wird hinzugefügt …
Root filesystem isn’t btrfs
If you think an error has occurred, please file a bug report at “GitHub - Antynea/grub-btrfs: Include btrfs snapshots at boot options. (Grub menu)
Found memtest86+ image: /boot/memtest86+/memtest.bin

This looks fine. I will reboot.

Extra note - this is probably because you have grub-btrfs installed.
If you dont intend to use btrfs then you can opt to replace this with regular grub.
( sudo pacman -Syu grub )

GRUB menu still doesn’t work. It doesn’t show up. However I could see an output this time:

Error. No such crypto disk found. Continue with pressing any key…

After a few seconds it continued to boot.

However now it uses the latest installed kernel 6.6.8-2, so the bug is that GRUB won’t be updated whenever I install a kernel.

Seems like its trying to boot an encrypted volume, but it does not exist.

What is the content of fstab

cat /etc/fstab

And crypttab I suppose if it exists

cat /etc/crypttab

Also next to



Ah, I missed this part

Are you using encryption?

That crypto error message is new with this kernel. The entire disk is encrypted.

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=6281-51F5                            /boot/efi      vfat    umask=0077 0 2
/dev/mapper/luks-680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83 /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
# /etc/crypttab: mappings for encrypted partitions.
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
# See crypttab(5) for the supported syntax.
# NOTE: You need not list your root (/) partition here, but it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
#       to encrypted swap, which should be set up with mkinitcpio-openswap
#       for resume support.
# <name>               <device>                         <password> <options>
luks-680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83 UUID=680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83     /crypto_keyfile.bin luks

No output… sudo makes the difference

/dev/nvme0n1p1: LABEL_FATBOOT="NO_LABEL" LABEL="NO_LABEL" UUID="6281-51F5" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="7b7e5c4c-b12e-3c4c-80f2-1bced7646a6a"
/dev/nvme0n1p2: UUID="680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83" TYPE="crypto_LUKS" PARTUUID="d63d5a1e-04ec-2c4a-ae85-29ff5f879fca"
/dev/mapper/luks-680a6aab-76df-4dc5-aa1d-6d6d0ce4ee83: LABEL="SYSTEM" UUID="7d2ecb57-b895-4578-bf65-abd3e5043e48" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda1: LABEL="DATA" UUID="2eb079c8-1f7c-43af-b840-9f424d21cff3" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9b44a4ea-01"

Is this a multiboot system ?

No. Post must be at least 6 characters