PXE boot using WiFi

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:

  1. Boot a kernel/initrd that runs completely out of the RAM
  2. 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.

This entry was posted in WiFi/Netboot and tagged . Bookmark the permalink.

5 Responses to PXE boot using WiFi

  1. maciunio says:

    Hi there, is it possible to get back to this topic and have some more detail “on how EXACTLY did you do it”? 🙂

    • Peter Fichtner says:

      Sorry for the long delay, I’ve been very busy the last days. Where do you need more information? How can I help you?

  2. Jean Milot says:

    Hi, i need to boot some pcon pxe with Wifi. How i can do this ? Could you explain me ?


    • Peter Fichtner says:

      Please take a look at the linked sf.net project, there you can find the binary which should work for most x86 machines. Alternatively you can also rebuild the kernel by checking out the source files.
      Please don’t hesitate to ask again if you have any questions.

  3. Pingback: ipxe with wireless lan - philo^symbol + lab

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s