Tuesday, July 16, 2013

Change the default Operating System in start up boot menu

Fedora 18

Make sure you've logged in as root to the Fedora Environment.

1. Open /etc/default/grub and ensure this line exists:

   GRUB_DEFAULT=saved

2. Now list all possible menu entries

   #grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
   Look for the line which shows the OS you wish to make default and write it down as it is.
    eg. Windows XP Professional (/dev/sda1)

3. Now set the desired default menu entry within single inverted commas

  #grub2-set-default
  eg. grub2-set-default 'Windows XP Professional (/dev/sda1)'

4. Apply the change to grub.cfg by running:

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

5. Verify the default menu entry
   #grub2-editenv list
    If everything went normal the resultant line will show the 'menu-entry' given by you.

6. Reboot by typing
   #reboot


No comments: