Using dhclient on netmounted /

Michal Suchanek hramrach at
Fri May 28 17:47:58 UTC 2010


I am netbooting machines occasionally and noticed that this works very
poorly with dhclient (version 3 and 4).

I use scripts from my Linux distributions which configure the network
in initramfs using ipconfig. This somewhat works so long as dhclient
is never run on the system.

However, I added a new way to mount the image which contains the /
filesystem and forgot to disable dhclient in that case.

There are mutiple observed issues

 - at the point when dhclient is started the system locks up for half
a minute or so
 - with dhclient 3 I also observed the system locking up completely
 - with dhclient 3 the system fails to boot if the image server was
not located in the same IP subnet (not tested with dhclient 4)

The issues are caused by dhclient running scripts while the network is
down which obviously breaks stuff if the scripts and anything else is
locates on a net-mounted filesystem.

Not running dhclient causes the lease not renewing, obviously.

Importing dhclient into the initramfs would require that all the
scripts and the programs run by the sripts were also imported which
might move substantial part of the system into initramfs. It would not
solve problems with dhclient potentially running scripts when the
lease renews, the leased IP address changes or dhclient is just
restarted (not tested).

Generally dhclient seems quite incompatible with network booted
systems. Is this intentional and should I purge dhclient from such
systems and look alsewhere for a dhcp client implementation that works
for network booted systems or is this a bug?



More information about the dhcp-users mailing list