Bootloader does not recognize current kernel

A few days ago i installed linux 5.19 but my system still booted into 5.18 and it remained the only option in the bootloader. After deleting it ( foolish, i know ) the bootloader detects no kernel and i have to manually tell grub to use the current one by rewriting 5.18 into 5.19 every time i boot my system

I already tried grub-update before and after deleting the old kernel to no effect

How did you install it?

How did you delete it? Btw, grub-update doesn’t exist.

Post output of:

pacman -S linux519 linux519-headers

Hi @GunpowderGuy,

That was indeed foolish, but at least you can still enter your system. Please provide the output of:

cat /etc/default/grub

@zbe i install and delete kernels via settings manager in kde
i meant to write update grub, not grub update

warning: linux519-5.19.1-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) pahole-1.23-1  linux519-5.19.1-2  linux519-headers-5.19.1-2

Total Download Size:    33.21 MiB
Total Installed Size:  277.66 MiB
Net Upgrade Size:      141.75 MiB

:: Proceed with installation? [Y/n]
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
#GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

Tip:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

pasted text

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

Please edit your post accordingly.

1 Like

It might help to reinstall the kernel(s):

mhwd-kernel --install linux519

And

mhwd-kernel --listinstalled

Will show you which are installed.

Edit:

If you wish to see and select other kernels for booting, you must select them from the Advanced… menu, they don’t appear in the normal menu.

   ~  sudo mhwd-kernel --install linux519                                                                                                                                                                                                                                                                       

 1 ✘ 
[sudo] password for diegor: 
Error: You can't reinstall your current kernel. Please use 'pacman -Syu' instead to update.
    ~  mhwd-kernel --listinstalled                                                                                                                                                                                                                                                                                1 ✘ 
Currently running: 5.19.1-3-MANJARO (linux519)
The following kernels are installed in your system:
   * linux519
   * linux519-rt
    ~        

I don’t know why it says that because you should get a polkit prompt to ask for the password.

Anyway, reinstall 5.18 the same way:

mhwd-kernel --install linux518

Then check in GRUB. If necessary using the tip I provided earlier.

you mean checking the advanced menu? my current kernel doesnt appear there either only 5.18 despite no longer being installed

Please provide the output of:

mhwd-kernel --listinstalled
Currently running: 5.19.1-3-MANJARO (linux519)
The following kernels are installed in your system:
   * linux519
   * linux519-rt

post output from this also:

ls /etc/mkinitcpio.d/*.preset
sudo ls /boot/initramfs-*
sudo ls /boot/vmlinuz-*
sudo ls /usr/lib/modules/*
pacman -Qs linux5
/etc/mkinitcpio.d/linux519.preset  /etc/mkinitcpio.d/linux519-rt.preset
[sudo] password for diegor: 
/boot/initramfs-5.19-rt-x86_64-fallback.img  /boot/initramfs-5.19-rt-x86_64.img  /boot/initramfs-5.19-x86_64-fallback.img  /boot/initramfs-5.19-x86_64.img
/boot/vmlinuz-5.19-rt-x86_64  /boot/vmlinuz-5.19-x86_64
/usr/lib/modules/5.19.0-1-rt10-MANJARO:
extramodules  kernel  kernelbase  modules.alias  modules.alias.bin  modules.builtin  modules.builtin.alias.bin  modules.builtin.bin  modules.builtin.modinfo  modules.dep  modules.dep.bin  modules.devname  modules.order  modules.softdep  modules.symbols  modules.symbols.bin  pkgbase  vmlinuz

/usr/lib/modules/5.19.1-3-MANJARO:
build  extramodules  kernel  kernelbase  modules.alias  modules.alias.bin  modules.builtin  modules.builtin.alias.bin  modules.builtin.bin  modules.builtin.modinfo  modules.dep  modules.dep.bin  modules.devname  modules.order  modules.softdep  modules.symbols  modules.symbols.bin  pkgbase  vmlinuz

/usr/lib/modules/extramodules-5.19-MANJARO:
version

/usr/lib/modules/extramodules-5.19-rt-MANJARO:
version
local/linux519 5.19.1-3
    The Linux519 kernel and modules
local/linux519-headers 5.19.1-3
    Header files and scripts for building modules for Linux519 kernel
local/linux519-rt 5.19.0_rt10-1
    The Linux519-rt kernel and modules

output if you run?
sudo mhwd-kernel -r linux518

Error: Kernel not installed.
Currently running: 5.19.1-3-MANJARO (linux519)
The following kernels are installed in your system:
   * linux519
   * linux519-rt

post output from these:
sudo mkinitcpio -P
sudo update-grub

==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'default'
 -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64.img
==> Starting build: 5.19.1-3-MANJARO
 -> Running build hook: [base]
 -> Running build hook: [udev]
 -> Running build hook: [autodetect]
 -> Running build hook: [modconf]
 -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
 -> Running build hook: [keyboard]
 -> Running build hook: [keymap]
 -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 -> Running build hook: [filesystems]
 -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.19-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'fallback'
 -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64-fallback.img -S autodetect
==> Starting build: 5.19.1-3-MANJARO
 -> Running build hook: [base]
 -> Running build hook: [udev]
 -> Running build hook: [modconf]
 -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: xhci_pci
 -> Running build hook: [keyboard]
 -> Running build hook: [keymap]
 -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 -> Running build hook: [filesystems]
 -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.19-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux519-rt.preset: 'default'
 -> -k /boot/vmlinuz-5.19-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-rt-x86_64.img
==> Starting build: 5.19.0-1-rt10-MANJARO
 -> Running build hook: [base]
 -> Running build hook: [udev]
 -> Running build hook: [autodetect]
 -> Running build hook: [modconf]
 -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
 -> Running build hook: [keyboard]
 -> Running build hook: [keymap]
 -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 -> Running build hook: [filesystems]
 -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.19-rt-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux519-rt.preset: 'fallback'
 -> -k /boot/vmlinuz-5.19-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-rt-x86_64-fallback.img -S autodetect
==> Starting build: 5.19.0-1-rt10-MANJARO
 -> Running build hook: [base]
 -> Running build hook: [udev]
 -> Running build hook: [modconf]
 -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: xhci_pci
 -> Running build hook: [keyboard]
 -> Running build hook: [keymap]
 -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 -> Running build hook: [filesystems]
 -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.19-rt-x86_64-fallback.img
==> Image generation successful
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.19-x86_64.img
/usr/bin/grub-probe: error: unknown filesystem.
Found initrd fallback image: /boot/initramfs-5.19-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.19-rt-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.19-rt-x86_64.img
Found initrd fallback image: /boot/initramfs-5.19-rt-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...

looks good …
open this file:
/boot/grub/grub.cfg
and search for this:
Kernel: 5.
what kernels are detected?

i get
sudo: /boot/grub/grub.cfg: command not found