Feature Request - Multibooters -System Hostnames in Menu Lines
I tried out Grub-Customizer for the first time today and I love it, it's great! I was impressed by how easily I can set a nice splashimage and add colours to my GRUB Menu, well done!
I often boot more than one Gnu/Linux and also like to have a USB Auxilliary installation or two which may be included in my GRUB Menu if they're plugged in when the menu is updated.
Having a list of 'Ubuntu, with Linux (followed by some numbers)' doesn't help me decide which line to select in order to choose an operating system to boot.
I want to be able to see the operating system's host names in my GRUB Menu, since those are more meaningful to humans.
I have tried doing some of my own reading, experiments trials and errors to achieve this. In the end I have discovered that it's surprisingly simple.
For the main operating system I edited /etc/grub.
[code]
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title=
else
title=
fi
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
cat << EOF
[/code]I inserted my OS host name 'OCZ-Oneiric' as shown.
When update-grub is run, (or when Grub-Customizer is started), this causes the home operating system's own Grub Menu Lines to display the home OS host name.
And in all other operating systems in other disks and partitions, I append the following line to /etc/lsb-release: HOSTNAME=<Hostname>
[code]
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
HOSTNAME=
[/code]
Where: The OS hostname is "USB-Narwhal", ( replace with the appropriate hostname for the OS the file belongs to).
Whenever update-grub is run, (or when Grub-Customizer is started), this causes the Grub Menu Lines for all other Gnu/Linux installations to display the OS host names for those operating systems.
Actually, I edit both files in all operating systems like this, so they all will be listed the way I like in each others GRUB Menus.
I have tried this out in Ubuntu Natty Narwhal, Oneiric Ocelot and Precise Pangolin and it seems to work well for me so far. But I'm lazy and I don't mind sharing my secret if in exchange for the prospect that these edits can be done easier by having them included in Grub-Customizer.
Of course I imagine you would need to investigate how this may affect any other programs which might also use those files.
I am hoping it will turn out to be okay. I haven't been trying this over a long time period yet so I'm not sure, but all I can say it seems to work well for me so far.
Regards, Herman :)
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Herman Felderhof for more information if necessary.