`Windows Boot Manager` menuentry missing `savedefault` option in `/etc/grub.d/45_eos_windows` and `/boot/grub/grub.cfg`

I set up the file /etc/default/grub such as the grub boot menu remembers and highlights the last OS I chose to boot.

In /etc/default/grub, I activated the following parameters

GRUB_DEFAULT=saved
[...]
GRUB_SAVEDEFAULT=true

and then ran grub-mkconfig -o /boot/grub/grub.cfg.

It works when I boot a Linux menuentry but it doesn’t work when I boot the ‘Windows Boot Manager’ menuentry because /etc/grub.d/45_eos_windows is missing the option savedefault.

Which leads to /boot/grub/grub.cfg missing that same option for the corresponding menuentry as /etc/grub.d/45_eos_windows is part of it.

Here is /etc/grub.d/45_eos_windows:

#!/bin/sh
exec tail -n +3 $0

menuentry 'Windows Boot Manager [...] {
	insmod part_gpt
	insmod fat
        [...]
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

How do I fix this ?

Can I manually add the savedefault option in /etc/grub.d/45_eos_windows without breaking anything ?

Like so:

#!/bin/sh
exec tail -n +3 $0

menuentry 'Windows Boot Manager [...] {
    savedefault
	insmod part_gpt
	insmod fat
        [...]
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

That file is written by the installer so it is OK for you to modify it. Just make sure your syntax is correct for whatever changes you make.

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