Changing default menuentry in GRUB2

Initially i had to hit the arrow keys while GRUB menu comes, to choose windows or any other in list… had i been late by few seconds, and fedora, by default  starts booting by default, i have to press the CLTR+ALT+DEL for reboot…

GRUB menu

Finally i decided to change the default menuentry to windows or whatever  you want use frequently…

first let us know something about GRUB…

GRUB stands for GRand Universal Bootloader. It is a very powerful bootloader that can load a variety of operating systems.

if u want a detailed information then click at

The grub2 is configured using grub.cfg file , located in /boot/grub2/ for our case.

This file is generated itself using grub2-mkconfig command.This file gives the listing of all the operating systems available for booting.

Steps are:

1. Just copy the whole windows string within the inverted commas and

2. Paste it in the file /etc/default/grub – default entry section. and finally

3. Update the grub file using grub2-mkconfig command…

$ vim /boot/grub2/grub.cfg

menuentry “Windows 7 (loader) (on /dev/sda1)” –class windows –class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos1)’
        search –no-floppy –fs-uuid –set=root 085659935659827C
        chainloader +1

copy the “Windows 7 (loader) (on /dev/sda1)


$vim /etc/default/grub

GRUB_DEFAULT=”Windows 7 (loader) (on /dev/sda1)”
GRUB_CMDLINE_LINUX=” rd.lvm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8″

Paste it in the default section.

$ grub2-mkconfig -o /boot/grub2/grub.cfg

This command will update the default menuentry to Windows 7…

Next time you boot the system, windows 7 will start after the “timeout”  time specified. 

No need to stay alert at the grub menu occurance if u want to start windows.. 🙂



About Shantanu Sharma

Currently working as Software R&D member in Samsung R&D India.

Posted on June 27, 2012, in Linux and tagged , , , . Bookmark the permalink. 2 Comments.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s