Rocky 9 Linux Booting Notes: Difference between revisions
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>/..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
=== This guy (jlehtone) actually sums it up fairly well; === | ===This guy (jlehtone) actually sums it up fairly well;=== | ||
On Rocky 8 [and Rocky 9] the boot process has two options: | 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> | *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> | *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>/boot/grub2/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>/boot/grub2/grub.cfg</code>. | ||
| Line 10: | Line 10: | ||
----In all cases, the there are two options: | ----In all cases, the there are two options: | ||
* BLS is enabled and the grub.cfg should include <code>/boot/loader/entries/*.conf</code> files as boot entries. This is the default | *BLS is enabled and the grub.cfg should include <code>/boot/loader/entries/*.conf</code> files as boot entries. This is the default | ||
* BLS is disabled and all boot entries are within the grub.cfg | *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. | 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. | ||
| Line 19: | Line 19: | ||
FROM: https://forums.rockylinux.org/t/grub-empty-after-dnf-upgrade/18132/9 | FROM: https://forums.rockylinux.org/t/grub-empty-after-dnf-upgrade/18132/9 | ||
=== And on this note; === | === Commands === | ||
Makes the /grub2/grub.cfg file based on settings in /etc/default/grub file: grub2-mkconfig -o /boot/grub2/grub.cfg | |||
Makes a custom .efi File with a lot of extra modules (not needed if one of the below DNF commands is done): grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=rocky --modules="part_gpt part_msdos fat ext2 normal linux configfile search search_fs_uuid lvm" | |||
DNF Install Command for UEFI systems: dnf reinstall grub2-efi-x64 grub2-efi-x64-modules shim-x64 grub2-tools | |||
DNF GRUB related install Commands for BIOS based systems: dnf install grub2-pc | |||
===And on this note;=== | |||
https://bbs.archlinux.org/viewtopic.php?id=258039 | https://bbs.archlinux.org/viewtopic.php?id=258039 | ||
| Line 36: | Line 45: | ||
NOTE: Some would have you put this, but DON'T: <code>configfile (hd0,gpt1)/boot/grub2/grub.cfg</code> | NOTE: Some would have you put this, but DON'T: <code>configfile (hd0,gpt1)/boot/grub2/grub.cfg</code> | ||
=== efi/EFI/WhatEverNamedBootLoaderID/grub.cfg (usually /efi/EFI/rocky/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.<syntaxhighlight lang="text"> | 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.<syntaxhighlight lang="text"> | ||
search --no-floppy --root-dev-only --fs-uuid --set=dev 5603d694-79c2-4c70-9200-2e11ab3c20e8 | search --no-floppy --root-dev-only --fs-uuid --set=dev 5603d694-79c2-4c70-9200-2e11ab3c20e8 | ||