After that change during boot chosen default system will be opened without going through GRUB menu.\
Note
You can still open GRUB menu by pressing Shift
key while booting.
You need to make changes in /etc/default/grub
file. However after updating GRUB settings the changes won't be visible because of the script that is used by the system to generate final version of the file. That's why you need to make additonal changes, as described below.
Important
Remember to backup your files in case something went wrong
Here are the steps you need to do:
- Edit grub file.
sudo nano /etc/default/grub
You need to edit these two parameters:
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
You can choose a system that will be used as default by adding changing parameter:
GRUB_DEFAULT=<number>
Where the <number>
corresponds to number of the option in GRUB menu.
- Edit script
30_os-prober
. While running with dual boot and executingupdate-grub
this script takes values from/etc/default/grub
and overwrites changes introduced in previous steps. Therefore we need to modify it.
sudo nano /etc/grub.d/30_os-prober
Inside this script file (around line 30) you will find definiton of the following function:
adjust_timeout () {
if [ "$quick_boot" = 1 ] && [ "x${found_other_os}" != "x" ]; then
In order to aviod overriding timeout settings you need to comment the following lines:
(comment character for shell script is #
)
#set timeout_style=
#if [ "\${timeout}" = 0 ]; then
#set timeout=10
#fi*
Remember to save changed file.
- Run GRUB update command to generate new grub.cfg file.
sudo update-grub
- You can verify if the changes worked by checking the content of the new
grub.cfd
cat /boot/grub/grub.cfg
- Now you can reboot and check if everthing works as expected
"You can still open GRUB menu by pressing shift key while booting."
Does this work for you? Not for me by some reason (continuously pressing left shift)