[syslinux] gentoo pxelinux boot - pass hostname to dhcp client

a s p a s i a aspasia.sf at gmail.com
Wed Jun 25 17:17:20 PDT 2008


Hello all,

I have finally successfully booted a diskless NFS Gentoo client and I
am very pleased with it!

I only have one issue left I'd like to understand; the master Gentoo
server that I based my diskless image from boots nicely via dhcp and
accepts the hostname parameter its DHCP server passes along with its
leased IP address.  I have posted in the Gentoo forum, but thought I'd
post in the pxelinux forum in case anyone has had vast experience in
managing gentoo NFSroot images.

Everthing is great: except the client does NOT accept the hostname
parameter passed on to it; is there something I am missing perhaps?

1.  So I see that in the first network boot (somewhere in the pxelinux
process) the DHCP server passes on all the information (IP, hostname,
etc) ...

2. The /var/log/messages from the diskless client shows that it has
received the hostname from DHCP server:

Jun 25 11:15:38 localhost RPC: Registered tcp transport module.
Jun 25 11:15:38 localhost eth0: no link during initialization.
Jun 25 11:15:38 localhost eth1: no link during initialization.
Jun 25 11:15:38 localhost Sending DHCP requests .<6>eth0: link up.
Jun 25 11:15:38 localhost ., OK
Jun 25 11:15:38 localhost IP-Config: Got DHCP answer from
192.168.17.3, my address is 192.168.17.24
Jun 25 11:15:38 localhost IP-Config: Complete:
Jun 25 11:15:38 localhost device=eth0, addr=192.168.17.24,
mask=255.255.240.0, gw=192.168.16.1,
Jun 25 11:15:38 localhost host=dataserv2, domain=lab.maxiscale.com
maxiscale.com, nis-domain=(none),
Jun 25 11:15:38 localhost bootserver=192.168.17.3,
rootserver=192.168.17.3, rootpath=
Jun 25 11:15:38 localhost Looking up port of RPC 100003/2 on 192.168.17.3
Jun 25 11:15:38 localhost Looking up port of RPC 100005/1 on 192.168.17.3
Jun 25 11:15:38 localhost VFS: Mounted root (nfs filesystem) readonly.

3.  But when the NFSroot is mounted and the proper startup scripts are
run, somehow the hostname info is not preserved.  In Gentoo's
instructions, they have requested to change the following file to noop
to preserve existing network settings (since I have compiled drivers
in kernel and don't use initramfs):

my /etc/conf.d/net file:

cat net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "noop" )
# config_eth0=( "dhcp" )
localhost conf.d #

....

I have change the config_eth0=( "noop" ) based on instructions and in
order for the system to utilize the compiled network drivers and not
rely on the modules since I compiled my kernel to include the network
drivers.

4.  I received a response from Gentoo forum that told me to carefully
read the /etc/conf.d/net.example file and to use the -H hostname
parameter of dhcpcd.

The problem is back again to by re-running dhcpcd after boot while my
root RELIES on the network, I would lose network connection, right.

So, my question, is there a way of preserving the hostname passed by
dhcp somehow during gentoo boot?

Any help will be greatly appreciated.

Best regards,

aspasia.

-- 
A S P A S I A
. . . . . . . . . . ..




More information about the Syslinux mailing list