# Rocky 9.5 vagrant box not booting after kernel update

**URL:** <https://forums.rockylinux.org/t/rocky-9-5-vagrant-box-not-booting-after-kernel-update/17352>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [January 28, 2025, 11:49pm UTC](https://forums.rockylinux.org/t/rocky-9-5-vagrant-box-not-booting-after-kernel-update/17352 "2025-01-28T23:49:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paizao](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@paizao](https://forums.rockylinux.org/u/paizao)\
**Post date:** [January 28, 2025, 11:49pm UTC](https://forums.rockylinux.org/t/rocky-9-5-vagrant-box-not-booting-after-kernel-update/17352/1 "2025-01-28T23:49:52Z")

</div>

Hi All,

I’m seeing the same issue that was previously reported here:

> [@Rocky 9.4 AWS ami not booting after kernel update](https://forums.rockylinux.org/t/rocky-9-4-aws-ami-not-booting-after-kernel-update/14091/1):
>
> Hello We have noticed that on our AWS environments since the 9.4 ami was published our servers do not boot up after a kernel/dnf update which is part of our provisioning AMI id: ami-02d6d64456f57b99d AMI Name: Rocky-9-EC2-Base-9.4-20240509.0.x86\_64 Region: eu-west-2 Disk type: gp3 Instance type: t3.medium The serial console snippet: [15.746077] nvme nvme0: pci function 0000:00:04.0 [15.746470] ACPI: \_SB\_.LNKD: Enabled at IRQ 11 [15.770394] nvme nvme0: 2/0/0 default/read/poll qu…

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:

```auto
[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:

```auto
[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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [March 29, 2025, 11:51pm UTC](https://forums.rockylinux.org/t/rocky-9-5-vagrant-box-not-booting-after-kernel-update/17352/3 "2025-03-29T23:51:51Z")

</div>

Closed on March 29, 2025, 11:51pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
