Skip to content

Commit 9ff370e

Browse files
Manciukicbchalios
authored andcommitted
test(rootfs): disable predictable netif names
Tell systemd not to use "predictable names" for network devices (eg enp0s1), but keep the ethN set by the kernel. This is equivalent to passing net.ifnames=0 to the kernel command line. Signed-off-by: Riccardo Mancini <[email protected]> Signed-off-by: Babis Chalios <[email protected]>
1 parent af5569e commit 9ff370e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

resources/chroot.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ rm -vf /etc/systemd/system/timers.target.wants/*
6464

6565
systemctl enable var-lib-systemd.mount
6666

67+
# disable Predictable Network Interface Names to keep ethN names
68+
# even with PCI enabled
69+
ln -s /dev/null /etc/systemd/network/99-default.link
70+
6771
#### trim image https://wiki.ubuntu.com/ReducingDiskFootprint
6872
# this does not save much, but oh well
6973
rm -rf /usr/share/{doc,man,info,locale}

0 commit comments

Comments
 (0)