How to Change GRUB Boot Order & Timeout on Ubuntu 16 / Linux Mint 18

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

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.

Hot Right Now

Related Post

Develop New SysAdmin Skills with E-books (FREE Download)

COMMENTS