I have a system with an encrypted root. I have installed dropbear-initramfs and am able to SSH in and unlock root and boot fine. However once I boot I end up with both eth0 and br0 with the same static IP and thus networking is not functioning.

Running ifconfig eth0 gets everything going after boot, but I want to avoid having to load that in at boot as it feels very hacky. Looking for how to get initramfs to reset/cleardown/etc the eth0 interface to allow netplan to apply once the main system kernel boots.

The IP for initramfs is configured in /etc/initramfs-tools/initramfs.conf as follows IP=””

Netplan config

      dhcp4: no
      interfaces: [eth0]
      dhcp4: no
        - teese.net.au
  version: 2

I have tried setting IFDOWN=* in /etc/dropbear-initramfs/config to no avail.

Any tips would be appreciated. Cheers

  • I end up running ip addr flush dev $IFACE after boot, which also feels hacky. Have you found a better solution? Feb 17, 2021 at 16:16
  • My "better solution" was to set up a serial console connection from my raspberry pi that sits on top of it. Works for my needs and had a far less hacky feel to it. One thing to note I came across, needs to be an on motherboard COM port on the server as by default Ubuntu kernel is not built to work with USB serial (and I could not be bothered going a custom kernel build just to get a serial port working when I could just spend a couple of $$$ on a COM port Serial header)
    – Jason
    Feb 27, 2021 at 0:26

1 Answer 1


If you are using Ubuntu 20.04 like me, you will find a file /run/netplan/eno1.yaml (or similar file) created after booting.

You can add a script under /etc/initramfs-tools/scripts/init-bottom/ like this:

rm -f /run/netplan/eno1.yaml

to delete the IP address configuration you specified in /etc/initramfs-tools/initramfs.conf

See this related question: What is creating /run/netplan/eth0.yaml?

  • Thank you. Certainly appears to have solved my issue in my test box. For those wanting my full fix it is as below: /etc/initramfs-tools/scripts/init-bottom/remove-eth0.sh #!/bin/sh rm -f /run/netplan/eth0.yaml ip -f inet address flush dev eth0 update-initramfs -u
    – Jason
    Feb 27, 2021 at 1:01
  • Sorry above comment is formatted horribly and I can no-longer edit. So yeah obviously meant to be some line breaks in there.
    – Jason
    Feb 27, 2021 at 1:07
  • Glad that helped! I too struggle on this issue for like 1 week.
    – Jim Lin
    Feb 28, 2021 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.