Bug 2192509

Summary: dnf system-upgrade generates broken grub config
Product: [Fedora] Fedora Reporter: 黃健毅 <johnny.jy.ooi+fedorabugzilla>
Component: grub2Assignee: Nicolas Frayer <nfrayer>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 36CC: amatej, daniel.mach, fmartine, jmracek, jrohel, lkundrak, mblaha, mlewando, nfrayer, packaging-team-maint, pgnet.dev, pjones, pkratoch, rharwood, rpm-software-management
Target Milestone: ---Keywords: Upgrades
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-25 18:05:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description 黃健毅 2023-05-02 07:53:12 UTC
I have (or had) a Fedora 36 installation running an ext4 fs with LVM. I used https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/ to upgrade to F38.

The upgrade process did not error, but upon first boot into F38, it kernel panic'ed with an error on blockdev. A member of the Fedora Forums pointed out grub may have made and error and used "mapper/{lvm volume}" instead of "/dev/mapper/{lvm volume}"

I reimaged back to the pre-upgrade state and tried again the following day. This time, it did not kernel panic, but instead hung at "Loading Linux"

Checking the grub config, I could see that this second time, there was no error on the blockdev, but there was no initrd line.

I booted from my F36 config (which was still there since this was a system upgrade), and from inside the F36 installation, I was able to regenerate the grub config using "grub2-mkconfig" and this added the initrd line back. It would appear the system upgrade process did not generate the grub config properly, even though all the config was available.

Reproducible: Always

Steps to Reproduce:
1.F36 with LVM
2.Upgrade using dnf system-upgrade --releasever=38
3.See if it hangs or kernel panics on first boot into 38.
Actual Results:  
First attempt: Kernel panic
Second attempt: Hang on "Loading Linux" (no initrd)

Expected Results:  
Boot into F38 without manual intervention

Original Fedora Forums post: https://forums.fedoraforum.org/showthread.php?330457-F38-Upgrade-quot-Can-t-Open-Blockdev-quot-After-Upgrade

Comment 1 amatej 2023-05-04 13:11:19 UTC
This doesn't seem like a problem in dnf.
I am moving the bug to grub as it seems like the cause according to the description.

Comment 2 Ludek Smid 2023-05-25 18:05:10 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.