Created attachment 1879184 [details] uname Description of problem: Upgrading Fedora from 35 to 36 shows as 35 few places and 36 other places Version-Release number of selected component (if applicable): 35 to 36 How reproducible: Steps to Reproduce: 1. Get the system upto date - dnf upgrade --refresh -y & reboot 2. dnf system-upgrade download --releasever=36 --allowerasing --best 3. dnf system-upgrade reboot Actual results: uname -a shows 35 instead of 36, also at boot time. See enclosed images. [root@toshibaicore3 SKY]# uname -a Linux toshibaicore3 5.17.6-200.fc35.x86_64 #1 SMP PREEMPT Mon May 9 14:22:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux [root@toshibaicore3 SKY]# dnf system-upgrade download --releasever=36 --allowerasing --best Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y Error: Need a --releasever greater than the current system version. Expected results: [root@toshibaicore3 SKY]# uname -a Linux toshibaicore3 5.17.6-300.fc36.x86_64 #1 SMP PREEMPT Mon May 9 14:22:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Additional info:
Created attachment 1879186 [details] about
Created attachment 1879187 [details] boot
kernel info: only this sequence have this problem. [root@toshibaicore3 SKY]# rpm -q kernel kernel-5.16.18-200.fc35.x86_64 kernel-5.17.6-200.fc35.x86_64 kernel-5.17.6-300.fc36.x86_64 kernel info: this sequence don't have this 35 & 36 mix problem and this is different host. [root@toshiba SKY]# rpm -q kernel kernel-5.17.5-200.fc35.x86_64 kernel-5.17.6-200.fc35.x86_64 kernel-5.17.6-300.fc36.x86_64
Created attachment 1879219 [details] working boot
Here is solution: 1) change directory to /boot # cd /boot 2) copy vmlinuz for 5.17.6-300.fc36.x86_64 # cp /usr/lib/modules/5.17.6-300.fc36.x86_64/vmlinuz vmlinuz-5.17.6-300.fc36.x86_64 3) create symbolic link of symvers.gz for 5.17.6-300.fc36.x86_64 # ln -s /usr/lib/modules/5.17.6-300.fc36.x86_64/symvers.gz symvers-5.17.6-300.fc36.x86_64.gz 4) initramfs using dracut for 5.17.6-300.fc36.x86_64 # dracut --force initramfs-5.17.6-300.fc36.x86_64.img 5.17.6-300.fc36.x86_64 5) copy config-5.17.6-200.fc35.x86_64 from other working host or from install cd/dvd using usb drive # cp /run/media/SKY/710A-4340/config-5.17.6-200.fc35.x86_64 config-5.17.6-200.fc35.x86_64 6) change directory to /boot/loader/entries/ # cd /boot/loader/entries/ 7) create d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf # cp d444eb01db1c49f18a545e3b1db9496e-5.17.6-200.fc35.x86_64.conf d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf 8) change lines 1 to 4 from 5.17.6-200.fc35.x86_64 to d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf title Fedora Linux (5.17.6-300.fc36.x86_64) 36 (Workstation Edition) <== updated info 5.17.6-300.fc36.x86_64 & 36 version 5.17.6-300.fc36.x86_64 <== updated info 5.17.6-300.fc36.x86_64 linux /vmlinuz-5.17.6-300.fc36.x86_64 <== updated info 5.17.6-300.fc36.x86_64 initrd /initramfs-5.17.6-300.fc36.x86_64.img <== updated info 5.17.6-300.fc36.x86_64 options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet grub_users $grub_users grub_arg --unrestricted grub_class fedora 9) reboot and select 5.17.6-300.fc36.x86_64 in grub linux boot loader
Feel free to close this bug.
[root@toshibaicore3 SKY]# uname -a Linux toshibaicore3 5.17.6-300.fc36.x86_64 #1 SMP PREEMPT Mon May 9 15:47:11 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Created attachment 1879732 [details] 36 working boot
It appears Fedora upgrade 35 to 36 created efi boot loader instead of existing grub boot loader which caused this problem and why efi boot loader when exitsing system uses grub boot loader? [root@toshibaicore3 entries]# pwd /boot/efi/loader/entries [root@toshibaicore3 entries]# ls -l total 8 -rwx------ 1 root root 479 May 13 10:04 d444eb01db1c49f18a545e3b1db9496e-0-rescue.conf -rwx------ 1 root root 429 May 13 10:04 d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf [root@toshibaicore3 entries]# cat d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf title Fedora Linux 36 (Workstation Edition) version 5.17.6-300.fc36.x86_64 machine-id d444eb01db1c49f18a545e3b1db9496e options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet linux /d444eb01db1c49f18a545e3b1db9496e/5.17.6-300.fc36.x86_64/linux initrd /d444eb01db1c49f18a545e3b1db9496e/5.17.6-300.fc36.x86_64/initrd
One more file /boot/grub2/grubenv needs to be updated for 5.17.6-300.fc36.x86_64 # cd /boot/grub2 >open grubenv file and update 5.17.6-300.fc36.x86_64 # GRUB Environment Block saved_entry=d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64 <== updated info 5.17.6-300.fc36.x86_64 boot_success=1 boot_indeterminate=0 kernelopts=root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet #####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
Created attachment 1879781 [details] BIOS SecureBoot Disabled
efi secure boot details: [root@toshibaicore3 SKY]# dmesg | grep -i secure [ 0.000000] secureboot: Secure boot disabled [ 0.014502] secureboot: Secure boot disabled [root@toshibaicore3 SKY]# hexdump /sys/firmware/efi/efivars/SecureBootEnforce-* | awk '{print $4}' 0000 bootctl: # bootctl System: Firmware: n/a (n/a) Secure Boot: disabled (unknown) TPM2 Support: no Boot into FW: supported Current Boot Loader: Product: n/a Features: ✗ Boot counting ✗ Menu timeout control ✗ One-shot menu timeout control ✗ Default entry control ✗ One-shot entry control ✗ Support for XBOOTLDR partition ✗ Support for passing random seed to OS ✗ Load drop-in drivers ✗ Boot loader sets ESP information ESP: n/a File: └─n/a Random Seed: Passed to OS: no System Token: not set Exists: no Available Boot Loaders on ESP: ESP: /boot/efi (/dev/disk/by-partuuid/3566141e-519c-4b1f-9fe0-e6bb01bc4f24) File: └─/EFI/BOOT/BOOTIA32.EFI File: └─/EFI/BOOT/BOOTX64.EFI Boot Loaders Listed in EFI Variables: Title: Fedora ID: 0x0003 Status: active, boot-order Partition: /dev/disk/by-partuuid/3566141e-519c-4b1f-9fe0-e6bb01bc4f24 File: └─/EFI/fedora/shimx64.efi Boot Loader Entries: $BOOT: /boot/efi (/dev/disk/by-partuuid/3566141e-519c-4b1f-9fe0-e6bb01bc4f24) Default Boot Loader Entry: title: Fedora Linux 36 (Workstation Edition) id: d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf source: /boot/efi/loader/entries/d444eb01db1c49f18a545e3b1db9496e-5.17.6-300.fc36.x86_64.conf version: 5.17.6-300.fc36.x86_64 machine-id: d444eb01db1c49f18a545e3b1db9496e linux: /d444eb01db1c49f18a545e3b1db9496e/5.17.6-300.fc36.x86_64/linux initrd: /d444eb01db1c49f18a545e3b1db9496e/5.17.6-300.fc36.x86_64/initrd options: root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet
bootloader info: [root@toshibaicore3 SKY]# grub2-install --version grub2-install (GRUB) 2.06 bootloader_type suppose to be 7 but 0, why? [root@toshibaicore3 SKY]# echo $((`cat /proc/sys/kernel/bootloader_type`>>4)) 0 Assigned boot loader ids (hexadecimal): 0 LILO (0x00 reserved for pre-2.00 bootloader) 1 Loadlin 2 bootsect-loader (0x20, all other values reserved) 3 Syslinux 4 Etherboot/gPXE/iPXE 5 ELILO 7 GRUB 8 U-Boot 9 Xen A Gujin B Qemu C Arcturus Networks uCbootloader D kexec-tools E Extended (see ext_loader_type) F Special (0xFF = undefined) 10 Reserved 11 Minimal Linux Bootloader <http://sebastian-plotz.blogspot.de> 12 OVMF UEFI virtualization stack
Moving to grub2. The fedora-release package just contains a few etc files and has nothing to do with this. ;)
grub2-install fails: [root@toshibaicore3 SKY]# grub2-install grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory. [root@toshibaicore3 SKY]# grub2-install /dev/sda grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
upgrading from 5.17.6-300.fc36.x86_64 to 5.17.7-300.fc36.x86_64. Here is solution: 1) change directory to /boot # cd /boot 2) copy vmlinuz form /boot/efi/d444eb01db1c49f18a545e3b1db9496e/5.17.7-300.fc36.x86_64 # cp /boot/efi/d444eb01db1c49f18a545e3b1db9496e/5.17.7-300.fc36.x86_64/linux vmlinuz-5.17.7-300.fc36.x86_64 3) create symbolic link of symvers.gz for 5.17.7-300.fc36.x86_64 # ln -s /usr/lib/modules/5.17.7-300.fc36.x86_64/symvers.gz symvers-5.17.7-300.fc36.x86_64.gz 4) initramfs using dracut for 5.17.7-300.fc36.x86_64 # dracut --force initramfs-5.17.7-300.fc36.x86_64.img 5.17.7-300.fc36.x86_64 OR # cp /boot/efi/d444eb01db1c49f18a545e3b1db9496e/5.17.7-300.fc36.x86_64/initrd initramfs-5.17.7-300.fc36.x86_64.img 5) copy config-5.17.7-300.fc36.x86_64 from other working host or from install cd/dvd using usb drive # cp /run/media/SKY/710A-4340/config-5.17.7-300.fc36.x86_64 config-5.17.7-300.fc36.x86_64 6) change directory to /boot/loader/entries/ # cd /boot/loader/entries/ 7) create d444eb01db1c49f18a545e3b1db9496e-5.17.7-300.fc36.x86_64.conf # cp d444eb01db1c49f18a545e3b1db9496e-5.17.7-300.fc36.x86_64.conf d444eb01db1c49f18a545e3b1db9496e-5.17.7-300.fc36.x86_64.conf 8) change lines 1 to 4 from 5.17.6-300.fc36.x86_64 to 5.17.7-300.fc36.x86_64 in d444eb01db1c49f18a545e3b1db9496e-5.17.7-300.fc36.x86_64.conf title Fedora Linux (5.17.7-300.fc36.x86_64) 36 (Workstation Edition) <== updated info 5.17.7-300.fc36.x86_64 & 36 version 5.17.7-300.fc36.x86_64 <== updated info 5.17.7-300.fc36.x86_64 linux /vmlinuz-5.17.7-300.fc36.x86_64 <== updated info 5.17.7-300.fc36.x86_64 initrd /initramfs-5.17.7-300.fc36.x86_64.img <== updated info 5.17.7-300.fc36.x86_64 options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet grub_users $grub_users grub_arg --unrestricted grub_class fedora 9)grubenv needs to be updated # cd /boot/grub2 >open grubenv file and update 5.17.7-300.fc36.x86_64 # GRUB Environment Block saved_entry=d444eb01db1c49f18a545e3b1db9496e-5.17.7-300.fc36.x86_64 <== updated info 5.17.7-300.fc36.x86_64 boot_success=1 boot_indeterminate=0 kernelopts=root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-bdbcde6c-6e84-4046-929d-86ee08a426c7 rd.lvm.lv=fedora/swap rhgb quiet ##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### 10) reboot
Repeat 10 steps listed in comment #16 when ever current/future kernel gets upgraded from X (example : 5.17.7-300.fc36.x86_64) to Y (5.17.8-300.fc36.x86_64)
Here is the two step solution for efi which is one time instead of 10 steps listed in comment #16 which needs to be done every time. 1) Rename /boot/efi/d444eb01db1c49f18a545e3b1db9496e to something else # mv d444eb01db1c49f18a545e3b1db9496e/ d444eb01db1c49f18a545e3b1db9496e.org 2) Rename/move conf files in /boot/efi/loader/entries to some where else # mkdir /boot/efi/loader/entries/org # mv /boot/efi/loader/entries/*.conf /boot/efi/loader/entries/org Now upgrade from current kernel X (for example: 5.17.8-300.fc36.x86_64) to Y (for example; 5.17.9-300.fc36.x86_64) # dnf upgrade --refresh -y # reboot Now it creates all those files in /boot directory instead of /boot/efi, also /boot/grub2/grubenv updated automatically. [root@toshibaicore3 boot]# ls -l total 230088 ................ -rw-r--r-- 1 root root 244012 May 18 11:26 config-5.17.9-300.fc36.x86_64 ............... -rw------- 1 root root 38455053 May 24 22:39 initramfs-5.17.9-300.fc36.x86_64.img ................. lrwxrwxrwx 1 root root 46 May 24 22:37 symvers-5.17.9-300.fc36.x86_64.gz -> /lib/modules/5.17.9-300.fc36.x86_64/symvers.gz -rw------- 1 root root 6235514 May 18 11:26 System.map-5.17.9-300.fc36.x86_64 ...... -rwxr-xr-x 1 root root 11802608 May 18 11:26 vmlinuz-5.17.9-300.fc36.x86_64
*** This bug has been marked as a duplicate of bug 2071034 ***