changing default grub entry??

Ralf Mardorf silver.bullet at zoho.com
Fri Oct 12 07:22:01 UTC 2018


On Fri, 12 Oct 2018 08:48:37 +0200, robert wrote:
>I would like to have the 9th entry of the list that is displayed when
>I boot, to be default.
>
>this is what I tried (and failed):
>
>1. in /etc/default/grub
>
>     GRUB_DEFAULT=9

There might be an additional issue, however, to make the 9th entry the
default, the number must be

       GRUB_DEFAULT=8

since the 1st entry gets the number 0 and _not_ 1.

Take a look at the GRUB manual:

"Valid keys in /etc/default/grub are as follows:

‘GRUB_DEFAULT’

    The default menu entry. This may be a number, in which case it
    identifies the Nth entry in the generated menu counted from zero,
    or the title of a menu entry, or the special string ‘saved’. Using
    the id may be useful if you want to set a menu entry as the default
    even though there may be a variable number of entries before it.

    For example, if you have:

    menuentry 'Example GNU/Linux distribution' --class gnu-linux --id
    example-gnu-linux { ...
    }

    then you can make this the default using:

    GRUB_DEFAULT=example-gnu-linux

    Previously it was documented the way to use entry title. While this
    still works it’s not recommended since titles often contain
    unstable device names and may be translated

    If you set this to ‘saved’, then the default menu entry will be
    that saved by ‘GRUB_SAVEDEFAULT’ or grub-set-default. This relies
    on the environment block, which may not be available in all
    situations (see Environment block).

    The default is ‘0’." -
    https://www.gnu.org/software/grub/manual/grub/grub.html





More information about the ubuntu-users mailing list