|How To OS Hostnames in GRUB2 Menus|
This web-page is part of a larger site giving examples of how to install Windows+Ubuntu Gnu/Linux operating systems 'dual boot' in a computer. Illustrated Dual Boot HomePage
This how-to is another new original how-to from Ubuntu Dual Boot Site.
As far as I know, the information in this page is not (yet) available from any other website and it's not available in Grub-Customizer either.
You have a GRUB Menu that looks like a list of 'Ubuntu, with Linux 3.2.0-20-generic-pae' and you know you have at least three or four different Gnu/Linux installations in there somewhere. It's just about impossible to pick out the one you want to boot . They all look pretty much the same, just a list of numbers.
Unfortunately, for those of us who choose to multi boot more than one flavour of Gnu/Linux, our GRUB isn't of very much assistance to us when it comes to choosing which OS we want to boot. Most of us don't think about our operating in terms of the numbering system for their Linux kernels.
We can recognize our operating systems by their hostnames.
Here's how to fix it.
1) Add you operating system's hostname to your /etc/grub.d/10_linux file
edit /etc/grub.d/10_linux as follows, (scroll down until you find approximately lines 79 to 91),
This causes the operating systems host name to appear in the operating systems own GRUB Menu after update-grub is run.
2) Append you operating system's hostname to your /etc/lsb-release file,
NOTE: Make sure you add the line at the bottom of the file, do not add it at the top as it will cause the Ubuntu Software Center to stop working and throw error messages.
This allows this operating systems hostname to be picked up when another operating systems Grub OS-Prober reads this file.
3. Make equivalent edits of the same files in all your other Gnu/Linux installations.
This is the command for updating /boot/grub/grub.cfg with the changes.
Whenever update-grub is run, (or when Grub-Customizer is started), this causes the Grub Menu Lines to be updated to include the OS host names for the other Gnu/Linux operating systems attached to your computer at the time.
4. Expected Results
You GRUB Menu lines look more like this:
Now we can see all of our operating systems host names in our GRUB Menu and we can easily see which one we want to select and boot.
Tested and works for me in Ubuntu Natty Narwhal, Oneiric Ocelot and Precise Pangolin.
CAUTION: Developers are free to alter files and change code at any time without warning.