I have a Debian 10 machine using NFS, it is using TCP protocol and I would like to change it to UDP.
This is output from the netbooted machine:
mount | grep 1
10.10.1.1:/remotesys on / type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=7,retrans=10,sec=sys,local_lock=all,addr=10.10.1.1)
Where can I change that proto=tcp parameter permanently ? I would guess that this could be set in pxelinux.cfg/default file but I have not found any docs for this file so I have no idea about the syntax used here.
EDIT: What I have tried so far:
- Adding option "proto=udp" to /etc/exports (booted but tcp is still in use)
- Adding option "udp" to /etc/exports (booted but tcp is still in use)
- Adding option ",proto=udp" to nfsroot option in pxelinux.cfg/default (failed to boot – invalid option proto)
- Adding option "proto=udp" to pxelinux.cfg/default (booted but tcp is still in use)
- Adding option "udp" to pxelinux.cfg/default (booted but tcp is still in use)
Best Answer
in your
pxelinux.cfg/default
, you have probably specified something like this:Here is the documentation for the nfsroot parameter inside the kernel command line. It says:
so the answer to your question is, just append the
proto=udp
option to the nfsroot parameter as specified above, like this:[edit]
This Should be the documentation of the file format used for the
pxelinux.cfg/default
file.[edit2]
After a long thorough search, I think I finally found the reason, why the options in the kernel command line are ignored: Bugreport for ubuntu casper
So the solution would be to fix the initrd in use for your image...