Change default GRUB boot option

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
nitrub
Level 1
Level 1
Posts: 2
Joined: Sun Feb 27, 2011 9:37 am

Change default GRUB boot option

Post by nitrub »

Under ubuntu I used startupmanager, but under linux mint 12RC it doesnt work for me, it changed the timeout time but didnt change my default boot option to windows 7 as I chose.

User avatar
richyrich
Level 19
Level 19
Posts: 9063
Joined: Mon May 04, 2009 8:31 pm

Re: Change default GRUB boot option

Post by richyrich »

There was a recent post about this, can't find it right now, it had something to do with finding and changing just the menu number of GRUB_DEFAULT=

(The configuring grub section)
https://help.ubuntu.com/community/Grub2

cwsnyder
Level 6
Level 6
Posts: 1242
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: Change default GRUB boot option

Post by cwsnyder »

First, I would like to note that you can only choose the position of the starting choice under GRUB. If, for example, you saw that Windows 7 was the third from the top of the GRUB menu, you can go into /etc/default/grub by entering in terminal the following:

Code: Select all

gksudo gedit /etc/default/grub
after entering your password, modify the line that originally reads GRUB_DEFAULT=0 to one less than the line which appears on the GRUB menu, using our example, you would change this to GRUB_DEFAULT=2. Save and exit, then run in terminal the line

Code: Select all

sudo update-grub
and give your password to update your GRUB menu.

Your default should now be whatever is the 3rd selection in GRUB.

What happens when you receive a Linux Kernel update? The default now points to your old Kernel listing in GRUB, not to Windows. Time to make a choice.

You can now choose whether

option-1 to not have the option of dropping back to an older copy of the kernel in case of regression problems, to manually choose Windows until you are sure the new kernel will work, or

option-2 to learn how to modify CORRECTLY the boot.ini, etc. on your Windows partition (using BCDEdit or something similar) such that it points to your Linux partition GRUB as an alternative after your Windows loader clobbers GRUB in the boot sector during the next Windows update or re-installation of Windows, or

option-3 You might try learning enough about GRUB 2 to figure out how to get Windows as your first entry in the GRUB menu, or

option-4 You might choose to make either your Linux install or your Windows install a virtual machine (or WUBI install) and avoid the hassle of dual-boot.

If there is a 5th option, I am presently unaware of it.
LMDE Mate 64-bit, LM17.3 Cinnamon 64-bit
Debian Mate 64-bit, Xubuntu xenial 64-bit, Ubuntu-Mate 14.04 64-bit, Antergos Xfce 64-bit, PCLinuxOS Mate 64-bit

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Change default GRUB boot option

Post by Aging Technogeek »

Option five is to do the same thing you did originally and increase the "Grub Default" from 2 to 3 (or whatever the correct number is). Now it again points to Windows as the default OS. Windows will boot automatically and the older kernel version is still available if needed.
Registered Linux User 483387

User avatar
Roken
Level 5
Level 5
Posts: 738
Joined: Fri Nov 19, 2010 4:55 pm
Location: Warrington, UK

Re: Change default GRUB boot option

Post by Roken »

An alternative method is to change the following in /etc/default/grub:

Code: Select all

GRUB_DEFAULT=saved
and add

Code: Select all

GRUB_SAVEDEFAULT=true
And then

Code: Select all

sudo update-grub
This will automatically save the last booted OS as the default for the next boot. If you select a different OS, then that will become the new default.
Kernel Linux Tex 4.8.13-1-ARCH (64 bit) xfce , burg
Arch
GTX680 4Gb
OSS4
AMD Phenom II X4 (965BE) @ 3.6 Ghz
8Gb RAM

Post Reply

Return to “Installation & Boot”