Bug 31621 - Mageia 8 to 9b1 Upgrade Issue:mageia 8 kernel not uninstalled and booted by default
Summary: Mageia 8 to 9b1 Upgrade Issue:mageia 8 kernel not uninstalled and booted by d...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: IN_ERRATA9
Depends on:
Blocks:
 
Reported: 2023-03-03 01:00 CET by katnatek
Modified: 2023-05-24 03:24 CEST (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
inxi -f output (1.70 KB, text/plain)
2023-03-03 01:04 CET, katnatek
Details
Boot screen picture (996.49 KB, image/jpeg)
2023-03-03 01:10 CET, katnatek
Details
Log screen (Ctrl+Alt+F12) capture (914.91 KB, image/jpeg)
2023-03-03 01:12 CET, katnatek
Details
Evidence in terminal of running Mageia 8 kernel (473.94 KB, image/png)
2023-03-03 01:14 CET, katnatek
Details
Information of my laptop (2.04 KB, text/plain)
2023-03-03 23:36 CET, katnatek
Details
Capture of relevant kernel information in my laptop (164.99 KB, image/png)
2023-03-03 23:37 CET, katnatek
Details
Desktop logs and other files in /root/drakx (500.51 KB, application/x-bzip)
2023-03-20 17:04 CET, katnatek
Details
report.bug.xz from my desktop system (357.32 KB, application/x-xz)
2023-03-20 17:05 CET, katnatek
Details

Description katnatek 2023-03-03 01:00:59 CET
Description of problem:

I just upgrade my Mageia 8 to 9b1 from the Classic X64 Installer, and after reboot the boot process take an insane amount of time.

I must suspect the cause when my plymouth theme was showed instead the Mageia's default.

I see in the logs a dkms module be rebuild for the mageia 8 kernel, that was weird,
BTW after 30 min the boot process freeze and reboot, i choose reupdate and uncheck the dkms autorebuild service.

So after reboot and this time got the dm screen, i start graphic session and uname -a confirms what at this instance already suspect, i was still running Mageia 8 kernel, so i reboot again and choose advanced options in grub and be sire of select the Mageia 9 kernel. 

Version-Release number of selected component (if applicable):


How reproducible:
Not sure if reproducible until I try to upgrade my other Mageia 8 system
Comment 1 katnatek 2023-03-03 01:04:37 CET
Created attachment 13721 [details]
inxi -f output
Comment 2 katnatek 2023-03-03 01:10:39 CET
Created attachment 13722 [details]
Boot screen picture
Comment 3 katnatek 2023-03-03 01:12:47 CET
Created attachment 13723 [details]
Log screen (Ctrl+Alt+F12) capture
Comment 4 katnatek 2023-03-03 01:14:43 CET
Created attachment 13724 [details]
Evidence in terminal of running Mageia 8 kernel
Comment 5 Lewis Smith 2023-03-03 19:54:01 CET
Thank you for this report, and that you have tried various things to overcome the problem.
It looks as if the vital points were:
- i choose reupdate and uncheck the dkms autorebuild service.
So after reboot and this time got the dm screen
- i reboot again and choose advanced options in grub and be sure of select the Mageia 9 kernel [and the upgraded system then works]

"Not sure if reproducible until I try to upgrade my other Mageia 8 system"
I would not do this yet!

Assigning to mageiatools for the upgrade kernel issues, CC'ing tmb.

Source RPM: kernel => (none)
CC: (none) => kernel
Assignee: bugsquad => mageiatools

Comment 6 katnatek 2023-03-03 23:33:48 CET
Well not sure if is exactly a reproduction but in my laptop after a
not totally finished upgrade with the Classical Install ISO i586
The kernel i got at reboot is the Mageia 8, this time i have to do a few more work to get the mageia 9 kernel to boot, due the issue that i'll report the grub configuration was not updated and still was mageia 8 one, but after run the MCC tool to change the grub configuration i can say that mageia 9 and 9 desktop items boot the legacy mageia 8 kernel, so i change the default to the right kernel
Comment 7 katnatek 2023-03-03 23:36:08 CET
Created attachment 13726 [details]
Information of my laptop
Comment 8 katnatek 2023-03-03 23:37:48 CET
Created attachment 13727 [details]
Capture of relevant kernel information in my laptop
Comment 9 katnatek 2023-03-13 20:14:15 CET
Add to errata, please give a check https://wiki.mageia.org/en/Mageia_9_Errata#Very_Long_boot_after_Upgrade

Keywords: (none) => IN_ERRATA9

Comment 10 katnatek 2023-03-16 23:41:16 CET
I clean install Mageia 8 in my laptop, and after full update u upgrade again to Mageia 9 with the classic installer, the issue reproduce, so i discard any change make for me to system.

I make some enhance in wiki but not sure if the second part is still necessary
Comment 11 Martin Whitaker 2023-03-17 10:23:34 CET
To debug this issue we need the log files created by the installer in /root/drakx during the upgrade. Check the file dates - there should be a report.bug.xz file which contains everything we need. If not, all files in that directory where the file date/time shows it was created during the upgrade.

Status: NEW => NEEDINFO
CC: (none) => mageia

Comment 12 katnatek 2023-03-17 19:23:08 CET
(In reply to Martin Whitaker from comment #11)
> To debug this issue we need the log files created by the installer in
> /root/drakx during the upgrade. Check the file dates - there should be a
> report.bug.xz file which contains everything we need. If not, all files in
> that directory where the file date/time shows it was created during the
> upgrade.

Sorry i clean install Mageia 8 again to try upgrade by urpmi this time, if the issue is also present when i do, i will report, but i think  upgrade by urpmi not produce report.bug file
Comment 13 katnatek 2023-03-20 17:04:28 CET
Created attachment 13742 [details]
Desktop logs and other files in /root/drakx

I almost forgot that i also get this on my desktop system
Here is logs and other files
Comment 14 katnatek 2023-03-20 17:05:35 CET
Created attachment 13743 [details]
report.bug.xz from my desktop system
Comment 15 katnatek 2023-03-26 23:46:36 CEST
Upgrade the laptop with urpmi and the issue not happen, so is
something in the upgrade with classic installer.

I will make a new test whit classic installer and current cauldron status
Comment 16 katnatek 2023-03-27 00:11:35 CEST
(In reply to katnatek from comment #15)
> Upgrade the laptop with urpmi and the issue not happen, so is
> something in the upgrade with classic installer.
>

The mageia 8 kernel is still here but is not booted as default
like in the upgrade with classic installer

rpm -qa|grep kernel
kernel-desktop-5.10.16-1.mga8-1-1.mga8
kernel-desktop-5.15.98-1.mga8-1-1.mga8
kernel-firmware-nonfree-20230320-1.mga9.nonfree
kernel-firmware-20230210-1.mga9
kernel-desktop-6.2.8-1.mga9
kernel-userspace-headers-6.2.8-1.mga9
kernel-desktop-latest-6.2.8-1.mga9
kernel-desktop-devel-6.2.8-1.mga9
Comment 17 Martin Whitaker 2023-04-07 13:07:03 CEST
This is a combination of two things:

1. When performing a system upgrade using the Classic or Netinstall ISOs, the installer updates the vmlinuz and initrd.img soft links in /boot, but doesn't update the additional soft links for particular kernel flavours (e.g. vmlinuz-desktop and initrd-desktop.img).

2. grub2-mkconfig scans /boot and creates boot menu entries for all vmlinuz-* / initrd-*.img pairs it finds. The pair with the highest version number is used for the default "Mageia" entry. In Mageia 8 the sorting algorithm places numeric versions higher than "-desktop". In Mageia 9 the sorting algorithm has changed and "-desktop" is placed higher than any numeric version, thus becoming the default "Mageia" entry in the boot menu. And so the out-of-date vmlinuz-desktop and initrd-desktop.img soft links are used.

When upgrading using urpmi, the additional soft links are also updated, so you don't see the problem.

Although it would be good for the installer to clean up the old links, the quick fix is to change the rules used by grub2-mkconfig to cause it to skip soft links when scanning /boot, thus restoring the intended behaviour of making the default boot menu entry point to the highest available kernel version.

This should be fixed with grub2-2.06-25.mga9.

Status: NEEDINFO => ASSIGNED

Comment 18 katnatek 2023-04-07 20:07:42 CEST
(In reply to Martin Whitaker from comment #17)
> This is a combination of two things:
> 
> 1. When performing a system upgrade using the Classic or Netinstall ISOs,
> the installer updates the vmlinuz and initrd.img soft links in /boot, but
> doesn't update the additional soft links for particular kernel flavours
> (e.g. vmlinuz-desktop and initrd-desktop.img).
> 
> 2. grub2-mkconfig scans /boot and creates boot menu entries for all
> vmlinuz-* / initrd-*.img pairs it finds. The pair with the highest version
> number is used for the default "Mageia" entry. In Mageia 8 the sorting
> algorithm places numeric versions higher than "-desktop". In Mageia 9 the
> sorting algorithm has changed and "-desktop" is placed higher than any
> numeric version, thus becoming the default "Mageia" entry in the boot menu.
> And so the out-of-date vmlinuz-desktop and initrd-desktop.img soft links are
> used.
> 
> When upgrading using urpmi, the additional soft links are also updated, so
> you don't see the problem.
> 
> Although it would be good for the installer to clean up the old links, the
> quick fix is to change the rules used by grub2-mkconfig to cause it to skip
> soft links when scanning /boot, thus restoring the intended behaviour of
> making the default boot menu entry point to the highest available kernel
> version.
> 
> This should be fixed with grub2-2.06-25.mga9.

i'm waiting for new beta or RC iso, i like that the next time i upgrade my laptop be the definitive.

Thanks for the research and the info, i will add link to your comment in the Errata
Comment 19 katnatek 2023-05-24 03:24:03 CEST
Finally do a new upgrade with classic installer iso and this issue is no longer present

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED


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