[f40] Doc issue in file modules/system-administrators-guide/pages/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader.adoc #32

Open
opened 2024-09-29 19:29:46 +00:00 by fahlb · 0 comments
fahlb commented 2024-09-29 19:29:46 +00:00 (Migrated from gitlab.com)

In the current Doc for f40 in the section Changing the Default Boot Entry it says:

To force a system to always use a particular menu entry, use the menu entry name as the key to the GRUB_DEFAULT directive in the /etc/default/grub file. To list the available menu entries, run the following command as root:

~]# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg

**This command outputs nothing on my install!34};/:space:menuentry:space:/ {print " " $2}' /boot/grub2/grub.cfg
UEFI Firmware Settings
Fedora Linux snapshots

which I got from [this askubuntu.com answere](https://askubuntu.com/a/1482769). This, however, lacks the menu entries for booting into Fedora with the available kernels I was looking for. 

I tried to look through /etc/grub2.cfg and the referenced files manually but failed to find the menu entries for booting into Fedora with the installed kernels.

Thanks to [this unix.stackexchange.com answere](https://unix.stackexchange.com/a/609503), referencing [this wiki entry regarding a change in Fedora 30 to "Make BootLoaderSpec-style configuration files the default"](https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault)  , I managed to find the entries in `/boot/loader/entries` as shown below:

ls /boot/loader/entries/

e04d3cc829ea444488ff77bfa0e5c0b1-0-rescue.conf
e04d3cc829ea444488ff77bfa0e5c0b1-6.10.11-200.fc40.x86_64.conf
e04d3cc829ea444488ff77bfa0e5c0b1-6.10.8-200.fc40.x86_64.conf
e04d3cc829ea444488ff77bfa0e5c0b1-6.9.9-200.fc40.x86_64.conf

cat /boot/loader/entries/e04d3cc829ea444488ff77bfa0e5c0b1-6.9.9-200.fc40.x86_64.conf

title Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition)
version 6.9.9-200.fc40.x86_64
linux /vmlinuz-6.9.9-200.fc40.x86_64
initrd /initramfs-6.9.9-200.fc40.x86_64.img
options root=UUID=f8bf1ac3-4b11-4952-9fc8-f9df8932348b ro rootflags=subvol=root rd.luks.uuid=luks-a6b7324c-7cc7-4299-8102-7f607c2099fd rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora


Here, the first line starting with 'title' contained the desired menu entry I was looking for: `Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition)`

I was able to set this entry as default, as described in the documentation, via `grub2-set-default 'Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition)'`After rebuilding the `grub.cfg`, kernel 6.9.9 showed up as the new default in GRUB. Mission success.

**Long story short, I suspect the documentation on how to get the boot menu entry names needs an update.**
In the current Doc for f40 in the section [Changing the Default Boot Entry](https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/#sec-Changing_the_Default_Boot_Entry) it says: > To force a system to always use a particular menu entry, use the menu entry name as the key to the GRUB_DEFAULT directive in the /etc/default/grub file. To list the available menu entries, run the following command as root: > > `~]# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg` **This command outputs nothing on my install!34};/[[:space:]]menuentry[[:space:]]/ {print " " $2}' /boot/grub2/grub.cfg UEFI Firmware Settings Fedora Linux snapshots ``` which I got from [this askubuntu.com answere](https://askubuntu.com/a/1482769). This, however, lacks the menu entries for booting into Fedora with the available kernels I was looking for. I tried to look through /etc/grub2.cfg and the referenced files manually but failed to find the menu entries for booting into Fedora with the installed kernels. Thanks to [this unix.stackexchange.com answere](https://unix.stackexchange.com/a/609503), referencing [this wiki entry regarding a change in Fedora 30 to "Make BootLoaderSpec-style configuration files the default"](https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault) , I managed to find the entries in `/boot/loader/entries` as shown below: ``` # ls /boot/loader/entries/ e04d3cc829ea444488ff77bfa0e5c0b1-0-rescue.conf e04d3cc829ea444488ff77bfa0e5c0b1-6.10.11-200.fc40.x86_64.conf e04d3cc829ea444488ff77bfa0e5c0b1-6.10.8-200.fc40.x86_64.conf e04d3cc829ea444488ff77bfa0e5c0b1-6.9.9-200.fc40.x86_64.conf ``` ``` # cat /boot/loader/entries/e04d3cc829ea444488ff77bfa0e5c0b1-6.9.9-200.fc40.x86_64.conf title Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition) version 6.9.9-200.fc40.x86_64 linux /vmlinuz-6.9.9-200.fc40.x86_64 initrd /initramfs-6.9.9-200.fc40.x86_64.img options root=UUID=f8bf1ac3-4b11-4952-9fc8-f9df8932348b ro rootflags=subvol=root rd.luks.uuid=luks-a6b7324c-7cc7-4299-8102-7f607c2099fd rhgb quiet grub_users $grub_users grub_arg --unrestricted grub_class fedora ``` Here, the first line starting with 'title' contained the desired menu entry I was looking for: `Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition)` I was able to set this entry as default, as described in the documentation, via `grub2-set-default 'Fedora Linux (6.9.9-200.fc40.x86_64) 40 (Workstation Edition)'`After rebuilding the `grub.cfg`, kernel 6.9.9 showed up as the new default in GRUB. Mission success. **Long story short, I suspect the documentation on how to get the boot menu entry names needs an update.**
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
docs-archive/sysadmin-guide#32
No description provided.