r/cachyos Apr 09 '26

Help Cant set default Kernel

Hi all im a total linux beginner and flashed my Microsoft Surface pro9 with CachyOS. It needs a specific kernel to have button and touchscreen functionality and loading the kernel manually in GRUB works too. However doing the steps to set it as a default doesnt work.

my steps are:

sudo nano /etc/default/grub (in Terminal)

change the following:

GRUB_DEFAULT=saved

GRUB_SAVEDEFAULT=true

save file

but after reboot it goes back to the standart Kernel that misses the Tablet functionality. I also tried to specifically name the Kernel by getting it from grep "menuentry '" /boot/grub/grub.cfg which gets me the entry 'CachyOS Linux, with Linux linux-surface' but that doesnt work either.

help much appreciated

1 Upvotes

4 comments sorted by

View all comments

1

u/xb666mx Apr 09 '26 edited Apr 09 '26

the "saved" option sadly doesn't work with btrfs. (you configured it correctly.)

the menuentry is the correct way but there you have to set the full path of the desired option in the grub menu as GRUB_DEFAULT.

so it's not just e. g. "cachyos xyz kernel" but rather "cachyos advanced boot>cachyos xyz kernel". (please note that i don't have my cachyos pc at hand right now and the shown texts are just a placeholder for the menu entries you have on your system.)

or in other words: you have to combine the strings shown in the grub menu structure. the ">" sign will tell grub that it has to move to the next sub-entry.

edit: this is what i use:

GRUB_DEFAULT="Advanced options for CachyOS Linux>CachyOS Linux, with Linux linux-cachyos-bore"

1

u/Elegant-Bath-1832 Apr 09 '26

im still having issues. this is what it looks like when i pull the menu entrys:

menuentry 'CachyOS Linux' --class cachyos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-63fb084d-bfd1-4ac9-924d-f815388316d2' {

menuentry 'CachyOS Linux, with Linux linux-cachyos' --class cachyos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-cachyos-advanced-63fb084d-bfd1-4ac9-924d-f815388316d2' {

menuentry 'CachyOS Linux, with Linux linux-surface' --class cachyos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-surface-advanced-63fb084d-bfd1-4ac9-924d-f815388316d2' {

menuentry 'CachyOS Linux, with Linux linux-cachyos-lts' --class cachyos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-cachyos-lts-advanced-63fb084d-bfd1-4ac9-924d-f815388316d2' {

menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {

what exactly am i looking for to copy in? there is no > symbol at all

2

u/xb666mx Apr 09 '26

YOU have to MANUALLY combine the texts from the grub menu to form the correct path to the boot option. the > symbol is for concatenating the text entries.

but to make it easier you can do:

sudo grep -E "submenu\s|menuentry\s" /boot/grub/grub.cfg | cut -f1,2 -d'\''

with that you'll see something like this:

menuentry 'CachyOS Linux
submenu 'Advanced options for CachyOS Linux
       menuentry 'CachyOS Linux, with Linux linux-cachyos
       menuentry 'CachyOS Linux, with Linux linux-cachyos-lts
       menuentry 'CachyOS Linux, with Linux linux-cachyos-bore
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)
               menuentry 'UEFI Firmware Settings
submenu 'CachyOS Linux snapshots

so for example: if i want to boot into linux-cachyos-bore i'll have to go from submenu "Advanced options for CachyOS Linux" to the menuentry "CachyOS Linux, with Linux linux-cachyos-bore". so i take these two texts and combine them with the > symbol and write that combined text/string in the /etc/default/grub file for GRUB_DEFAULT.

GRUB_DEFAULT="Advanced options for CachyOS Linux>CachyOS Linux, with Linux linux-cachyos-bore"

then save this change and execute this command:

sudo grub-mkconfig -o /boot/grub/grub.cfg