Is it possible to boot a linux distro via a PXE using a WiFi adapter?
Yes and no, yes because this is really working and no because you need something installed on the machine that initializes the WiFi adapter, sets the essid, encryption key and so on.
As a proof of concept I managed it to get this work on a T-Online Vision S100 (which is a normal x86 machine). This machine is best suitable for it because it comes with a 32 MB DOM (disc on memory) which offers enough space for the image (which is about 2.5 MB in size).
On startup the linux kernel is loaded which starts init in the rootfs. init now initialises the WiFi adapter setting the essid and encryption key supported by the passed kernel boot parameters. After that an IP address is requested using DHCP. The DHCP response contains the ip address of the TFTP server we are requesting the pxelinux config file from. The downloaded config contains all needed informations to start the “real” system: kernel and append line containing the name of the initrd.
These two files (kernel and initrd) are downloaded using the existing WiFi connection and the new kernel is started using kexec.
Of couse kexec can execute linux kernels only (but I can’t imagine any other OS you’d like to start on that beautiful hardware :-)).
Please consider that the booted system cannot access the WiFi connection (the connection is not available anymore when the new kernel is started). There are two choices:
- Boot a kernel/initrd that runs completely out of the RAM
- Build an initrd that brings up the WiFi connection again and mounts the rootfs via NFS after that
I prefered the second choice. Please read https://pfichtner.wordpress.com/2009/08/31/access-ubuntus-nfs-rootfs-using-a-wifi-connection/ how I to get an ubuntu mounting its rootfs via a WiFi connection.
The whole system is based on a tiny linux kernel and a root filesystem based on uclibc and busybox. You can download the image (or the build scripts/config files) from https://sourceforge.net/projects/s100-wifi-boot/files/ which is thougth to be used on the S100. Nevertheless because it’s based on a vanilla kernel it’s possible to build any kernel module for other WiFi cards so this approach should work on any hardware supported by linux.