This tutorial is for those who wish to hide GRUB boot menu and instead boot into any specific Operating System.
Take for instance, you have installed Ubuntu. So, each time you boot into your computer you’ll be prompted with a GRUB menu which will list the options like – “Ubuntu”, “Windows 8” and some other options which you can choose by using your arrow buttons on keyboard.
Let’s say you don’t always like to get that menu and straight away boot to windows or Ubuntu. This tutorial will guide you how to achieve that.
Note: –
This tutorial involves editing of system files so backup the all the files you edit, so that you can restore them if anything goes wrong.
I’ll be using Ubuntu 14.04 LTS for this tutorial
We’ll basically edit the file: /etc/general/grub
open terminal and issue these commands

su -

give the password of root

vim /etc/general/grub

Expecting you have a fair understanding of using vim
If you are new to vim, DO NOT USE VIM rather use GEDIT

gedit /etc/general/grub

Now, Open a new tab in terminal – Ctrl+Shift+T
If you still havent unlocked your ROOT user in ubuntu this is how you do it. I hope you understand and realize the responsibilities and rights that a ROOT user is required to keep in mind 🙂

su

password: <your password>

pwd

 the output will be /home/<user>

passwd

 Enter and retype new UNIX password

ctrl-d to logout
Now,

su -
password: <root-password-set-in-previous step>
pwd
output will be /root/

Again switch to root user

su -
cat /boot/grub/grub.cfg | grep menuentry

we are opening grub.cfg to read its content and find the word menuentry. This is because all the options present in the GRUB boot menu are listed here with the lable menuentry.

You’ll find lines like these: –

menuentry 'Ubuntu' --class ubuntu --class gnu-linux
menuentry 'Windows 8 (loader) (on /dev/sda1)'

These represent the menu options. The phrases or the words wrapped with ‘ ‘ are what you see le ‘Ubuntu’ or ‘Windows 8 (loader) (on /dev/sda1)’ etc.

Suppose you wish to make Windows 8 as your default OS. So that you’d boot into Windows 8 without showing GRUB boot menu.
Now, switch to the previous tab in which we have opened grub.cfg file in vim or if you have used gedit to open that file open bring gedit to front, we’ll be editing that now.
Just check and edit these setting’s only carefully.

GRUB_DEFAULT="Windows 8 (loader) (on /dev/sda1)"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="false"
GRUB_TIMEOUT="1"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Note:
# is used to comment a line
Now if you are in vim : –

Esc + :
wq

to write to file and quit

If using gedit use CTRL + S to save the file and the quit gedit.
Now as root : –

grub-update

Kudos, you are done. Now when you’ll boot your system you’ll be directly taken to windows OS.

Anytime to Boot into Ubuntu use this method, it works always : –

  • Keep on pressing F8 during boot (From starting of your system)
  • When you get the screen in which you are prompted to select the boot disk, choose your hard disk and immediately press and hold shift

Optional : keep on smashing F8 key, since sometimes shift key alone does not work.

You must be in Ubuntu. This is the simplest way I use to hide GRUB menu. Hope this helps you.
Similarly changing the grub default to ‘Ubuntu’ Will directly boot you into Ubuntu.

GRUB_DEFAULT="Ubuntu"

Enjoy your dual boot system.
If you stumbled upon any step, do mention in comments, I’ll try my best to answer your queries.
Never forget to share this article with your friends.

Add your valuable thoughts to the discussion

Notify of
avatar
Sort by:   newest | oldest | most voted
linux
Guest

Great post !! Thanks.

wpDiscuz