Page MenuHomeFreeBSD

pxeboot: don't hang with TCP-only NFS server. Add useful error message and manpage hint.
AcceptedPublic

Authored by cracauer on Thu, Feb 19, 3:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 12, 10:20 PM
Unknown Object (File)
Thu, Mar 12, 6:04 PM
Unknown Object (File)
Thu, Mar 12, 12:19 PM
Unknown Object (File)
Wed, Mar 11, 10:18 AM
Unknown Object (File)
Mon, Mar 9, 7:13 AM
Unknown Object (File)
Sat, Mar 7, 6:03 PM
Unknown Object (File)
Fri, Mar 6, 12:08 PM
Unknown Object (File)
Fri, Mar 6, 12:08 PM
Subscribers

Details

Reviewers
manu
ziaee
tsoome
markj
imp
Group Reviewers
manpages
Summary

When pxeboot gets a 0 as a port number from portmapper (indicating an error), it currently happily sends NFS packets to the server's port 0 in an endless loop. Change this to instead, bail out with a useful message,

This happens, for example, with recent Linux NFS servers as many distributions switched to TCP only NFS serving by default. FreeBSD's pxeboot must have UDP. In this situation pxeboot asks the server's portmapper for the UDP NFS port and since there is none gets 0.

Also add a hint to the manpage explaining this and how to fix it.

Test Plan

This fixes the hang I had for a while.

Automated testing is not really feasible as you would have to build client and server and pxeboot can't be used from bhyve.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Note: this is not related to the slowness that people experience with some but not all BIOSes.

ziaee added inline comments.
stand/i386/pxeldr/pxeboot.8
133–136
.Nm
requires NFS over UDP.
Many recent distributions of Linux only serve NFS over TCP.
Enable UDP by uncommenting
.Ql udp=y
in
.Pa /etc/nfs.conf .
.Pp

Notes:
+ one sentance per lin in roff.
+ the Pa macro makes this page go into the apropos database so that people can search nfs.conf and get here
+ no "you" in reference manual style

Fix next line after manpage change.

Ok from manpages side; but I'd like a more senior programmer to review the code change. It might help if you upload the patch with more context, either using -U 9999 or git-arc.

This revision is now accepted and ready to land.Thu, Feb 19, 5:00 PM

(adding senior colleagues who worked on stand/libsa lately)