Bug 31285 - Kernel: upgrade does not properly install the new kernel, nor include it in grub
Summary: Kernel: upgrade does not properly install the new kernel, nor include it in grub
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-16 01:31 CET by Marc Krämer
Modified: 2022-12-20 19:14 CET (History)
1 user (show)

See Also:
Source RPM: kernel-6.0.13-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Marc Krämer 2022-12-16 01:31:59 CET
Just tried to update an existing mga8 installation to mga9.

The new kernel is downloaded and installed but not included in grub config.

And this will remove the newer kernel:
urpme --auto-orphans 
To satisfy dependencies, the following package will be removed (80MB):
  
(orphan package)
  kernel-desktop-6.0.13-1.mga9.x86_64
Remove 1 package? (y/N)

reinstall the kernel:
urpmi --replacepkgs kernel-desktop-6.0.13-1.mga9.x86_64


    https://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia/distrib/cauldron/x86_64/media/core/release/kernel-desktop-6.0.13-1.mga9.x86_64.rpm
installing kernel-desktop-6.0.13-1.mga9.x86_64.rpm from /var/cache/urpmi/rpms                                                                                          
Preparing...                     #####################################################################################################################################
      1/1: kernel-desktop        #####################################################################################################################################
You should restart your computer for kernel-desktop
[root@localhost marc]# urpme --auto-orphans 
To satisfy dependencies, the following package will be removed (80MB):
  
(orphan package)
  kernel-desktop-6.0.13-1.mga9.x86_64
Remove 1 package? (y/N)


Grub config is now updated but the new kernel 6 is not marked as default.
Comment 1 Lewis Smith 2022-12-16 20:42:10 CET
> The new kernel is downloaded and installed but not included in grub config
Does this mean simply that it is not present in the displayed Grub boot menu? One never knows what kernel the first default entry applies to, it being anonymous. Are there any other entries in the displayed menu? Please describe what it does show.

As for fixing things like this, from the booted system, try (I guess the command, I do not have Grub on the system I am using):
 # updategrub[2]

FWFIW, if you had rEFInd rather than Grub2, this problem would not have arisen. It offers to boot the kernels it finds.

CC: (none) => lewyssmith

Comment 2 Marc Krämer 2022-12-17 09:18:50 CET
It is grub2, and the new kernel is not installed. I guess some scripts did not run correctly. And the new installed kernel is not recognized as newer than the ones from mga8, so the orphan function thinks it can be reomved.
Comment 3 Barry Jackson 2022-12-17 12:09:56 CET
(In reply to Lewis Smith from comment #1)
> > The new kernel is downloaded and installed but not included in grub config
> Does this mean simply that it is not present in the displayed Grub boot
> menu? One never knows what kernel the first default entry applies to, it
> being anonymous. Are there any other entries in the displayed menu? Please
> describe what it does show.
> 
> As for fixing things like this, from the booted system, try (I guess the
> command, I do not have Grub on the system I am using):
>  # updategrub[2]
> 

The command is update-grub or update-grub2 which are the same, one being a link to the other. It asks for root password if run as a normal user.
This re-generates the grub2 menu and includes all the installed kernels that it finds.
 
> FWFIW, if you had rEFInd rather than Grub2, this problem would not have
> arisen. It offers to boot the kernels it finds.

As does grub2 when configured correctly. I don't think it is useful to keep pushing rEFInd which is not the default Mageia bootloader and will probably confuse users reading this.

CC: (none) => zen25000

Comment 4 Marc Krämer 2022-12-17 18:39:39 CET
I know how to fix this - but this is (or will be) an update issue from 8->9.
Grub2 is configured correctly and mga8 updates did as intended.
Comment 5 Lewis Smith 2022-12-17 22:19:26 CET
I had some ideas about what things to look for and note after the upgrade, and before doing anything at all. But refrain: you are wiser than me; and it is too late anyway.
This, however, is baffling:
(In reply to Marc Krämer from comment #0)
> Just tried to update an existing mga8 installation to mga9.
> The new kernel is downloaded and installed but not included in grub config.
(In reply to Marc Krämer from comment #2)
> It is grub2, and the new kernel is not installed.
I suspect that the latter is correct, because it being an orphan is very strange, and not included in Grub confirms.

This Cauldron system was a Mageia 8 upgrade, without the iffy kernel installation Marc describes. [And no Grub, so cannot comment].

(In reply to Barry Jackson from comment #3) - between friends.
> > FWFIW, if you had rEFInd rather than Grub2, this problem would not have
> > arisen. It offers to boot the kernels it finds.
> As does grub2 when configured correctly. I don't think it is useful to keep
> pushing rEFInd which is not the default Mageia bootloader and will probably
> confuse users reading this.
I happen to think it should be our standard bootloader for EFI boxes, except in rare cases where it is not appropriate. It is miles simpler than Grub: 'when configured correctly' does not come into it (yes, it has a static config file, but can get by without it). We have Grub-related bugs we could well do without.

Assigning as an Installer bug, assuming that includes upgrades.

Assignee: bugsquad => mageiatools
Summary: Kernel: upgrade does not include the kernel in grub => Kernel: upgrade does not properly install the new kernel, nor include it in grub
Component: RPM Packages => Installer

Comment 6 Marc Krämer 2022-12-20 14:31:03 CET
I find it strange, that the newer kernel is also shown as orphaned and urpme wants to remove a newer kernel.
Lewis Smith 2022-12-20 19:14:39 CET

CC: lewyssmith => (none)


Note You need to log in before you can comment on or make changes to this bug.