How to change default OS and timeout of OS selection in dualboot menu?

Hello, everybody!
I’m dualbooting EndeavourOS with Windows 7 x64.
By default Endeavour is booting, but i;d like to change it to Windows 7.
Because it is still my primary OS.

What file should i edit?
Also i’d like to increase timeout, which is offered user for selection.

Happy Friday to all of you!

Are you using grub or systemd-boot?

If it is systemd-boot, you can edit /efi/loader/loader.conf and set default auto-windows and timeout as well.

1 Like

If you are using grub and the filesystem is ext4, edit /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_TIMEOUT=30          # e.g. 30 seconds

and run command

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

This should boot the system you were previously running.

There are other ways too, see https://wiki.archlinux.org/title/GRUB and https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Multiple_entries

1 Like

Yes, it is Grub, default thing for default installation

Thank you very much for such comprehensive answer!
I’ll look into it.

I’ve made changes.
Timeout is applied, but default selection of OS is not.
Also Grub 2:2.12 shows Windows 7 as Windows 10.

If I am not mistaken, this will set the system you are currently booted into as default at next boot:

https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Recall_previous_entry

I would try this instead:

https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Changing_the_default_menu_entry

1 Like
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

This would save the GRUB menu entry you selected and booted into.

For example, if you have Manjaro, Endeavour, and Windows listed as GRUB boot entries and you select Endeavour to boot into then GRUB will save that option when you boot your computer the next time. Now let’s say you select to boot into Windows GRUB will save that entry as the default option until you change it.

Or you can hard code it as @pebcak describes.