Grub save default not working for me : /

I tried using grub save default to save default grub menu entry based on my previous selection,
but following guides online it’s not working in endeavorOS

anyone know the correct syntax to get this working?

i have

GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=‘saved’

1 Like

Are you using btrfs? If so, grub doesn’t support that option with btrfs.

If you want to set a specific kernel to the default you can use something like this:

GRUB_TOP_LEVEL=/boot/vmlinuz-linux-lts

That would set the LTS kernel default for example.

2 Likes

sweet thank you I will try that

No btrfs for me I’m using f2fs

edit: GRUB_TOP_LEVEL=‘/boot/vmlinuz-linux67-tkg-pds’

that worked thank you ; D

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

isn’t just GRUB_SAVEDEFAULT=true then? (not sur it would change anything actually…)

f2fs is probably the same. Grub only can write a very small number of filesystems.

1 Like

I take it from reading the section you quoted in /etc/default/grub
that we need

GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=‘saved’

both of these settings, and I think I actually tried altering the syntax in the past,
and following multiple different people’s advice to get this working, and never could.

is it GRUB_SAVEDEFAULT=‘true’ (?)
and
GRUB_DEFAULT=‘saved’ (?)

or other choices? I don’t know I briefly tried troubleshooting it awhile ago,
and couldn’t figure out the exact details.

GRUB_DEFAULT=‘saved’

I would try without that line (so just GRUB_SAVEDEFAULT=true)

edit
cause I can’t read (…ok… and an idiot)
so yeah both with GRUB_DEFAULT=saved
:purple_heart:@dalto

You need both.

From the config file:

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true
1 Like

indeed !

so

GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved

The only thing is that it only works with certain filesystems. Namely, filesystems which grub is capable an environment block to.

1 Like

Even if / is btrfs but /boot/efi is fat32 (and /boot ext4 (but that’s just for the config files of grub, not the actual loader right?)) then GRUB should be “happy” …or?

wow thank you guys for your help

I didn’t consider that that could be a problem

I was convinced I wasn’t using the right configuration or syntax

I do have an ext4 /boot a fat32 /boot/efi with an f2fs root

BUT it’s on an nvme type ssd drive. In fact in my experience lots of different interconnected systems can cause issues ultimately when one configuration doesn’t line up with everything else, so the whole configuration needs to be considered to actually figure these things out appropriately

1 Like

It should work if you have an ext4 /boot

ah, so it’s this part that grub has to “like”…

(I just need to not use grub anymore in my case anyway, it’s been 10 times I said I’ll move… mmmmèèèh…)

Usually, we mark as solution, the very post that actually has given or pointed to solution.

In this case please mark @dalto’s post as solution!

Thank you and welcome to EnOS’ community @LinuxGaming312 !

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.