Initramfs + wireless not working - Raspberry Pi Forums


hi! have managed build full disk encrypted raspbian pi3, following guide: https://github.com/fpunktk/raspi-fde
initram uses dropbear receive credentials , decrypts crypted partition, starting os. works, @ least if use ethernet connection while booting (wifi works after os started).

however, if unplug cable before powering-up, relying on wireless, cannot make wifi work. want pi encrypted , not cable reliant.

in initramfs, i've copied wpa_supplicant , loaded modules. don't know missing, expert user required here. configuration files.

/usr/share/initramfs-tools/hooks/wlan

code: select all

#!/bin/sh  prereq=""  prereqs() {         echo "$prereq" }  case $1 in # pre-requisites prereqs)         prereqs         exit 0         ;; esac  if [ ! -e /etc/wpa_supplicant/wpa_supplicant.conf ]; 	exit 0 fi  . /usr/share/initramfs-tools/hook-functions  copy_exec /sbin/wpa_action /sbin copy_exec /sbin/wpa_cli /sbin copy_exec /sbin/wpa_supplicant /sbin  mkdir -p $destdir/etc/network/ mkdir -p $destdir/etc/wpa_supplicant/  cp /etc/wpa_supplicant/action_wpa.sh $destdir/etc/wpa_supplicant/ cp /etc/wpa_supplicant/functions.sh $destdir/etc/wpa_supplicant/ cp /etc/wpa_supplicant/ifupdown.sh $destdir/etc/wpa_supplicant/ cp /etc/wpa_supplicant/wpa_supplicant.conf $destdir/etc/wpa_supplicant/ cp /etc/network/interfaces $destdir/etc/network/  x in crc_ccitt rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 cfg 80211 rfkill led_class; 	manual_add_modules ${x} done

/usr/share/initramfs-tools/scripts/local-top/wlan

code: select all

#!/bin/sh # boot script bring wlan interface using wpa_supplicant before rest of boot process  prereq="udev" prereqs() { 	echo "$prereq" }  case $1 in 	prereqs)         	prereqs                 exit 0                 ;; 	esac  # begin real processing below line if [ ! -x "/sbin/wpa_supplicant" ]; 	panic "wpa_supplicant executable not found" fi  . /conf/initramfs.conf  conf in conf/conf.d/*;         [ -f ${conf} ] && . ${conf} done . /scripts/functions   log_begin_msg "starting wpa_supplicant ${device}" /sbin/wpa_supplicant -b -dwext -i${device} -c /run/wpa_supplicant/ -c /etc/wpa_supplicant/wpa_supplicant.conf sleep 5 if [ ! -e "/run/wpa_supplicant/${device}" ]; 	log_failure_msg "wpa_supplicant failed ${device}" 	panic "wpa_supplicant failed ${device}" fi log_end_msg  log_begin_msg "starting ip configuration ${device}"  roundttt in 2 3 4 6 9 16 25 36 64 100;  	# nic configured if file not exist. 	# ip-config tries create file , when succeeds 	# creating file, ipconfig not run again. 	for x in /run/net-"${device}".conf ; 		[ -e "$x" ] && break 2 	done  	ipconfig -t ${roundttt} "${device}"  done  # source ipconfig output if [ -n "${device}" ]; 	# source specific bootdevice 	. /run/net-${device}.conf else 	# source interface... 	# ipconfig should have quit after first response 	. /run/net-*.conf fi  log_end_msg  exit 0

build initram via command:

code: select all

sudo mkinitramfs -o /boot/initramfs2.gz $(uname -r)

boot entry in /boot/config.txt is:

code: select all

initramfs initramfs2.gz followkernel

/boot/cmdline.txt:

code: select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mapper/crypted cryptdevice=/dev/mmcblk0p2:crypted ip=:::::eth0:dhcp rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
wlan files above have execution permission.

hi sky92,
basic questions installation:
- did have error message displayed during boot process ?
- wifi working outside initramfs (after decrypt main partition) ?
- did add required modules wifi adapter ?
- reasons add ip=:::::eth0:dhcp in cmdline.txt ?


raspberrypi



Comments

Popular posts from this blog

Help with Missing Filename Error?

ffmpeg h264_omx encoder - libomxcore.so missing. - Raspberry Pi Forums

Dtc compilation fails - Raspberry Pi Forums