[Solved] Editing UEFI boot parameters in RHEL 9

Issues related to applications and software problems and general support
Post Reply
lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

[Solved] Editing UEFI boot parameters in RHEL 9

Post by lightman47 » 2024/02/01 20:06:41

Red Hat 9 (updated) on UEFI dual boot with Win 10

I'm lost on this UEFI stuff, though I've learned TONS in the last 10 days of rebuilding my laptop 4+ times and thought I had 'a clue'. Obviously, I need more clues. I want to adjust the parameters in my grub bootup file (wherever it may be).

As instructed by Red Hat and other posts, I have edited my boot parameters in /etc/default/grub - to disable nouveau and get rid of rhgb and see the boot results.

Code: Select all

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 resume=/dev/mapper/rhel_ldellg3-swap rd.lvm.lv=rhel_ldellg3/root rd.lvm.lv=rhel_ldellg3/swap rd.driver.blacklist=nouveau nouveau.modeset=0"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
Dsepite either of my 'grub2-mkconfig -o' commands, my changes are never implementd.What am I missing?

Code: Select all

sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grubenv/grub.cfg
I have efibootmgr that seems to only deal with boot ORDER - and works great at that!

As usual, no emergency.
Thank you.
Last edited by lightman47 on 2024/02/02 12:03:41, edited 1 time in total.

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Editing UEFI boot parameters in RHEL 9

Post by jlehtone » 2024/02/02 08:55:21

RHEL 9.3 did change how grub2-mkconfig behaves: https://access.redhat.com/documentation ... oot-loader


Overall, RHEL 9 did change the grub.cfg placement.
Up to RHEL 8 the UEFI and legacy were different:
* UEFI had grub.cfg in /boot/efi/EFI/${VENDOR}/
* Legacy had grub.cfg in /boot/grub2/

In RHEL 9 the grub.cfg is always in /boot/grub2/

There are even symlinks that point to the grub.cfg:

Code: Select all

[root@EL7-EFI ~]# ll /etc/grub2* -d
lrwxrwxrwx. 1 root root   22 May 24  2023 /etc/grub2.cfg -> ../boot/grub2/grub.cfg # Dangling link
lrwxrwxrwx. 1 root root   31 May 24  2023 /etc/grub2-efi.cfg -> ../boot/efi/EFI/centos/grub.cfg
[root@EL8-EFI ~]# ll /etc/grub2* -d
lrwxrwxrwx. 1 root root   22 Oct 26 15:24 /etc/grub2.cfg -> ../boot/grub2/grub.cfg # Dangling link
lrwxrwxrwx. 1 root root   34 Oct 26 15:24 /etc/grub2-efi.cfg -> ../boot/efi/EFI/almalinux/grub.cfg
[root@EL9-EFI ~]# ll /etc/grub* -d
lrwxrwxrwx. 1 root root   22 Jan 25 14:02 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root   22 Jan 25 14:02 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
In EFI system there is a /boot/efi/EFI/${VENDOR}/grub.cfg but it is a mere stub that
is created by grub package installation. One should not edit/replace it. Example:

Code: Select all

[root@EL9-EFI ~]# cat /boot/efi/EFI/almalinux/grub.cfg
search --no-floppy --fs-uuid --set=dev 14..95
set prefix=($dev)/grub2

export $prefix
configfile $prefix/grub.cfg
(The last line includes the /boot/grub2/grub.cfg)

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Editing UEFI boot parameters in RHEL 9

Post by lightman47 » 2024/02/02 12:03:22

Aha! I found I also needed the "--update-bls-cmdline". THANK YOU for all that!

Post Reply