0

Every time Grub updates (at least I think this is the trigger), it resets the default menu entry in grub.cfg from 3 (Windows) to 0 (Ubuntu).

I want Windows to be default one, without changing grub.cfg after every update.

Is there a way to prevent this behaviour, or, if no, at least revert changes with some scripting?

Thanks.

vooxo
  • 3

1 Answers1

0

The grub defaults are defined in /etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
... 

Open this file with your favourite editor (must be root or sudo), change GRUB_DEFAULT=3, save the file and run sudo update-grub.

For a more detailed (better) answer see this older post: How do I set Windows to boot as the default in the boot loader?

ridgy
  • 2,356