Grub not remebering last choice

I have EndavourOS on NvMe and Windows 10 on other SSD. All works. I can boot to both systems. But No matter what I try it won’t remember last choice in grub. It always boot up to first choice that is EndavourOS.

Here is my /etc/default/grub after I changed it I ran sudo grub-mkconfig -o /boot/grub/grub.cfg
Tried multiple versions with multiple quotings etc. nothnig seems to have effect

# GRUB boot loader configuration

GRUB_CMDLINE_LINUX_DEFAULT="nowatchdog nvme_load=YES loglevel=3"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.

# Uncomment to use basic console

# Uncomment to disable graphical terminal

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'

# Uncomment to allow the kernel use the same resolution used by grub

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"

# Uncomment to disable generation of recovery mode menu entries

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.

# Uncomment one of them for the gfx desired, a image background or a gfxtheme

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

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

# Uncomment to disable submenus in boot menu

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.

Basically it’s allways same answers even on Arch forums and it looks like it doesn’t works for me. Any help and idea would be appreciated. Thanks.

My only hint would be removing the quotes around this:


Welcome to the forum! :smile:

You might have a filesystem (btrfs?) that does not support the savedefault feature.
The ext4 filesystem supports it.


Didn’t helped. Tried that now again :frowning: Ran sudo grub-mkconfig -o /boot/grub/grub.cfg after changes

Hello, thank you :slight_smile:
I’ve red about that somewhere but no. I have ext4. Screenshot for proof. Other disks are NTFS. I just let installer do it’s magic. Didn’t changed anything. That’s why I’m confused what could be the problem

Have you updated your grub.conf?

Edit: apparently you did… so the issue seems strange.
Unless you are actually using another bootloader… :wink:

Can you show the output of

lsblk -fm | eos-sendlog

Yep that’s why I’m writing here. Can’t figure it out with google.
I’ve choosen grub during instalation because that was one I was sort of familiar with.

Just to be 100% certain that you are using GRUB as your bootloader, what does this command return?

grub-install --version

1 Like
$ grub-install --version
grub-install (GRUB) 2:2.06.r456.g65bc45963-1

1 Like

Yep, you’re using grub :+1:.

1 Like

Does your Windows install show up in your grub menu?

Yes it is there as last option under “UEFI config something” and I can boot into it without problems. But when I restart or shutdown form windows. Next boot will goes to Endavour because pointer (highlighted line) is on EndavourOS

I’m not so sure that you’re looking at a grub menu.

Your grub file, as posted in the first post, shows this:

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.

That shows os-prober as being disabled, so grub will not find or display any other operating system.

That only means that package grub is installed. It doesn’t mean it is being used.

When you choose grub, we add an entry for Windows without os-prober so that would be normal.

@pantas, can you share a photo of the boot menu you get so we can get an idea of what is going on?


I was going off of this:

I would think that would mean the installer, you know…installed grub as the bootloader?

Ah I didn’t know that.

1 Like

This is the best way to solve this mystery. We really need to see the menu. I think he might be using systemd-boot.

Well. It says there GNU GRUB

Would like not to loose access to that system if we try something wild :slight_smile:

Can you post the contents of /boot/grub/grub.cfg

used that upload tool for better view. If it’s ok

OK, I think I see what the issue is here.

It isn’t saving Windows because the entry for Windows isn’t getting updated.

Edit the windows config in /etc/grub.d/45_eos_windows and add savedefault at the top like this:

menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-D2C7-C25F' {
	insmod part_gpt
	insmod fat
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  D2C7-C25F
	  search --no-floppy --fs-uuid --set=root D2C7-C25F
	chainloader /efi/Microsoft/Boot/bootmgfw.efi

Yes thank you. That was the solution :slight_smile: