Installation of Kernel 5.14 doesn't create a grub menu entry

When I try to install linux514 it seems to fail when trying to update grub

both update-grub and grub-mkconfig -o /boot/grub/grub.cfg run without errors

After the install there is no kernel 5.14 in the grub menu

But it seems to be correctly installed

➜  ~ mhwd-kernel -li
Currently running: 5.13.19-2-MANJARO (linux513)
The following kernels are installed in your system:
   * linux513
   * linux514

Packages (1) linux514-5.14.9-1

Total Installed Size:  101.54 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                                                                                  [########################################################################################################################] 100%
(1/1) checking package integrity                                                                                                                                                                [########################################################################################################################] 100%
(1/1) loading package files                                                                                                                                                                     [########################################################################################################################] 100%
(1/1) checking for file conflicts                                                                                                                                                               [########################################################################################################################] 100%
(1/1) checking available disk space                                                                                                                                                             [########################################################################################################################] 100%
:: Running pre-transaction hooks...
(1/2) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
(2/2) Save Linux kernel modules
:: Processing package changes...
(1/1) reinstalling linux514                                                                                                                                                                     [########################################################################################################################] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux514.preset: 'default'
  -> -k /boot/vmlinuz-5.14-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.14-x86_64.img
==> Starting build: 5.14.9-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [plymouth]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.14-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux514.preset: 'fallback'
  -> -k /boot/vmlinuz-5.14-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.14-x86_64-fallback.img -S autodetect
==> Starting build: 5.14.9-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [plymouth]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.14-x86_64-fallback.img
==> Image generation successful
(4/5) Updating Grub-Bootmenu
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.14-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.14-x86_64.img
Found initrd fallback image: /boot/initramfs-5.14-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.13-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.13-x86_64.img
Found initrd fallback image: /boot/initramfs-5.13-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.
error: command failed to execute correctly
(5/5) Restore Linux kernel modules

==> Warning:
         -> This computer hasn't been restarted for a while.
         -> You are running an old kernel. In order to use a
         -> new version of the kernel, please restart your
         -> computer as soon as possible.

This is my grub config:

GRUB_DEFAULT="saved"
GRUB_TIMEOUT="5"
GRUB_TIMEOUT_STYLE="menu"
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 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

# 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

Have you rebooted?

How did you install the kernel?

kernel 5.13 ie EOL ( EndOfLife - no more support )
you need to keep 2 kernels , can you add this one

sudo mhwd-kernel -i linux510 

maybe you are rebooting on older snap ( before install linux5.14 )

Please fix your title: as your posted terminal output shows, linux514 installed just fine…

Same issue with linux515 (Branch = unstable). I tried using the graphical manjaro-settings, mhwd-kernel -i linux515, update-grub and every time, there is no error displayed. pacman -Qs linux[0-9] shows that the kernel is installed. However, the /boot/grub/grub.cfg remains untouched, but a new/modified version of /boot/grub/grub.cfg.new is present.
I can live with the current linux514, but there is definitively something wrong with the update mechanism.

edit: manually copying cp /boot/grub/grub.cfg.new /boot/grub/grub.cfg makes the newly installed kernel bootable. Last working mhwd-kernel update was ~24th of September…

1 Like

Did you at some point play with grub-customizer?

@omano : If you mean me (samuel): no, never. It’s a completely fresh install (~3 weeks old).

Is it possible, that the new coreutils (8.32 → 9.0) is causing this behaviour? The Arch guys switched to it on September 24th (History for trunk - archlinux/svntogit-packages · GitHub). This is no coincidence (I’m doing -Syuu on a daily basis).
:popcorn:

I’m trying a kernel install to see if I can reproduce the issue on my side.

//EDIT: my coreutils is at 8.32-1 on Testing branch (currently I think Stable branch is on par with Unstable branch, Testing branch for sure didn’t receive some updates that Stable seem to have)

//EDIT2: I could install and boot on another kernel installed through Manjaro Settings GUI.

//EDIT3: coreutils seems to be on par with Testing branch on Stable branch, only Unstable and Stable-staging have version 9 apparently Manjaro - Branch Compare so it seems unlikely that it is related to that package, as opening poster claims to be on Stable branch if we trust his profile.

Could you please check your coreutils version?

So I should open a new thread? (I bet a case of beer that in my case coreutils is the root issue :wink: )

I don’t know, I just updated my system (Testing branch caught up to Unstable), I checked, the coreutils package is at version 9 now, after reboot I installed Linux 5.15 and it didn’t create a grub.cfg.new, and it updated properly the grub.cfg so something else is probably creating your issue.

I want my beers now.

:beer:

//EDIT: and here you go, I found that by googling

The .new is created whenever you have a typo in any of the grub files used to create grub.cfg. I once forgot a closing } in 40_custom. It then showed error as last line which did not help much, but it may show error line. Also could be in /etc/default/grub, if line not correct.

oldfred - Nov 30 '19 at 17:34

Sorry for the late reply, answering several questions:
Yes, I rebooted, no kernel 5.14 in the grub menu
I’ve installed the kernel with paru, with pamac and also with the manjaro gui (same result for all)

My profile is misleading (it describes my desktop)
This issue concerns my laptop: a fresh install of manjaro gnome with btrfs and I switched to unstable branch

I did not play with grub-customizer (never had it installed)

➜  ~ paru -Qi coreutils                                                                                                                                                                                                                                                             
Name            : coreutils
Version         : 9.0-2

Just tried the copying, now it works

Did you read my previous post? If you talk about ‘the copying’, that means you have a grub.conf.new file, is that it?

Now I have :sweat_smile:
I’m not sure where the error in my grub file is but I will look again
Do you know if there is a tool that can check my file for correctness? (with useful error messages)

I don’t really know. But that seems to point to an issue somewhere in the various config files. It may be your fault, or maybe a package you installed, or is installed by default has an issue. On my side I have no issue, but I don’t have a default installation.

Maybe it is possible to try a grub update command, with more output to spot possible errors. I will try to check.

//EDIT: didn’t find a way to have more output from update-grub, but we can actually see the error in the output you already posted (when installing kernel it then generate the images, and then it updates GRUB try it sudo update-grub:

error: command failed to execute correctly

So there is an error somewhere in the configs/scripts used to generate the grub config.

Maybe in /etc/default/grub or /etc/grub.d/ or /boot/grub/custom.cfg (not sure about that one, it may be loaded on the fly instead of being used to generate the GRUB config) or somewhere else, hard to say.

I found my issue:
I had a faulty/unnecessary 41_snapshots-btrfs in my /etc/grub.d. Just deleted it (I’m using ext4). Googling the .new really helped :wink:
Thanks for the hints!
And here is the beer:
:beer: :beer: :beer:
:beer: :beer: :beer:

If you didn’t make it yourself, maybe you installed a package that created it, so the real fix is to find the package and remove it.

[omano@omano-nvme ~]$ pacman -F 41_snapshots-btrfs
community/grub-btrfs 4.9-1
    etc/grub.d/41_snapshots-btrfs

Did you install this package?