Grub not remebering last choice

Hello.
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_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="nowatchdog nvme_load=YES loglevel=3"
GRUB_CMDLINE_LINUX=""

# 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
#GRUB_ENABLE_CRYPTODISK="y"

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

# Uncomment to use basic console
GRUB_TERMINAL_INPUT="console"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT="console"

# 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'
GRUB_GFXMODE="1920x1080x24"

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX="keep"

# 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"
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/usr/share/endeavouros/splash.png"
#GRUB_THEME="/path/to/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.
GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU="y"

# 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.
#GRUB_DISABLE_OS_PROBER="false"

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:

GRUB_SAVEDEFAULT=true

Welcome to the forum! :smile:

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

2 Likes

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.
Here:
https://0x0.st/Hi9Y.txt

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.
#GRUB_DISABLE_OS_PROBER="false"

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?

2 Likes

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
https://0x0.st/HipP.txt

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' {
    savedefault
	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
	else
	  search --no-floppy --fs-uuid --set=root D2C7-C25F
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
5 Likes

Yes thank you. That was the solution :slight_smile:

2 Likes