Bug#1076723: grub-common: duplicate GNU/Linux in menuentry and submenu lines of /boot/grub/grub.cfg
Vincent Lefevre
vincent at vinc17.net
Tue Jul 23 11:45:34 BST 2024
On 2024-07-22 17:36:06 +0200, Vincent Lefevre wrote:
> I think that this is because in /etc/default/grub, the
> GRUB_DISTRIBUTOR line got changed to
>
> GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Debian} ) 2>/dev/null || echo Debian`
>
> One should normally get "Debian", but /etc/os-release contains
>
> NAME="Debian GNU/Linux"
>
> instead of just
>
> NAME="Debian"
Adding
NAME=${NAME%GNU/Linux};
just after
. /etc/os-release;
solves the problem.
That said, I don't know what is expected for the other vendors.
The os-release(5) man page says about NAME:
NAME=
A string identifying the operating system, without a version
component, and suitable for presentation to the user. If not set,
a default of "NAME=Linux" may be used.
Examples: "NAME=Fedora", "NAME="Debian GNU/Linux"".
This means that GRUB_DISTRIBUTOR could be "Linux", giving
"Linux GNU/Linux" in the menu. But perhaps this will never
occur in dpkg-based distributions.
BTW, it seems that the GRUB_DISTRIBUTOR line was changed to take
Ubuntu into account, and because lsb_release may not be present
everywhere:
https://salsa.debian.org/grub-team/grub/-/merge_requests/59
https://salsa.debian.org/grub-team/grub/-/merge_requests/35
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Pkg-grub-devel
mailing list