Hide GRUB menu while dual booting For newer versions of Ubuntu
This solution was tested on Ubuntu 18.04 LTS.
You can still open GRUB menu by pressing shift key while booting. Otherwise it will automatically open choosen system.
To do that you need to make changes in file /etc/default/grub. However after updating GRUB settings the changes won't be visible due to one of scripts which is used to generate final file. That's why you need to make additonal changes. I recomend to backup 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 default system in parameter:
GRUB_DEFAULT=0
Where the bolded number corresponds to options sequence in GRUB menu.
- You have to edit script 30_os-prober which overwrite these changes while dual booting. The scripts used along with /etc/default/grub while doing update-grub can be found at /etc/grub.d.
sudo nano /etc/grub.d/30_os-prober
Around line 30 in this file in function:
adjust_timeout () {
if [ "$quick_boot" = 1 ] && [ "x${found_other_os}" != "x" ]; then\
You need to comment these line by adding # at the beginning.
#set timeout_style=
#if [ "${timeout}" = 0 ]; then
#set timeout=10
#fi
- After doing that you need to generate new grub.cfg file.
sudo update-grub
- You can check if these line are commented by checking new generated file grub.cfd
cat /boot/grub/grub.cfg
- Now you can reboot your computer and check if changes work.
Link to answer