Editing grub boot menu, how to save?
Bo Berglund
bo.berglund at gmail.com
Fri Oct 29 18:54:45 UTC 2021
On Fri, 29 Oct 2021 18:31:01 +0100, Colin Watson <cjwatson at ubuntu.com> wrote:
>If what you mean by "save" is "save to disk", GRUB itself never writes
>to your grub.cfg file, so there is no such facility. Making a permanent
>change to the boot menu requires editing it from a proper operating
>system rather than the boot loader environment.
Yes, I want it to be permanent for future boots.
>If what you mean by "save" is "boot the system with this change", then
>you have misquoted the help text in a way that affects its meaning: it
>says "Press Ctrl-x or F10 to boot", not "... to reboot". That is,
>pressing Ctrl-x or F10 will boot the system according to your edited
>menu item.
I took a photo of the menu itself when I last booted but I did not document the
bottom of the screen, so that is why my description is from memory and might be
lightly inaccurate...
And since what I want is to edit the actual display line on the boot screen (the
label for the entry) it does not show up when I use Ctrl-x because the menu is
not shown when I return to from the editor. The boot process just proceeds.
>
>> I just want to change the label so that it is unmistakable *what* is going to
>> boot by that line.
>> Currently my top line only says "Ubuntu" and since there are multiple Ubuntus
>> this is not very user friendly!
>
>That's a change you'd need to make from the operating system that owns
>the relevant grub.cfg file. grub.cfg is typically generated, and there
>isn't a simple way to make this change: it requires editing
>/etc/grub.d/10_linux, which is a shell script, working out what change
>you need to make to that (probably the "simplest" approach would be to
>edit the type=simple branch of the conditional code near the top of the
>linux_entry function to pass different text to grub_quote), and then
>running "sudo update-grub".
Concerning editing on disk:
I had a look at the files in /etc/default/ and /boot/grub/ and none was useful
for me since I do not know anything about how the boot process works.
As I stated I want a clearer boot menu so the correct item can be selected.
So the label is the *only* item I need to change.
Is there no utility, which can operate on the grub files and present me with a
label edit possibility?
The display from the boot menu would suffice if it was possible to save from it
in a correctr format.
Of course this cannot happen at boot time when there is no disk selected yet.
But I hoped someone would have knowledge of such a tool.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list