-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
While setting up a NixOS installation with static networking enabled in the initrd, I discovered that the ip= kernel cmdline argument format is different from the one linked to in the documentation:
The option's docstring points to https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt which documents the ip= argument having up to 10 fields, but when specifying all of them the kernel gives an error at boot: ipconfig: too many options for eth0
Thanks to an old Ubuntu bug report I encountered the documentation of the in-kernel ipconfig itself, where the last 3 fields have been stripped.
Using the 7-field syntax from the latter documentation worked fine. But as during boot the DNS servers are still displayed, although there is no possibility to set them anymore, I suspect there is an inconsistency in upstream.
I'm going to do some asking there on what argument format is supposed to be the correct one.
As NixOS is only concerned by this due to the documentation link, this is mostly a tracker bug to adapt the documentation link when upstream has resolved the inconsistencies.
To Reproduce
from configuration.nix:
boot.initrd.network.enable = true;
# doesn't work
boot.kernelParams = [ "ip=192.168.178.5::192.168.178.1:255.255.255.0:myhostname:eth0:off:1.1.1.1:8.8.8.8:" ];
# does work
boot.kernelParams = [ "ip=192.168.178.5::192.168.178.1:255.255.255.0:myhostname:eth0:off" ];
Metadata
- system:
"x86_64-linux" - host os:
Linux 4.19.87, NixOS, 19.09.1489.d3a8243e583 (Loris) - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.3 - nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: system/boot/initrd-network.nix