How to get an ubuntu booting from an NFS share accessible only by a WiFi/WLAN adapter?
You have to modify the initialramfs:
- include the WiFi module
- initialize the adapter (essid, key, type of encryption)
- request a DHCP lease
Because ubuntu seems to have a problem with firmware loading I had to copy a udev rule and the firmware load shell script to the initramfs.
/etc/network/interfaces may not contain the wlan device!
The informations needed by initramfs to be able to configure the wlan device are provided by passing the parameters to the kernel (wkey=foo wessid=bar and so on). Please consider that the command line arguments (essid, encryption key, …) can be seen by any user that has access to the booted machine!
My kexec kernel passed these informations it gots from the pxelinux configuration to the (by kexec) started kernel automaticaly.
To get your ubuntu booting from a WiFi rootsfs you can download the additions I made to the initramfs extracting the tarball from http://sourceforge.net/projects/s100-wifi-boot/files/ and rebuild the initramfs by calling update-initramfs -vck all
Because I got problems with NFS timeouts (compare the latency/speed of a ethernet link and a WiFi link) my pxelinux configuration looks like this:
APPEND root=/dev/nfs initrd=IMAGES/s100-mpd/initrd.img nfsroot=192.168.1.1:/tftpboot/PXEClient/IMAGES/s100-mpd/ NFSOPTS=”-o ro,nolock,wsize=2048,rsize=2048,timeo=140″ verbose
(the default timeout value is 7 so I increased it by a factor of 20!)