# Grub2-mkconfig RL9.3 fresh install bug

**URL:** <https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [December 10, 2023, 8:53pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118 "2023-12-10T20:53:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenns](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jenns](https://forums.rockylinux.org/u/Jenns)\
**Post date:** [December 10, 2023, 8:53pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/1 "2023-12-10T20:53:45Z")

</div>

I just noticed this bug in rocky linux 9.3

grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg not working as inteneded, like in previous versions.

I edit this file /etc/default/grub to add for example intel\_iommu=on to the GRUB\_CMDLINE\_LINUX like so.

GRUB\_TIMEOUT=5  
GRUB\_DISTRIBUTOR=“$(sed ‘s, release .\*$,g’ /etc/system-release)”  
GRUB\_DEFAULT=saved  
GRUB\_DISABLE\_SUBMENU=true  
GRUB\_TERMINAL\_OUTPUT=“console”  
GRUB\_CMDLINE\_LINUX=“crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M rd.lvm.lv=rl/root intel\_iommu=on”  
GRUB\_DISABLE\_RECOVERY=“true”  
GRUB\_ENABLE\_BLSCFG=true

The I run grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg like usual, all goes ok, then when I reboot the machine and look at the grub command with “e”

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/4/4e069079f549f193d6d0c5a69ea0430ff7f447cc.png)

The grub doesn’t get updated with my changes, I tried this with RL9.2 and it’s working correctly, fresh install of RL9.3 doesn’t work, and if you update from 9.2 to 9.3 it stops working.

Way to reproduce:

Install a fresh copy of RL9.3 minimal with all the defaults, change the values in /etc/default/grub then run grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg reboot the machine wait for the grub bootleader menu to load press “e” to edit then notice that your changes are not there.

Thanks I’ll try to find a workaround so far only works in 9.2 and my changes do stay if I add the changes in 9.2 then update to 9.3, not sure what could be happening here.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Jenns](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jenns](https://forums.rockylinux.org/u/Jenns)\
**Post date:** [December 10, 2023, 9:04pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/2 "2023-12-10T21:04:09Z")

</div>

Looking at the grub.cfg file I can see the changes are there.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/d/db61bc64a1cd2ab7360ab84490d5846e5575082b.png)

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [December 10, 2023, 9:15pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/3 "2023-12-10T21:15:43Z")

</div>

Grub config was “normalized” for non-efi and efi systems. Use

`grub2-mkconfig -o /etc/grub2.cfg`

---

<div class="post-metadata">

**Author:** ![Jenns](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jenns](https://forums.rockylinux.org/u/Jenns)\
**Post date:** [December 10, 2023, 9:18pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/4 "2023-12-10T21:18:34Z")

</div>

Oh I see the symlink has changed location

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/4/47478e80004caebf386aaf9e784021d3a90d8a4e.png)

I’ll try this.

Thank you

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [December 10, 2023, 9:55pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/5 "2023-12-10T21:55:17Z")

</div>

BTW, its good practice to not upload pictures. Instead include the content as preformatted text, that allows to be found when searched … 🙂

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [December 10, 2023, 10:40pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/6 "2023-12-10T22:40:19Z")

</div>

What you’re experiencing won’t be a bug. If the suggested command does not work for you still, consider adding `--update-bls-cmdline`. You may also want to consider using `grubby` instead.

```auto
grubby --update-kernel=ALL --args='...'

```

See below for context.

[https://bugzilla.redhat.com/show\_bug.cgi?id=2203203](https://bugzilla.redhat.com/show_bug.cgi?id=2203203)

[https://bugzilla.redhat.com/show\_bug.cgi?id=2212320](https://bugzilla.redhat.com/show_bug.cgi?id=2212320)

[https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault](https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault)

[https://fedoraproject.org/wiki/GRUB\_2](https://fedoraproject.org/wiki/GRUB_2)

---

<div class="post-metadata">

**Author:** ![hmg](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@hmg](https://forums.rockylinux.org/u/hmg)\
**Post date:** [December 12, 2023, 11:19am UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/7 "2023-12-12T11:19:59Z")

</div>

BS"D  
I experienced the same problem. Even updating /etc/grub2.cfg did not work for me until I added the extra argument mentioned by nazunalika

grub2-mkconfig --update-bls-cmdline -o /etc/grub2.cfg

That worked.  
Thanks!

---

<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:** [December 12, 2023, 11:58am UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/8 "2023-12-12T11:58:42Z")

</div>

> [@Jenns](#):
>
> Oh I see the symlink has changed location

Indeed.

In el8 (and el7) the grub.cfg is in `/boot/efi/EFI/${VENDOR}/` for EFI system and in `/boot/grub2/` for legacy system.  
If el9 the _actual_ grub.cfg is in `/boot/grub2/` for both, and EFI system has in `/boot/efi/EFI/${VENDOR}/` a stub that you don’t want to change after install. An example stub:

```auto
search --no-floppy --fs-uuid --set=dev 14fba..5e95
set prefix=($dev)/grub2

export $prefix
configfile $prefix/grub.cfg

```

where `14fba..5e95` is UUID of the filesystem that has the content of `/boot/`.  
Hence the last line is effectively: `configfile /boot/grub2/grub.cfg`

One can restore the stub by setting correct UUID (that both `blkid` and `lsblk -f` do show) to sample above.

* * *

The `grub2-mkconfig` does apparently follow symlinks, because it can modify `grubenv` and BLS entries and the former is with actual grub.cfg.

---

<div class="post-metadata">

**Author:** ![Jenns](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jenns](https://forums.rockylinux.org/u/Jenns)\
**Post date:** [December 29, 2023, 5:51pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/9 "2023-12-29T17:51:51Z")

</div>

I tried doing grub2-mkconfig -o /boot/grub2/grub.cfg and It did not work, what is the best practice to modify this, seems like things change much. Thank You

My bad sorry I missed this grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg this works.

---

<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:** [February 27, 2024, 5:52pm UTC](https://forums.rockylinux.org/t/grub2-mkconfig-rl9-3-fresh-install-bug/12118/10 "2024-02-27T17:52:45Z")

</div>

Closed on February 27, 2024, 5:52pm UTC

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