Skip to contentSkip to conversation

Grub Menu - tweak to identify hostname associated with bootable system

DISCUSSION ERIC MARCEAU 2 participants 2 messages Sep 30, 2019 – Oct 2, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,
I was wondering if someone could incorporate the logic to extract the hostname on each bootable partition and report those in the appropriate menu options presented by grub. I have hard coded this with simple shell logic based on a case statement matching UUID.
Attached are the files (10_linux, 30_os-prober) which I have tweaked to achieve the UUID match and reporting.

I also include a snapshot of what the menu looks like.  I currently use Grub 2.

But I recognize that is not logic which is dynamic to report correctly for anyone installing the distros, and that it would be better to probe each of the detected partition to locate the   "${PartROOT}/etc/hostname"   file to create the appropriate entries in 10_linux and 30_os-prober scripts by the grub-install script

I hope that someone will be able to implement the more generalized logic some time in the near future.

Thank you,

#2 lore raw
Quoted 10 lines · ERIC MARCEAU

Hello, I was wondering if someone could incorporate the logic to extract the hostname on each bootable partition and report those in the appropriate menu options presented by grub. I have hard coded this with simple shell logic based on a case statement matching UUID. Attached are the files (10_linux, 30_os-prober) which I have tweaked to achieve the UUID match and reporting.

I also include a snapshot of what the menu looks like.  I currently use Grub 2.

Quoted 8 lines

But I recognize that is not logic which is dynamic to report correctly for anyone installing the distros, and that it would be better to probe each of the detected partition to locate the "${PartROOT}/etc/hostname"   file to create the appropriate entries in 10_linux and 30_os-prober scripts by the grub-install script

I hope that someone will be able to implement the more generalized logic some time in the near future.

In general idea looks interesting but code requires more work. First of all please use "git format-patch" and "git send-email" to send the patches. If we have your code in that form then we can suggest what should be changed/improved.

Daniel