help-grub
[Top][All Lists]
Advanced

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

Network Boot Get Hostname In grub.cfg


From: Federico Vaga
Subject: Network Boot Get Hostname In grub.cfg
Date: Thu, 11 Nov 2021 10:36:32 +0100

Hello,

I'm trying to get the hostname in `grub.cfg` to point then to
different rootnfs, or network live images.

From the manual page:

https://www.gnu.org/software/grub/manual/grub/grub.html

I've noticed the existence of `net_<interface>_hostname` but this
requires to know the `<interface>` name in advance and this is
platform dependent (as the documentation says).

Since these systems have only one network connection I thought about
using `net_default_interface` to ignore the specific name. Here
problems strarts because neasting variables seems not working and
doing: `${net_${net_default_interface}_hostname}`

However, in the documentation variables like `net_default_ip` are
described as the result of ‘net_${net_default_interface}_ip’.

Am I doing something wrong? Do you have any suggestion?

Thanks



reply via email to

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