I would like to remove the GNU/Linux part from grub boot menu too. That’s just too much and a distraction to mention it for each and every grub boot menu entry. Just too much text and not relevant to what the user is focusing on.
Related /etc/grub.d/10_linux code snippet:
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
case ${GRUB_DISTRIBUTOR} in
Ubuntu|Kubuntu)
OS="${GRUB_DISTRIBUTOR}"
;;
*)
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
;;
esac
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
We’re either called Ubuntu or Kubuntu which is obviously not an option or string GNU/Linux gets injected into variable OS either way.
Translating that code snippet into human speech:
if GRUB_DISTRIBUTOR is unset, set OS to GNU/Linux
otherwise if GRUB_DISTRIBUTOR is set to Ubuntu or Kubuntu set OS to either of that
otherwise set OS to content of variable GRUB_DISTRIBUTOR and append GNU/Linux.
This would require an upstream patch. Change from:
Ubuntu|Kubuntu)
to
Ubuntu|Kubuntu|Whonix|Kicksecure)
or some other, more generic, non-hardcoded mechanism to be allowed to set variable OS.
### BEGIN /etc/grub.d/50_ungnu ###
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00### END /etc/grub.d/50_ungnu ###
### BEGIN /etc/grub.d/90_end ###
### TEST
### END /etc/grub.d/90_end ###
Alternatively
sed -i 's# GNU/Linux##g' /boot/grub/grub.cfg.new
But that breaks grub-mkconfig. The only thing that gets added.
### BEGIN /etc/grub.d/50_ungnu ###
Any files after it such as /etc/grub.d/90_end will not be properly processed anymore.
I guess that could be because /usr/sbin/grub-mkconfig is using: