Skip to content

Commit

Permalink
nixos/boot: Make sure interfaces are renamed in stage-1
Browse files Browse the repository at this point in the history
Otherwise we run into issues that udev cannot rename the interface in
stage-2 because the device is busy.

See :
* NixOS#39329
* https://discourse.nixos.org/t/predictable-network-interface-names-in-initrd/4055
* NixOS@1f03f6f
  • Loading branch information
arianvp authored and wizeman committed Oct 11, 2019
1 parent 9ae60cf commit 061381d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/system/boot/stage-1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ let
cp -v ${udev}/lib/udev/rules.d/60-cdrom_id.rules $out/
cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/
cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/
# Make sure interface is renamed in stage-1
cp -v ${udev}/lib/udev/rules.d/80-net-link-setup-link.rules $out/
cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
${config.boot.initrd.extraUdevRulesCommands}
Expand Down

0 comments on commit 061381d

Please sign in to comment.