Created attachment 286231 [details] screenshot of ipconfigs success message after network configuration While setting up a system with networking enabled in its initramfs, I encountered that the documentation for nfsroot [1] seems to be outdated: In nfsroot.txt, the format for the `ip=` kernel cmdline parameter has up to 10 fields: > > ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip> But it turned out that this 10-field format results in an error at boot: ipconfig: too many options for eth0 Thanks to an old Ubuntu bug report [2] I discovered the documentation of Klibc's ipconfig command. And there the interface spec only has 7 fields: > <client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> When trying out the kernel cmdline parameter with these 7 fields only, the network setup was successful. (examples further below) So obviously current kernels are only able to deal with an `ip=` argument if it has 7 fields and the nfsroot.txt documentation should be updated. But at a closer look, the situation isn't completely clear: During boot, the kernel ouput still shows the 2 DNS servers set (see attached screenshot), although the DNS server config fields are exactly the ones abolished from the ipconfig interface spec. I ask the maintainers of nfsroot and the ones of Klibc's ipconfig to get together and decide on a consistent interface spec format and kernel output. Either the nfsroot.txt argument specifiction needs to be update or the ipconfig success screen should not display DNS server if there's no possibility to set them. How to reproduce: 1. Use an initramfs that makes use of networking capabilities 2. Specify a static network configuration as a kernel cmdline argument at boot: `ip=192.168.178.5::192.168.178.1:255.255.255.0:myhostname:eth0:off:1.1.1.1:8.8.8.8:` results in a kernel error: `ipconfig: too many options for eth0` `ip=192.168.178.5::192.168.178.1:255.255.255.0:myhostname:eth0:off` works fine and network is successfully configured Downstream bugreport for NixOS: https://github.com/NixOS/nixpkgs/issues/75314 [1] https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt [2] https://bugs.launchpad.net/initramfs-tools/+bug/1251274
klibc 2.0.7 added support for the DNS server fields in the ipconfig utility, but it currently fails if additional fields are provided beyond these. It should ignore them (and maybe warn that it is doing so).
The handling of additional fields should be fixed by these patches: https://lists.zytor.com/archives/klibc/2019-December/004266.html https://lists.zytor.com/archives/klibc/2019-December/004267.html Let me know if these don't work for you.