Darac Marjal wrote: > The problem that I have is that the ip address that the workstation > gets at boot has a finite "valid_lft" (as seen in `ip a`). When this > lifetime runs out, the IP is removed from the interface. Now, I > think DHCP does try to pick up at that point, but the root file > system is already inaccessible, so the system hangs.
I don't know what the right answer is but I can share what I have. On my diskless workstation (which I configured myself, rarely use, and might be sub-optimally configured) the valid_lft is "forever". My /etc/network/interfaces file is empty. I am not running dhclient. The IP address that is negotiated at PXE boot time is the permanent IP address for the system. It is not allowed to change after that point. As you note if the IP address changes it loses NFS connectivity during that time and things crash. I am using the ISC DHCP server and it pings addresses before it assigns them. If the address lease has expired it still won't assign it again because it will remain in the active list because it pings and is obviously still active to the dhcpd regardless of the expired lease for it. This is likely a small abuse of the rules but it works and is handled okay by the ISC dhcpd. > The kernel command line is: > root=/dev/nfs initrd=initrd.img nfsroot=192.168.101.8:/nfsroot ip=dhcp rw > panic=30 > > I *think*, though that the "ip=dhcp" is redundant because the Debian kernel > (linux-image-3.14-1-686-pae) doesn't support IP autoconfiguration. I have this on my Squeeze network boot nfs diskless system. initrd=nfsdiskless/initrd.img-2.6.32-5-686 rootfstype=nfs root=/dev/nfs nfsroot=192.168.230.109:/srv/nfs/squeeze,v3,rsize=16384,wsize=16384 ro BOOT_IMAGE=nfsdiskless/vmlinuz-2.6.32-5-686 > Eth0 is defined in /etc/network/interfaces.d/eth0 as: > > auto eth0 > iface eth0 inet dhcp Try removing your /etc/network/interfaces.d/eth0 file and see how that works for you. Bob
signature.asc
Description: Digital signature