# Issue in Grubby while baking new ami using kernal 5.14.0-362.13.1.el9\_3.x86\_64

**URL:** https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549
**Category:** Rocky Linux Help & Support
**Tags:** rocky-linux-9
**Created:** [January 18, 2024, 5:55pm UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549 "2024-01-18T17:55:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shonry27](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@shonry27](https://forums.rockylinux.org/u/shonry27)
#### Post date: [January 18, 2024, 5:55pm UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/1 "2024-01-18T17:55:05Z")

</div>

Hi there,  
We have a process in place to build Rocky Linux 9.2 AMI’s in AWS.  
We use the Rocky 9 `ami-07d75f492ac3a326f` as root and then chroot into a secondary volume to build our base scratch OS of Rocky9 as per our requirement.

Recently after an update to this new kernel( 5.14.0-362.13.1.el9\_3.x86\_64) things started to break on builds as on boot the ami built with the chrooted(secondary volume) would constantly look out for the root uuid stating  
`Warning: /dev/disk/by-uuid/06230a70-4636-4663-8179-0597f0245374 does not exist`  
I noticed that this is the uuid of the root partition of ami-07d75f492ac3a326f.

On investigating everywhere I could see that the uuid of the new root partion is updated on grub.cfg file when mkconfig is executed. However the entry is still not updated when I look at entries in the  
grubby info all commands.

I had to manually override this using  
`chroot "{{ rootfs }}" grubby --update-kernel=ALL --args=root="UUID={{ blkid_root.stdout }}"`

Wanted to check if this is already a known issue, because we had perfectly normal builds before.  
Has anything changed which does not propagate the updated root uuid to grubby.

---

<div class="post-metadata">

### Author: ![jbkt23](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jbkt23](https://forums.rockylinux.org/u/jbkt23)
#### Post date: [January 19, 2024, 2:13am UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/2 "2024-01-19T02:13:31Z")

</div>

grub2-mkconfig does not touch the /boot/loader/entries. Grubby is the tool to do that or “kernel-install” on new kernel installs. The first time you run grubby --update-kernel=ALL --args=\<\> it should populate the file:  
/etc/kernel/cmdline  
then on subsequent kernel updates those commandline parameters should populate the new entry in /boot/loader/entries.  
The man page for kernel-install describes some of the new kernel install routine. There is no documentation on how or why the /etc/kernel/cmdline file is created.

---

<div class="post-metadata">

### Author: ![shonry27](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@shonry27](https://forums.rockylinux.org/u/shonry27)
#### Post date: [February 8, 2024, 6:47am UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/3 "2024-02-08T06:47:36Z")

</div>

Actually I did not touch any ami build code while moving to kernal 5.14.0-362.13.1.el9\_3.x86\_64  
But things started to break irrespectively and I wasn’t able to get my ami’s too boot up initially without updating the uuid of the chrooted root device using grubby.

Hence was wondering if there has been any change while making the grub in the chrooted device

---

<div class="post-metadata">

### Author: ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)
#### Post date: [February 8, 2024, 7:23am UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/4 "2024-02-08T07:23:42Z")

</div>

> [@jbkt23](#):
>
> grub2-mkconfig does not touch the /boot/loader/entries

The version of grub2-mkconfig in el9\_3 does touch /boot/loader/entries (and /etc/kernel/cmdline) if you add option `--update-bls-cmdline`  
See [Chapter&nbsp;4.&nbsp;New features Red Hat Enterprise Linux 9 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.3_release_notes/new-features#new-features-boot-loader)

---

<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: [April 8, 2024, 7:24am UTC](https://forums.rockylinux.org/t/issue-in-grubby-while-baking-new-ami-using-kernal-5-14-0-362-13-1-el9-3-x86-64/12549/5 "2024-04-08T07:24:03Z")

</div>

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