grub2 - How to get kernel index for grub default? - Ask Ubuntu
scenario
i can see list of kernels have either holding shift
on boot
or $ dpkg --list | grep linux-image
i know can change default boot kernel in /etc/default/grub
setting grub_default=n
n id kernel. i'm stuck getting corresponding id's kernels.
question
how can tell kernel corresponds id of 0 , on?
in /etc/default/grub:
‘grub_default’
the default menu entry. may number, in case identifies nth entry in generated menu counted zero, or title of menu entry, or special string ‘saved’. using title may useful if want set menu entry default though there may variable number of entries before it.
for example, if have (grep -i menuentry /boot/grub/grub.cfg):
menuentry 'example gnu/linux distribution' --class gnu-linux { ... }
then can make default using:
grub_default='example gnu/linux distribution'
if set ‘saved’, default menu entry saved ‘grub_savedefault’, grub-set-default, or grub-reboot.
the default ‘0’.
‘grub_savedefault’
if option set ‘true’, then, when entry selected, save new default entry use future runs of grub. useful if ‘grub_default=saved’; separate option because ‘grub_default=saved’ useful without option, in conjunction grub-set-default or grub-reboot. unset default.
Comments
Post a Comment