CLI modification of grub in multi-boot systems

I assume you want to select which grub menu entry is chosen by default, right?

To do that, edit file /etc/default/grub and set the following variable values:

    GRUB_DEFAULT=saved
    GRUB_SAVEDEFAULT=true

Then run command

    sudo grub-mkconfig -o /boot/grub/grub.cfg

With these modifications grub “remembers” your previous entry selection.

About changing the OS name: changing the following files might make a difference:

  • /etc/issue
  • /usr/share/factory/etc/issue
  • /usr/lib/os-release
  • /etc/lsb-release (is already OK)

(and running the above command again). Haven’t tested that though.

1 Like