Hi All,
I’m seeing the same issue that was previously reported here:
when using the rocky 9.5 vagrant box which includes kernel 5.14.0-503.14.1.el9_5.x86_64
by default.
After doing vagrant up
with this box, then dnf -y kernel kernel-devel
, then reboot
, the machine does not boot due to /dev/mapper/loop0p4
being used as the root device in the grub.cfg after the kernel upgrade.
Here are the diffs between /boot before and after doing the dnf -y kernel kernel-devel
commands:
[root@adaxci-base-rocky95 ~]# diff -r /boot ~/oldboot/
diff: /boot/boot: recursive directory loop
Only in /boot: config-5.14.0-503.22.1.el9_5.x86_64
diff -r /boot/grub2/grubenv /root/oldboot/grub2/grubenv
3,5c3,4
< boot_success=1
< saved_entry=add30822b9ab459ca2384f353c310237-5.14.0-503.22.1.el9_5.x86_64
< ##################################################################################################################################################################################################
####################################################################################################################################################################################################
####################################################################################################################################################################################################
####################################################################################################################################################################################################
###########################################################
\ No newline at end of file
---
> boot_success=0
> ##################################################################################################################################################################################################
####################################################################################################################################################################################################
####################################################################################################################################################################################################
####################################################################################################################################################################################################
#####################################################################################################################################
\ No newline at end of file
Only in /boot: initramfs-5.14.0-503.22.1.el9_5.x86_64.img
Only in /boot/loader/entries: add30822b9ab459ca2384f353c310237-5.14.0-503.22.1.el9_5.x86_64.conf
Only in /boot: symvers-5.14.0-503.22.1.el9_5.x86_64.gz
Only in /boot: System.map-5.14.0-503.22.1.el9_5.x86_64
Only in /boot: vmlinuz-5.14.0-503.22.1.el9_5.x86_64
Only in /boot: .vmlinuz-5.14.0-503.22.1.el9_5.x86_64.hmac
[root@adaxci-base-rocky95 ~]# cat /boot/loader/entries/add30822b9ab459ca2384f353c310237-5.14.0-503.22.1.el9_5.x86_64.conf
title Rocky Linux (5.14.0-503.22.1.el9_5.x86_64) 9.5 (Blue Onyx)
version 5.14.0-503.22.1.el9_5.x86_64
linux /vmlinuz-5.14.0-503.22.1.el9_5.x86_64
initrd /initramfs-5.14.0-503.22.1.el9_5.x86_64.img
options root=/dev/mapper/loop0p4 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
grub_users $grub_users
grub_arg --unrestricted
grub_class rocky
As you can see the new boot entry uses /dev/mapper/loop0p4
as the root device.
After running grub2-mkconfig -o /boot/grub2/grub.cfg
it gets fixed up and the new kernel can boot again properly.
Here are the diffs between the post-kernel upgrade /boot and after performing the grub2-mkconfig
command:
[root@adaxci-base-rocky95 ~]# diff -r /boot ~/newboot/
diff: /boot/boot: recursive directory loop
diff -r /boot/grub2/grub.cfg /root/newboot/grub2/grub.cfg
67,72c67
< set root='hd0,gpt4'
< if [ x$feature_platform_search_hint = xy ]; then
< search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 7afc975f-28f6-4358-a1b0-c41b5cc4a7de
< else
< search --no-floppy --fs-uuid --set=root 7afc975f-28f6-4358-a1b0-c41b5cc4a7de
< fi
---
> search --no-floppy --fs-uuid --set=root 7afc975f-28f6-4358-a1b0-c41b5cc4a7de
81c76
< set lang=en_US
---
> set lang=C
127,132c122
< set root='hd0,gpt3'
< if [ x$feature_platform_search_hint = xy ]; then
< search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
< else
< search --no-floppy --fs-uuid --set=root 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
< fi
---
> search --no-floppy --fs-uuid --set=root 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
135,140c125
< set boot='hd0,gpt3'
< if [ x$feature_platform_search_hint = xy ]; then
< search --no-floppy --fs-uuid --set=boot --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
< else
< search --no-floppy --fs-uuid --set=boot 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
< fi
---
> search --no-floppy --fs-uuid --set=boot 9d83e7c7-e95e-4621-b9d1-81971aaabfeb
diff -r /boot/grub2/grubenv /root/newboot/grub2/grubenv
3c3
< boot_success=0
---
> boot_success=1
5,6c5
< boot_indeterminate=0
< ####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
\ No newline at end of file
---
> #########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
\ No newline at end of file
diff -r /boot/loader/entries/91caee5101f4451a9d270bd1854f7204-5.14.0-503.14.1.el9_5.x86_64.conf /root/newboot/loader/entries/91caee5101f4451a9d270bd1854f7204-5.14.0-503.14.1.el9_5.x86_64.conf
5c5
< options root=UUID=7afc975f-28f6-4358-a1b0-c41b5cc4a7de ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop
---
> options no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop root=UUID=7afc975f-28f6-4358-a1b0-c41b5cc4a7de
diff -r /boot/loader/entries/add30822b9ab459ca2384f353c310237-5.14.0-503.22.1.el9_5.x86_64.conf /root/newboot/loader/entries/add30822b9ab459ca2384f353c310237-5.14.0-503.22.1.el9_5.x86_64.conf
5c5
< options root=UUID=7afc975f-28f6-4358-a1b0-c41b5cc4a7de ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop
---
> options root=/dev/mapper/loop0p4 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=1G-4G:192M,4G-64G:256M,64G-:51
Just putting this information out here in case someone else runs into this problem.
If there is a bugzilla or some place more appropriate to report this, please let me know.