On 08/01/2023 01:40, Sam Varshavchik wrote:
Can anyone try using grubby --set-default to change the default boot
kernel to something other than the most recently-installed kernel,
successfully?
It tells me that it obeys my request, and grubby --info=DEFAULT shows
that the default boot kernel is what I specified.
But at boot the grub menu still highlights the most recently installed
kernel, and that's what boots by default.
What I do is this;
[root@armf37 ~]# grubby --info=ALL
index=0
kernel="/boot/vmlinuz-6.0.17-300.fc37.aarch64"
args="ro rootflags=subvol=root rhgb quiet"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-6.0.17-300.fc37.aarch64.img"
title="Fedora Linux (6.0.17-300.fc37.aarch64) 37 (KDE Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-6.0.17-300.fc37.aarch64"
index=1
kernel="/boot/vmlinuz-6.0.16-300.fc37.aarch64"
args="ro rootflags=subvol=root rhgb quiet"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-6.0.16-300.fc37.aarch64.img"
title="Fedora Linux (6.0.16-300.fc37.aarch64) 37 (KDE Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-6.0.16-300.fc37.aarch64"
index=2
kernel="/boot/vmlinuz-0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4"
args="ro rootflags=subvol=root rhgb quiet"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4.img"
title="Fedora Linux (0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4) 36 (KDE
Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-0-rescue"
Then I pick the kernel by index, because its easier to type:
[root@armf37 ~]# grubby --set-default-index=1
The default is
/boot/loader/entries/ce79604f5b5945f28b6a37ac66f4ffc4-6.0.16-300.fc37.aarch64.conf
with index 1 and kernel /boot/vmlinuz-6.0.16-300.fc3
7.aarch64
This has always worked for me.
But in testing this on my f37 upgraded from f36 index 1 flipped to
booting the f36 5.17 kernel!
That is not in the list above you will notice. I found that
/boot/grub2/grub.cfg had the 5.17
kernel in a menuentry section becuase of /etc/grub.d/10_linux (?!?!?!)
To fix that I did:
[root@armf37 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
To remove rhgb and quiet I do this:
[root@armf37 ~]# grubby --update-kernel=ALL --remove-args=rhgb\ quiet
[root@armf37 ~]# grubby --info=ALL
index=0
kernel="/boot/vmlinuz-6.0.17-300.fc37.aarch64"
args="ro rootflags=subvol=root"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-6.0.17-300.fc37.aarch64.img"
title="Fedora Linux (6.0.17-300.fc37.aarch64) 37 (KDE Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-6.0.17-300.fc37.aarch64"
index=1
kernel="/boot/vmlinuz-6.0.16-300.fc37.aarch64"
args="ro rootflags=subvol=root"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-6.0.16-300.fc37.aarch64.img"
title="Fedora Linux (6.0.16-300.fc37.aarch64) 37 (KDE Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-6.0.16-300.fc37.aarch64"
index=2
kernel="/boot/vmlinuz-0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4"
args="ro rootflags=subvol=root"
root="UUID=2b7a3341-3b66-42c2-bc12-6c4d58c58957"
initrd="/boot/initramfs-0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4.img"
title="Fedora Linux (0-rescue-ce79604f5b5945f28b6a37ac66f4ffc4) 36 (KDE
Plasma)"
id="ce79604f5b5945f28b6a37ac66f4ffc4-0-rescue"
Barry
_______________________________________________
users mailing list --users(a)lists.fedoraproject.org
To unsubscribe send an email tousers-leave(a)lists.fedoraproject.org
Fedora Code of
Conduct:https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List
Guidelines:https://fedoraproject.org/wiki/Mailing_list_guidelines
List
Archives:https://lists.fedoraproject.org/archives/list/users@lists.fedora...
Do not reply to spam, report it:https://pagure.io/fedora-infrastructure/new_issue