Grub 2 Set Default Boot Option

Here is something I found the need to do the other day.  I needed to change the default option on my grub 2 setup.

First you will need to know the menu item title you want to set grub 2 to boot to.

Open the /etc/grub2.cfg file to get a look at your grub menu items.

su -c 'vi /etc/grub2.cfg'

Do not make changes.

Look for entries like the line below…

menuentry 'Fedora Linux, with Linux 3.1.6-1.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {

The 'Fedora Linux, with Linux 3.1.6-1.fc16.x86_64' is an example of a menu item title.

Now copy the menu item title you want grub 2 to use as the default, and use it in the command below.

su -c 'grub2-set-default "menu title item"'

or as an example

su -c 'grub2-set-default "Fedora Linux, with Linux 3.1.6-1.fc16.x86_64"'

Now restart and it should boot to the menu option you chose.

About these ads

2 responses to “Grub 2 Set Default Boot Option

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: