Date: Tue, 23 Oct 2001 22:13:47 +0200 (CEST) From: Cyrille Lefevre <clefevre@citeweb.net> To: John Polstra <jdp@polstra.com> Cc: net@freebsd.org Subject: Re: PXE boot vs. DHCP Message-ID: <200110232013.f9NKDmU27220@gits.dyndns.org> In-Reply-To: <200110231530.f9NFUwm46770@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra wrote: > In article <XFMail.011014203733.jdp@polstra.com>, > John Polstra <jdp@polstra.com> wrote: > > I've been setting up a 4.4-RELEASE system for net booting and diskless > > operation with pxeboot, and I've run into a minor but annoying > > problem. It seems that if you boot with PXE you can't use dhclient. > > pxeboot configures the relevant network interface (let's call it > > fxp0), NFS-mounts the root filesystem, boots the kernel, etc., and > > begins to enter multi-user mode. The rc.network script then runs > > dhclient, which tries to configure fxp0 (again). It apparently starts > > out by unconfiguring fxp0's IP address, because NFS immediately hangs > > with a "host unreachable" error. At that point I have to walk over > > and press the reset button. > > The patch below for dhclient-script fixes the problem for me. If the > script is about to change the IP address to 0.0.0.0 (in the PREINIT > phase), the patched version first checks to see if the interface is > already up. If it is up, there is no need to reset its IP address. > We are just trying to get the interface into a state where it > can send IP packets, and it is already in that state. Any > objections? IMHO, it would be better to provide a /etc/dhclient-enter-hooks while you are net installing the station, then remove it when finished. the dhclient-enter-hooks would be almost what you are doing : #!/bin/sh if [ x$reason = xPREINIT ]; then case `ifconfig $interface` in *flags=*[\<,]UP[\>,]*) exit 0 ;; esac fi Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110232013.f9NKDmU27220>