How to not break nfsroot
Glenn Satchell
glenn.satchell at uniq.com.au
Wed Apr 28 00:35:13 UTC 2010
Hi Feri
I don't have any direct experience with nfsroot/dbcp but I think that
you will need to make some changes to dhclient-script. This is a fairly
generic script designed to implement the actions for each OS/platform.
eg the commands for linux vary from, say, BSD.
There is a man page for dhclient-script which strongly suggests not
modifying the original. There is a mechanism where you can override
actions using /etc/dhclient-enter-hooks.
In /etc/dhclient-enter-hooks you could do your own test for PREINIT and
skip the ifconfig 0 up, then exit, eg something like this (note I
haven't tested this!)
if [ x$reason = xPREINIT ]; then
# don't change anything
exit_with_hooks 0
fi
This way the corresponding code in dhclient-script does not get a chance
to be run.
On the dhcp server side you probably want to be sure that steps 2 and 3
deliver the same IP address to the client.
HTH and happy to have some more discussin along these lines.
regards,
-glenn
On 04/27/10 19:44, Ferenc Wagner wrote:
> Hi,
>
> I'd much appreciate your thoughts about this. If I didn't succeed in
> making the issue clear, I can try again. If I brought it up on the
> wrong forum, please direct me to a better one.
>
> Regards,
> Feri.
>
> Ferenc Wagner<wferi at niif.hu> writes:
>
>> When booting an NFS rooted system, one generally has to go through three
>> DHCP round trips:
>> 1. PXE BIOS does DHCP to setup networking for downloading the kernel
>> and the initramfs image,
>> 2. initramfs does DHCP to setup networking for mounting the NFS root,
>> 3. the booting system does DHCP to set host and domain name and DNS
>> resolvers.
>> But 3 is inherently problematic, because a cold-starting dhclient brings
>> down its network interface, and NFS root can't tolerate that, the system
>> deadlocks (cf. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553211)
>>
>> Now, it's technically possible to transfer the DHCP reply packet from
>> the PXE phase down to dhclient. It's also possible to create a lease
>> file for dhclient by parsing this packet. But, to my knowledge, there's
>> no way to coax dhclient into skipping the PREINIT phase (that's where
>> dhclient-script unconditionally downs the network interface), even
>> though it's willing to skip discovery if it finds a valid lease.
>>
>> Also, while it may be possible to skip any interaction with the DHCP
>> server if the valid lease (or the saved reply packet) contains all the
>> options the client config needs, it should still be acted upon, as
>> resolv.conf (as an example) should be set up. If some information is
>> missing, a DHCPINFORM would probably be the most appropriate choice.
>>
>> Now it seems to me that the nfsroot scenario can't be handled without
>> tailoring dhclient-script, but I'd like to hear your opinion about the
>> best handling of this whole problem domain.
More information about the dhcp-users
mailing list