Wrong "OS" Menu Entry names displayed

Bug #1868566 reported by DanLo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grub Customizer
New
Undecided
Unassigned

Bug Description

Hello,

30 minutes now that I was trying to change default boot option with Grub-customizer.
I just noticed why it did not worked : the entries G-U was giving to me did not correspond to the actual entry choices I had during boot.

What G-U displayed : (sorry it's in french but you should be ok)
> Ubuntu
> Option Avancées pour Ubuntu
> > Ubuntu, with Linux 5.3.0-40-lowlatency
> > Ubuntu, with Linux 5.3.0-40-lowlatency (recovery mode)
> > Linux Mint 19 Xfce, with Linux 4.19.94-40
> > Linux Mint 19 Xfce, with Linux 4.19.94-40 (recovery mode)
> > [Many other kernel choices]
> System Setup

Problem is, I am not on Ubuntu, but Linux Mint 19 Xfce.
And consequently, during boot the menu displays the following options :
> Linux Mint 19 Xfce
> Option Avancées pour Linux Mint 19 Xfce
> > Linux Mint 19 Xfce, with Linux 5.3.0-40-lowlatency
> > Linux Mint 19 Xfce, with Linux 5.3.0-40-lowlatency (recovery mode)
> > Linux Mint 19 Xfce, with Linux 4.19.94-40
> > Linux Mint 19 Xfce, with Linux 4.19.94-40 (recovery mode)
> > [Many other kernel choices]
> System Setup

It is also the result I get from a :
> grep "menuentry" /boot/grub/grub.cfg
First line of the results here is (just for illustration) : "menuentry 'Linux Mint 19 Xfce' --class ubuntu --class gnu-linux [...]"

This being noticed, I selected from drop down menu "Option Avancées pour Ubuntu>Ubuntu, with Linux 4.19.94-40", but the correct choice SHOULD be : "Option Avancées pour Linux Mint 19 Xfce>Linux Mint 19 Xfce, with Linux 4.19.94-40", that's why it was not working.

My conclusion is :
The parsing that is made to generate the menu entry list is not on the correct location, and should probably obtain such information from /boot/grub/grub.cfg.
Where is actually made such parsing (which file ?), so that I could understand better or maybe find the issue on my system ?

Daniel

DanLo (danlo-buntu)
description: updated
Revision history for this message
Daniel Richter (danielrichter2007) wrote :

Grub Customizer runs grub-mkconfig and parses its output. Usually its output is the same as /boot/grub/grub.cfg, but in some cases it may differ (especially when the file was edited by hand or when not up-to-date).

So first take a look at the output of this command (just run `sudo grub-mkconfig`. It wont change your system just printing the new config to your console). Check it for the correct os names.

Revision history for this message
DanLo (danlo-buntu) wrote :

Hello,

Thanks for the information, I checked grub-mkconfig, the output is attached.

Short version : indeed, this commands prompts "Ubuntu" instead of "Linux Mint 19 Xfce". I don't know exactly why... and it does not correspond to the what I got at boot when pressing Esc / Shift to select the booting kernel.

I did not changed this file by hand, by the way. Could this be due to the fact that my current kernel was self patched + compiled + installed ?

Revision history for this message
DanLo (danlo-buntu) wrote :

Okay, I just found out what is going on; Maybe should be taken into consideration, as, as is the "select default kernel entry" dropdown menu is broken :

What is wrong from grub-mkconfig script is $OS value, set to "Ubuntu", meanwhile the entries at boot have another name (for me, "Linux Mint 19 Xfce"). This looks like an old issue, with "Ubuntu" being hardcoded in a few files. Here is what gave me the tip, in /etc/default/grub.d/50_linuxmint.cfg :
 "danlo@BrixPyxis:$ more /etc/default/grub.d/50_linuxmint.cfg
#! /bin/sh
set -e

# Set distributor to "Ubuntu"
#
# In Mint 16:
# shim and grub come with hardcoded ubuntu strings upstream, without this EFI installation is broken
# https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1242417
#
# In Mint 17:
# Despite the bug report being marked as fixed, the situation is the same. Grub was patched by Ubuntu
# to assign the "ubuntu" distributor ID when it was given "Kubuntu". That results in Kubuntu finally
# getting EFI to work out of the box but still using "ubuntu" as far as grub-install is concerned.
# So we'll stick to "Ubuntu" for this iteration.
#
# In Mint 18:
# Some packages are still hardcoded with the "ubuntu" path.. fwupdate for instance.
# Visually, the grub boot menuentry name is set for derivatives in 10_linux,
# but underneath the EFI path remains "ubuntu" for everything to work properly.

GRUB_DISTRIBUTOR="Ubuntu"

-----------
=> $OS is still hardcoded to "Ubuntu" from GRUB_DISTRIBUTOR variable and Linux Mint seems to feed from a different source the texts on boot menu..!
Question is, where does Mint gets it's "Linux Mint 19 Xfce" from... I could not really find from reading 10_linux file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.