When setting GRUB_DEFAULT to:
Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)
update-grub
emits a warning (3 times) that I should not use this "old title", but should use one of the following, depending on my "version".
For versions pre 2.00:
Advanced options for Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)>Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)
For versions 2.00 or higher:
gnulinux-advanced-c40111ac-c9cb-43b2-b72b-e6d86975cd57>gnulinux---c40111ac-c9cb-43b2-b72b-e6d86975cd57
I assumed that this warning means the grub version with "version". So I picked the latter format, as my grub is 2.02-2ubuntu8.
But it didn't worked. When changing back to the "old title" it works again.
Warnung: Bitte verwenden Sie nicht den alten Titel »Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)« für GRUB_DEFAULT, verwenden Sie »Advanced options for Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)>Ubuntu 18.04.1 LTS (18.04) (auf /dev/nvme0n1p2)« (für Versionen vor 2.00) oder »gnulinux-advanced-c40111ac-c9cb-43b2-b72b-e6d86975cd57>gnulinux---c40111ac-c9cb-43b2-b72b-e6d86975cd57« (für 2.00 oder neuer)
Why shouldn't I use the normal "old" title and what would be the correct title then? Or should I ignore this message?
System informations:
Linux htpc7even3 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
The Grub-manual states:
Your entry-title contains a device-name (
/dev/nvme0n1p2
). Devices names may change if you remove or add a drive or reconnect the existing drive to a different slot.In such a case the menu-entry-titles in
/boot/grub/grub.cfg
would be updated when you run 'update-grub' and this would make the default (which remains the same) invalid. Thus you get a warning, you can still use it if you want and knowing what you're doing, never add or remove drives.It's recommended to use the menu-entry-ID instead which does not contain a device name but the UUID of the partition you want to boot from, that's much more stable.
You don't need to use the two-level-identifier. I just copied the identifier of my first menu-entry from
/boot/grub/grub.cfg
and setand then ran
sudo update-grub
which finished silently (no error, no warning), also no problems during reboot.Easiest to edit
/etc/default/grub
like this...sudo -H gedit /etc/default/grub
sudo update-grub
This way, GRUB remembers the last OS you selected, and will continue to reboot to that same OS until you select a different OS.
Much simpler than trying to match textual names, or using raw numbers.
What's I've always done on this is to match exactly what shows up in the "Advanced Options for Ubuntu" Grub menu. So if it looks like this:
I use
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.0.0-25-generic"
This produces no errors or warnings when
sudo update-grub
is run.In Ubuntu (or any derivative) you can simply install grub-customizer (it is in the repositories) and open it. Then "General settings" and in "predefined" choose the kernel you want to start with. Save. That's it.