I have a BusyBox based embedded Linux system, mounting the RFS via NFS. This works fine except when I try to use udhcpd to get a DHCP address for eth0. This then causes the NFS mount to stop working. Any ideas as to what's going on?

/etc/network/interfaces is:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

And the problem I see at bootup time is:

udhcpc (v1.20.2) started
Sending discover...
Sending select for
Lease of obtained, lease time 86400

nfs: server not responding, still trying
  • 1
    if you mounted the NFS partition, it must be that you had an ip address (which had been retrieved, I guess, by your pxe client, and, I also guess, through dhcp). Why do you want to refresh the ip address then? – Bacon Aug 9 '15 at 20:55
  • Yes, the system seems to be getting an IP address by some means prior to udhcpc running. But for production we'll need udhcpc working, and I'd like it to work while still testing things mounted via NFS. – SeanLabs Aug 9 '15 at 21:38
  • Do you have another NIC on the machine? – Bacon Aug 9 '15 at 21:51
  • Yes, eth0 and eth1, but I am not using eth1. – SeanLabs Aug 9 '15 at 22:36
  • As for testing dhcp you should use your other interface. – Bacon Aug 9 '15 at 23:17

You should use eth1 to try your dhcp server.

If you wish to keep your NFS mount while you're changing your IP address on eth0, I suggest you set up an alias on your interface, to try your dhcp server.

Keep in mind that you need to keep a TCP/IP connection to your NFS server if you want to keep the mount up. Another solution would be to specify a very long timeout in your exports file (option timeo=x, in tenths of a second).

Write the following in your /etc/network/interfaces

auto eth0
iface eth0 inet static
# put your network information here
  address x.X.x.x
  netmask x.x.x.x
  gateway x.x.x.x

auto eth0:1
iface eth0:1 inet dhcp
| improve this answer | |
  • I tried adding a long timeo of 900 to the Linux boot args, but that didn't seem to fix things. I'll try eth1 when I get it wired up tomorrow. What does the eth0:1 syntax specify exactly? – SeanLabs Aug 9 '15 at 23:36
  • eth0:1 means that you declare using an alias for interface eth0, with the id #1. It is basically a way to create a virtual interface, and assign it an independent ip address. – Bacon Aug 9 '15 at 23:53
  • Also just tried the virtual interface technique you mentioned in the file above, it's working nicely. Thanks, you saved me quite a lot of time :) – SeanLabs Aug 10 '15 at 0:16
  • glad it worked! – Bacon Aug 10 '15 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.