Using dhclient on netmounted /

Michal Suchanek hramrach at centrum.cz
Sat May 29 13:52:57 UTC 2010


On 29 May 2010 00:42, Ferenc Wagner <wferi at niif.hu> wrote:
> Michal Suchanek <hramrach at centrum.cz> writes:
>
>> 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.
>>
>> 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?
>
> You may want to look up in the archives the thread I started here on
> 19th of April with the subject "How to not break nfsroot".  It didn't
> elect much interest, but skipping the PREINIT phase via a short hook
> made the freezes go away.  I also export the lease from the initramfs,
> so discovery does not happen again.

I will try that in my new images to see how that goes.

Thanks

Michal



More information about the dhcp-users mailing list