2

I would like to ask for help in figuring out how to get the IP-Config program that shows up when attempting to use dropbear from guides such as this question to allow me to use wlan0 instead of eth0 when booting up my computer with cryptsetup on grub.

The message that shows up when trying to use dropbear is

IP-Config: eth0 hardware address ...
IP-Config: no response after 3 secs - giving up

The message keeps repeating except to display a higher number of seconds each time.

I can still type in my password manually, but I would like to be able to use wifi in addition to this.

My /etc/initramfs-tools/initramfs.conf looks like

#
# initramfs.conf
# Configuration file for mkinitramfs(8). See initramfs.conf(5).
#
# Note that configuration options from this file can be overridden
# by config files in the /etc/initramfs-tools/conf.d directory.

#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add most filesystem and all harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#

MODULES=most

#
# BUSYBOX: [ y | n ]
#
# Use busybox if available.
#

BUSYBOX=y

#
# KEYMAP: [ y | n ]
#
# Load a keymap during the initramfs stage.
#

KEYMAP=n

#
# COMPRESS: [ gzip | bzip2 | lzma | lzop | xz ]
#

COMPRESS=gzip

#
# NFS Section of the config.
#

#
# DEVICE: ...
#
# Specify a specific network interface, like eth0
# Overridden by optional ip= bootarg
#

DEVICE=wlan0

#
# NFSROOT: [ auto | HOST:MOUNT ]
#

NFSROOT=auto

Thank you for your help,

Brandon Gomez

  • When it runs from ethernet, the router assigns IP from its dhcp. Have you tried to make dhcp server on your pc? E.g. by dhcp server, that you assign iface wlan0 instead of eth0, because dropbear seems to try to assign an IP from eth0 so you could ssh it? – Kal1Us3r Sep 11 '16 at 12:48
  • @Rui My question existed before the other one you linked. – Alexis Evelyn Jan 16 '18 at 22:53
3

Wireless is quite different from wired ethernet. Most importantly, you need to connect to the wireless network and authenticate with it (you don't need to do so on a "normal" wired network).

You systems is giving up trying to get an IP address from the network because it is not connected to any network.

On a running system you'd have NetworkManager and/or wpa_supplicant take care of this, but at this stage of the boot process those tools are not available to you (you are in initramfs!)

Not long ago I faced such issue myself on Debian (Kali is Debian based) and took the time to write up the process, it is quite long so forgive me for not putting it all here, you can read the full explanation here: enable wireless in debian initramfs (disclaimer, it's my own post).

Now, to keep this answer complete, what the link details is what you would need to do:

  • You need to get wpa_supplicant and its configuration into the initramfs
  • Bring up the network at the appropriate stage of init (I did init-premount)
  • Kill wpa_supplicant before leaving initramfs like in local-bottom.

The last bit is important or the initramfs supplicant will mess with the live system one.

I did that to setup mandos-client on the system (mandos homepages) which basically allows for a fully unattended remote root filesystem decryption.

Hope this sets you on the right track!

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.