A lot in the booting mechanism has changed ever since Grub2 has been introduced in the scene. Earlier methods of tinkering around with the bootloader as in Grub1 are nt valid for Grub2. Well, it happens that I dual boot my laptop with Windows and Fedora Linux where Fedora Linux is the first in the boot order followed by Windows and other fedora options. Now since I am getting a new laptop, I decided to give this one to my Mom without removing the Fedora and making Windows 7 the default boot option.
So here is how you can change the default default boot order of entries / operating systems in Grub2 and also change the default time duration for the Grub2 boot selection menu to be displayed, before it proceeds with booting into the default option.
1. First You have to edit the /etc/default/grub file which is the settings file for Grub2.
2. In this file you will have two settings directives - GRUB_TIMEOUT and GRUB_DEFAULT. As the names suggest, the GRUB_DEFAULT parameter controls which Operating System should be selected by default in the Grub2 OS boot menu. You can change it as per your requirements. The OS choice menu in Grub2 is numbered from 0 which means, if you want to select the second OS in the menu as default, you have to set the value of GRUB_DEFAULT to 1.
3. Now, in order to change the the time duration for which you want to show the OS choices list at Grub 2 during boot up time, you have to just set the value for the GRUB_DEFAULT parameter. Setting a value of 10 makes the Grub 2 boot choice screen show for 10 seconds and setting the value to 0 will not show the Grub 2 boot screen at all.
4. Finally you have to regenerate Grub 2 in order to let the settings take effect. This can be done using the following command:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
If you have been using Ubuntu for sometime then you might have used the command update-grub shown below, unfortunately that would not have worked on Fedora.
Related Posts by Tags: boot, Fedora, grub, grub2