Saturday, April 13, 2013

Setting Default Entry - GRUB 2 Configuration On BIOS Systems (Fedora 18 - Windows 7 Dual Boot)


In this tutorial I am going to show how to set the default entry in GRUB 2 in my Fedora 18 - Windows 7 dual boot system.
I already had Windows 7 in my system. I decided to start using Fedora 18. So I installed F18 in my system but found out that F18 boots default. I want Windows 7 to load by default because other users in my system is not familiar with this OS. So I changed the default entry in GRUB 2 according to the following.
Note that you need to be root to apply the following command.



Check your current default menu entry
# grub2-editenv list
Example Output:
saved_entry=Windows 7 (loader) (on /dev/sda1)


To list all possible menu entries
# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
Example Output:

Fedora
Windows 7 (loader) (on /dev/sda1)
Windows Recovery Environment (loader) (on /dev/sda6)


Now set the desired default menu entry
# grub2-set-default
Note that you have to single quote ' the entry as below from the output of the previous command.
Example Command:
# grub2-set-default 'Windows 7 (loader) (on /dev/sda1)'

After setting the new entry use the following command to check the new default menu entry
# grub2-editenv list

Now restart your computer to check the result.

No comments:

Post a Comment