GRUB_DEFAULT default (not a typo)

Tom H tomh0665 at gmail.com
Sun Apr 7 10:19:03 UTC 2013


On Sat Apr 6 09:24, Basil Chupin wrote:
> On 05/04/13 03:56, Tom H wrote:
>> On Thu, Apr 4, 2013 at 11:46 AM, Kevin O'Gorman <kogorman at gmail.com> wrote:
>>>
>>> I've been following another discussion, "Changing grub default boot order"
>>> and took a look at /etc/default/grub, where the line
>>> GRUB_DEFAULT=saved
>>> appeared. I don't think I put that there, but I could not swear to it. I
>>> seem to recall that this setting used to cause GRUB to remember the last
>>> entry used and to use it again by default. That is not happening on my
>>> machine, a fresh Xubuntu install of 12.04.
>>>
>>> Instead, GRUB always defaults to entry 0, and I have to change it to entry 5
>>> because entry 0 is bogus, GRUB having picked up some historical artifacts
>>> and put them in the menu.
>>>
>>> This seems weird. Should it work? Should it even be allowed? It has
>>> persisted through several kernel upgrades, so it has not caused great
>>> mischief....
>>
>> AFAIK Ubuntu's default is "GRUB_DEFAULT=0" (it's upstreams's default).
>>
>> "GRUB_DEFAULT=saved" is useful/functional if you've used
>> "grub-set-default" or "grub-reboot" to set the default grub entry or
>> if you've set "GRUB_SAVEDEFAULT=true" (which is unset by default and
>> which you need to set in order for grub ro re-use the last menuentry
>> choice).
>
> I have never, ever, fiddled with these settings and yet I can see that
> GRUB_DEFAULT is set to "saved" and not to some numeric value (except
> where I have now set it in 2 places to the value of "2" to boot into the
> second OS installed on my system). But this doesn't mean that you are
> not correct when you state that "0" is the default setting 'upstream'.

The Ubuntu default is "GRUB_DEFAULT=0" whether you claim to have
"fiddled" with "/etc/default/grub" or not. You say that you have more
than one distro installed. Is one of them Fedora (its default's
"GRUB_DEFAULT=saved")?

"/etc/default/grub" is created by the grub-pc postinst script. It's
copied from "/usr/share/grub/default/grub" (installed by grub2-common)
and GRUB_DEFAULT isn't changed from "GRUB_DEFAULT=0" in
"/usr/share/grub/default/grub".




More information about the ubuntu-users mailing list