Rocky 9 Linux Booting Notes

Revision as of 15:39, 15 July 2025 by Root (talk | contribs) (Created page with "=== This guy (jlehtone) actually sums it up fairly well; === On Rocky 8 [and Rocky 9] the boot process has two options: * Legacy boot loads GRUB from <code>/boot/grub2/</code> and GRUB reads <code>/boot/grub2/grub.cfg</code> * UEFI boot loads GRUB from <code>/boot/efi/EFI/rocky/</code> and GRUB reads <code>/boot/efi/EFI/rocky/grub.cfg</code> On Rocky 9 the same happens, but the <code>/boot/efi/EFI/rocky/grub.cfg</code> is a wrapper that makes the UEFI GRUB read <code>/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This guy (jlehtone) actually sums it up fairly well;

On Rocky 8 [and Rocky 9] the boot process has two options:

  • Legacy boot loads GRUB from /boot/grub2/ and GRUB reads /boot/grub2/grub.cfg
  • UEFI boot loads GRUB from /boot/efi/EFI/rocky/ and GRUB reads /boot/efi/EFI/rocky/grub.cfg

On Rocky 9 the same happens, but the /boot/efi/EFI/rocky/grub.cfg is a wrapper that makes the UEFI GRUB read /boot/grub2/grub.cfg.

Either way, you do need only one real grub.cfg


In all cases, the there are two options:

  • BLS is enabled and the grub.cfg should include /boot/loader/entries/*.conf files as boot entries. This is the default
  • BLS is disabled and all boot entries are within the grub.cfg

The entries as separate (BLS) files is easier for kernel updates: simply create file for new kernel and remove file of removed kernel. With entries in grub.cfg requires insert/remove lines type edits.

If no BLS entries were found, had they been erased, or did GRUB’s “locate BLS entries” somehow fail?

FROM: https://forums.rockylinux.org/t/grub-empty-after-dnf-upgrade/18132/9

And on this note;

https://bbs.archlinux.org/viewtopic.php?id=258039

set root=(hd0,gpt2)

linux /vmlinuz root=VMe.P3-LV.ROOT ro

initrd /initramfs.img

boot

OR

configfile (hd0,gpt1)/grub2/grub.cfg

NOTE: Some would have you put this, but DON'T: configfile (hd0,gpt1)/boot/grub2/grub.cfg

efi/EFI/WhatEverNamedBootLoaderID/grub.cfg (usually /efi/EFI/rocky/grub.cfg)

grub.cfg "Stub File" that 'points' to /grub2/grub.cfg (that's the path from the "I am the booting OS" perspective, which is of course in /boot/grub2/grub.cfg after Linux has booted.

search --no-floppy --root-dev-only --fs-uuid --set=dev 5603d694-79c2-4c70-9200-2e11ab3c20e8
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg