grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need hostname on menu


From: Humphrey van Polanen Petel
Subject: need hostname on menu
Date: Sun, 24 Jan 2021 11:52:24 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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

-- 
We are but sheep and here to be fleeced

reply via email to

[Prev in Thread] Current Thread [Next in Thread]