need hostname on menu
Hi,
Currently, the grub menu has no option to display the hostname, but when on a dual-boot system there two systems of the same distribution it becomes a problem when the user is not sure which install is on which disk. In my case, I had Ubuntu 16.04 and 20.04 on separate disks and grub just gave "Ubuntu" as the default so I had to close down the system and reopen the case to refresh my memory of which install was on which disk. I solved the problem by replacing
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
with
GRUB_DISTRIBUTOR=cat /etc/hostname || lsb_release -i -s 2> /dev/null || echo Debian
which worked well enough.
However, it seems to me that it would be a lot more useful to add a parameter allowing the user to display the name of the install from /etc/hostname.
Humphrey
Signature · 1 line
We are but sheep and here to be fleeced
Hello!
Quoted 2 lines · Humphrey van Polanen Petel
However, it seems to me that it would be a lot more useful to add a parameter allowing the user to display the name of the install from
/etc/hostname.
GRUB is a universal bootloader which supports multiple platforms and operating systems. I'm not sure it would be trivial to implement such a feature for all possible target configurations that GRUB support just to solve this rather exotic problem you are describing here.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Hi,
Whether it is a trivial problem or not I am not qualified to comment on, but it nevertheless seems to me that being able to identify at boot a systemby the name by which it is know is of obvious benefit simply because mnemonics are most easily remembered.
And if you wish to call this a "rather exotic problem" then I would like to point out that it is not up to the developers, but to the users to determine how they use their system.
Humphrey
We are but sheep and here to be fleeced
Quoted 12 lines · John Paul Adrian Glaubitz
Hello!
Quoted 2 lines · Humphrey van Polanen Petel
However, it seems to me that it would be a lot more useful to add a parameter allowing the user to display the name of the install from
/etc/hostname.GRUB is a universal bootloader which supports multiple platforms and operating systems. I'm not sure it would be trivial to implement such a feature for all possible target configurations that GRUB support just to solve this rather exotic problem you are describing here.
Adrian
Hello!
Quoted 4 lines · Humphrey van Polanen Petel
Whether it is a trivial problem or not I am not qualified to comment on, but it nevertheless seems to me that being able to identify at boot a systemby the name by which it is know is of obvious benefit simply because mnemonics are most easily remembered.
I was not arguing this point. I was just talking about the development and maintenance effort.
Quoted 3 lines
And if you wish to call this a "rather exotic problem" then I would like to point out that it is not up to the developers, but to the users to determine how they use their system.
No developer is telling you how to use the software, that's not my point but that someone has to implement the feature and maintain it and that person is the developer.
So while the developer does not get to tell you how you use the software, he decides what he works on and what not. And if there is a feature that is requested by only a very small amount of users, then it usually makes no sense to put up with the additional development and maintenance burden.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Hi,
Le 24/01/2021 à 01:52, Humphrey van Polanen Petel a écrit :
Quoted 1 line
However, it seems to me that it would be a lot more useful to add a parameter allowing the user to display the name of the install from
/etc/hostname.
I won't repeat what grub developers said but in addition:
1) Other users could want to customize the name including an information not available in /etc/hostname, like e.g. /etc/os-release
2) the customization is easy to by the user or the package maintainer or the distribution maintainer and there are several ways to do that, for instance edit by hand grub.cfg, or write a customized config file as /etc/grub.d/<nn>_<name>, or write a script that customizes grub.cfg after having run grub-mkconfig or update-grub, possibly called by a wrapper script that will run grub-mkconfig or update-grub first.
Have a good day,
Didier
I won't repeat what grub developers said but in addition:
1) Other users could want to customize the name including an information not available in /etc/hostname, like e.g. /etc/os-release
2) the customization is easy to do by the user or the package maintainer or the distribution maintainer and there are several ways to do that, like:
a) Edit by hand grub.cfg
b) Write a customized config file as /etc/grub.d/<nn>_<name>.
c) Write a script that customizes grub.cfg after having run grub-mkconfig or update-grub.
d) Write a wrapper script that runs grub-mkconfig or update-grub then do the customization.
Have a good day,
Didier
Sorry for the faulty paste, please keep only the part quoted below:
Le 24/01/2021 à 10:28, Didier Spaier a écrit :
<snip>> Hi,> > Le 24/01/2021 à 01:52, Humphrey van Polanen Petel a écrit :>> However, it seems to me that it would be a lot more useful to add a >> parameter allowing the user to display the name of the install from >> /etc/hostname.>> I won't repeat what grub developers said but in addition:> > 1) Other users could want to customize the name including an information> not available in /etc/hostname, like e.g. /etc/os-release> > 2) the customization is easy to do by the user or the package maintainer or> the distribution maintainer and there are several ways to do that, like:> a) Edit by hand grub.cfg> b) Write a customized config file as /etc/grub.d/<nn>_<name>.> c) Write a script that customizes grub.cfg after having run grub-mkconfig> or update-grub.> d) Write a wrapper script that runs grub-mkconfig or update-grub then do> the customization.> > Have a good day,> Didier
Okay, I get it.
I defer to your decision.
Humphrey
We are but sheep and here to be fleeced
Quoted 23 lines · John Paul Adrian Glaubitz
Hello!
Quoted 4 lines · Humphrey van Polanen Petel
Whether it is a trivial problem or not I am not qualified to comment on, but it nevertheless seems to me that being able to identify at boot a systemby the name by which it is know is of obvious benefit simply because mnemonics are most easily remembered.
I was not arguing this point. I was just talking about the development and maintenance effort.
Quoted 3 lines
And if you wish to call this a "rather exotic problem" then I would like to point out that it is not up to the developers, but to the users to determine how they use their system.
No developer is telling you how to use the software, that's not my point but that someone has to implement the feature and maintain it and that person is the developer.
So while the developer does not get to tell you how you use the software, he decides what he works on and what not. And if there is a feature that is requested by only a very small amount of users, then it usually makes no sense to put up with the additional development and maintenance burden.
Adrian
Quoted 3 lines · Humphrey van Polanen Petel
Okay, I get it.
I defer to your decision.
I did not make any decisions as I'm not in charge of GRUB, I'm just a contributing developer.
I merely stated my opinion and pointed out some problems with your suggestion.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913