changing default grub entry??

Tom H tomh0665 at gmail.com
Fri Oct 12 13:45:19 UTC 2018


On Fri, Oct 12, 2018 at 1:12 PM Grizzly via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
> 12 October 2018 at 8:48, robert wrote:
>>
>> I would like to have the 9th entry of the list that is displayed when
>> I boot, to be default.
>
> Try add/or edit to
>
> GRUB_DEFAULT=saved
> GRUB_SAVEDEFAULT=true
>
> Then whatever you "last" used will be default next time

You can use "GRUB_DEFAULT=saved" in two ways.

1) You set "GRUB_DEFAULT=saved" and "GRUB_SAVEDEFAULT=true", then
whichever kernel that you're booted from becomes the default after you
run "update-grub" or equivalent.

2) You set "GRUB_DEFAULT=saved" and run "grub-set-default
<kernel_entry_in_grub.cfg>".

kernel_entry_in_grub.cfg can be the entry number ("9") or the menu
name ("Ubuntu, with Linux 4.18.0-8-generic").

I think that you can also use the "$menuentry_id_option"
("gnulinux-4.18.0-8-generic-advanced-2653b879-3c02-4d05-a678-315259e0e11f").

In addition to the weird counting that I showed in my first reply, you
can also avoid "saved" and set GRUB_DEFAULT using the title or the
menuentry_id_option:

GRUB_DEFAULT="Ubuntu, with Linux 4.18.0-8-generic"
or
GRUB_DEFAULT="gnulinux-4.18.0-8-generic-advanced-2653b879-3c02-4d05-a678-315259e0e11f"


>> this is what I tried (and failed):
>
>> 1. in /etc/default/grub
>>
>> GRUB_DEFAULT=9
>> #GRUB_HIDDEN_TIMEOUT=0
>> GRUB_HIDDEN_TIMEOUT_QUIET=true
>> GRUB_TIMEOUT=10
>> GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
>> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
>> GRUB_CMDLINE_LINUX=""
>> 2. update-grub




More information about the ubuntu-users mailing list