initramfs ip network overrides /etc/network settings

Paul Horn paul.horn at alvandsolutions.com
Sun Nov 18 08:29:37 WST 2012


I have a question on networking and initramfs interaction. I already
posted this on the Ubuntu forums, but wondered if someone on this list
might have more familiarity with the underpinnings of dropbear and
initramfs. I'm decent with Linux but this is new territory for me.

Installing Ubuntu 12.10 server, 64 bit, on some new hardware. Working on
using dropbear / ssh to remotely unlock LUKS volumes at boot, generally
following the outline posted by hacksr at
http://hacksr.blogspot.com/2012/05/ssh-unlock-with-fully-encrypted-ubuntu.html.

The install is very basic at this point: an SSH server, apt-get
update/upgrade complete, and a static IP address set for eth0 in
/etc/network/interfaces. It boots quickly prior to installing dropbear.

After installing dropbear, initramfs starts networking on bootup. By
default, it uses DHCP. It is also possible to set a static IP. That much
I have working, and can remotely ssh in when the server starts and is
waiting for the luks passphrase. Thanks to the second script at the
above how-to, I can also enter the unlock passphrase in the dropbear
session and start the server.

What I can't figure out, and haven't found a post anywhere that
addresses this, is that once this process completes and the server
continues to boot, the network remains somehow under "control" of
initramfs. Boot process stops for several minutes "waiting for network
configuration" in spite of the static IP settings for both initramfs and
/etc/network/interfaces. Once it finally starts, any settings in
/etc/network/interfaces are ignored. If the IP addresses don't match, I
end up with the one in initramfs. If initramfs uses dhcp, I get that
address once the server fully boots.

    * "service networking restart" changes nothing.
    * "ifdown eth0" says that eth0 is not configured.
    * "ifup eth0" returns "RTNETLINK answers: File exists. Failed to
bring up eth0."
    * /run/network has only the loopback entries. There are no longer
entries for eth0 or the static network directory.

Am I missing a script in the /scripts/init-bottom or local-bottom where
dropbear shuts down? Or is this expected behavior when initramfs uses
the network at boot?

 - Paul



More information about the Dropbear mailing list