Skip to content

boot.initrd.network.enable: documentation links to wrong/outdated ip argument path #75314

@schmittlauch

Description

@schmittlauch

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.

Screenshot_20191209_001826

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions