I'm just verifying that on my end; note that the 99-default.link is going to be sufficient to trigger a rename from eth0 to ens3; which then prevents any rename once we mount root.
Here's the trigger: % /usr/share/initramfs-tools/hooks/udev # copy .link files containing interface naming definitions mkdir -p $DESTDIR/lib/systemd/network/ find /lib/systemd/network -name '*.link' -execdir cp -pt $DESTDIR/lib/systemd/network/ '{}' + if [ -d /etc/systemd/network ]; then find /etc/systemd/network -name '*.link' -execdir cp -pt $DESTDIR/lib/systemd/network/ '{}' + fi If you create a .link file in /etc/systemd/network/ lower than 99-* then those link rules will apply first. On Fri, May 11, 2018 at 9:24 AM, Daniel Axtens <daniel.axt...@canonical.com> wrote: > Ok, so the bit I'm stuck on is how the link files and the netplan > generator are getting pulled into the initramfs then. > > ubuntu@btest:~$ sudo update-initramfs -u > update-initramfs: Generating /boot/initrd.img-4.15.0-20-generic > > ubuntu@btest:~$ lsinitramfs /boot/initrd.img-4.15.0-20-generic | grep \\.link > lib/systemd/network/99-default.link > ubuntu@btest:~$ lsinitramfs /boot/initrd.img-4.15.0-20-generic | grep netplan > ubuntu@btest:~$ lsinitramfs /boot/initrd.img-4.15.0-20-generic | grep generate > ubuntu@btest:~$ lsinitramfs /boot/initrd.img-4.15.0-20-generic | grep > system-generators > > As you can see there's no generator and no link files in my initramfs - > by what mechanism is it supposed to work? What package/script/tool is > supposed to pull the link files in? > > -- > You received this bug notification because you are subscribed to > netplan. > Matching subscriptions: netplan > https://bugs.launchpad.net/bugs/1770082 > > Title: > systemd-networkd not renaming devices on boot > > To manage notifications about this bug go to: > https://bugs.launchpad.net/netplan/+bug/1770082/+subscriptions -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1770082 Title: systemd-networkd not renaming devices on boot To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1770082/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs