Tuesday, November 28, 2023

To setup default kernel in Linux(Fedora)

 

To setup default kernel in Linux(Fedora):

$ sudo grubby --info=ALL | grep -E "^kernel|^index"
index=0
kernel="/boot/vmlinuz-6.5.5-200.fc38.x86_64"
index=1
kernel="/boot/vmlinuz-6.2.15-100.fc36.x86_64"
index=2
kernel="/boot/vmlinuz-5.17.12-100.fc34.x86_64"
index=3
kernel="/boot/vmlinuz-0-rescue-eeca1c676989405b94bedc847e363048"
index=4
kernel="/boot/memtest86+x64.bin"

$ sudo grubby --default-kernel
// this displays the default kernel in your system.

$ sudo grubby --default-title
// this displays the default title

$ sudo grubby --default-index
// this displays the default index.


==

$ sudo grubby --set-default-index=2
The default is /boot/loader/entries/eeca1c676989405b94bedc847e363048-5.17.12-100.fc34.x86_64.conf with index 2 and kernel /boot/vmlinuz-5.17.12-100.fc34.x86_64

$ sudo grubby --default-title
Fedora (5.17.12-100.fc34.x86_64) 34 (Workstation Edition)
 

 

 

No comments:

Post a Comment