Connect with us

Hi, what are you looking for?

Linux

How to Change GRUB Boot Order and Timeout on Ubuntu 16.04

How to Change GRUB Boot Order & Timeout period on Ubuntu 16 / Linux Mint 18 . If you used systemd based latest Ubuntu distro and you have installed with Windows OS you need to change GRUB boot order to make Windows as a Default boot option you may required to use this tutorial. The Ubuntu with systemd is totally different from init based system it is fast and secure. You need to follow this tutorial very carefully and follow all the steps.

Step-1 (Switch to root user)
$ su -
Step-2 (Check the order of  OS that is detected by GRUB boot loader)
# grep "^menuentry" /boot/grub/grub.cfg | cut -d "'" -f2

Sample Output

Linux Mint 18 Cinnamon 64-bit
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows 7 (loader) (on /dev/sda1)

Note: check the order of Windows 7 in the above sample output the Windows OS is set to order 4.

Step-3 (Set the default OS)
# grub-set-default 4
Step-4 (Check the default grub OS)
# grub-editenv list

Sample Output

saved_entry=4
Step-5 (Edit the default GRUB configuration file)
# nano /etc/default/grub

Sample output

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

To change the GRUB Default options you need to edit given lines

Advertisement. Scroll to continue reading.
GRUB_DEFAULT=0

change it to

GRUB_DEFAULT=4

To change the GRUB Timeout period you need to edit given lines

GRUB_TIMEOUT=10

change it to

GRUB_TIMEOUT=3
Step-6 (Applying changes to grub.cfg file)
# grub-mkconfig -o /boot/grub/grub.cfg
Step-7 (Update these changes to grub)
# update-grub

Sample output

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Step-8 (Restart now to see changes in effect)
# init 6

Conclusion

Congratulations now you have make changes to your grub files to make changes in grub boot menu and changes in the default timeout period successfully. If you have issues regarding this topic you may need to use the comment section below.

Advertisement. Scroll to continue reading.
Comments
Advertisement
Advertisement

Linux

DNF stands Dandified YUM and this is the default package manager for RHEL 8 / CentOS 8.  This tutorial explains you how to create...

Linux

If you forget a root password of your RHEL 8 and CentOS 8 and want to reset the password so that the RHEL 8...

Windows

How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...

Linux

How to Upgrade WordPress Server from Ubuntu 16.04 to Ubuntu 18.04. Right now, Ubuntu 18.04 has been released with tons of new features. Upgrading...

Linux

How to Enable TLS 1.3 on Nginx Web Server. Nginx is a ultra fast web server optimized for modern web applications and servers. TLS...

Advertisement

You May Also Like

Windows

How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...

Linux

DNF stands Dandified YUM and this is the default package manager for RHEL 8 / CentOS 8.  This tutorial explains you how to create...

Windows

How to download and install the Mobile Intel 4 Series Express Chipset Graphics Drivers for Windows 10.  Windows 10 is the one of the...

Windows

How to Install and Configure PCSX2 on Windows 10. The Windows 10 is the most recommended operating system for the Games. In stream platform...