Table of Contents

PXE

The Preboot eXecution Environment (or PXE, pronounced 'pixie') is the process of booting a computer from a network connection. It is comparable to booting a LiveCD from a remote CD drive.

This network boot method requires:


PXE Server Set-Up

A PXE server comprises:

Quick start with the Live CD

The SliTaz LiveCD can be used as a PXE server. To begin the process, launch the Netbox application (from the System Tools menu).

Since SliTaz 3.0 the Netbox application is now split into Netbox and Serverbox. If you are running a recent SliTaz version, please read Serverbox application instead of Server tab below

Customize your PXE server


Test the PXE server with QEMU


PXE Client Set-Up

Most recent machines with on-board Ethernet have a PXE-capable BIOS. Look for this feature in BIOS menus and the BIOS boot menu and ensure it is activated. It may require you press a key, such as F12, during the boot process.

If your computer does not support PXE booting, you can use SliTaz as a client instead. Create a bootable CD-ROM or floppy disk with the Boot Floppy/CDROM tool found in the System Tools menu.

In the PXE Network tab click Write floppy. Use this to boot the client computer.

Is your Ethernet card not recognised? See ROM-O-Matic


Web Booting

The SliTaz LiveCD has configuration settings to start your computer via the Internet. This is useful for using a newer version of SliTaz from older media.

You can start the automatic process with the following command at the SliTaz LiveCD boot-splash:

web

That's it!

You can find more information on using an Internet connection to boot your computer at the SliTaz Web Boot home-page.

You will need a DHCP server to get an IP address, netmask, gateway address, as per a normal network connection – a standard home router should be sufficient for this.


PXE boot without DHCP server: Web Boot & Command Line

If you have no device that can function as a DHCP server, you need an IP address with a netmask, gateway address and, optionally, a DNS address.

title Slitaz Web
  kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0

You can modify the URL thus:

title Slitaz Web
  kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 ip=192.168.0.12/24 gw=192.168.0.1
  dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0

Note that only the following keywords are recognised:


Advanced Web Booting Configuration

The Web Booting process can be embedded into routers and other devices, as well as being customised.


Embedded Web Boot, with PXE boot PROM (PXE forwarder)

Configure a PXE server with http://download.tuxfamily.org/slitaz/boot/gpxe.pxe as the boot file, a 42Kb second stage loader. This was successfully tested with an OpenWRT router:

# echo "dhcp-boot=gpxe.pxe" >> /tmp/dnsmasq.conf

Launch the tftp server for your lan (say 192.168.0.1/24)

# /jffs/usr/sbin/tftpd 192.168.0.1 /jffs/boot

You can avoid the tftp server installation and use the SliTaz tftp server directly :

# echo "dhcp-boot=gpxe.pxe,mirror.slitaz.org" >> /tmp/dnsmasq.conf


Modifying the Default GPXE Web Boot URL

The URL is stored at offset 519 in 255 bytes max.

$ dd bs=1 skip=519 count=255 if=gpxe 2> /dev/null | strings
$ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
$ echo -n "ip=192.168.0.10/24 gw=192.168.0.1 dns=192.168.0.1 url=http://myurl.org/myboot" | cat - /dev/zero | dd
conv=notrunc bs=1 seek=519 count=255 of=gpxe
$ dd if=/dev/zero conv=notrunc bs=1 seek=519 count=255 of=gpxe


Hack the gpxe.pxe Default Web Boot URL

The URL is stored at offset 5 in 255 bytes max.

Show the current URL with:

$ dd bs=1 skip=5 count=255 if=gpxe.pxe 2> /dev/null | strings

Change the URL with:

$ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe

Remove the URL and behave as a normal gpxe.pxe with:

$ dd if=/dev/zero conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe


Using Redundancy with Web Boot Servers

Comma separated URL lists are supported.

The PXE client will try to load the first URL. If the load fails, it will try the next URL, and so on.

Example with current Slitaz Web boot servers :

$ echo -n "http://mirror.slitaz.org/pxe/pxelinux.0,http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,http:
download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe

Why use PXE ? The VNC example

Let's say that your company is working on some very sensitive data. You don't want people copying anything on to removable media such as USB keys. Only a few users can use this data.

Increase security a bit

The VNC listens to the network without a password (fbvnc has no authentication support) and the VNC traffic is not encrypted on the network.

A quick demo

The menu Tiny SliTazTiny VNC of the SliTaz Web Boot launches the VNC client without ssh (you need a VNC server running on your network…).

You can directly download the kernel and then the initramfs and test it on your network or with qemu

Try with the cmdline argument vga=ask first. This will find the best VESA mode to use (example vga=0x33B)



Page Review Section
Quality Good
Review Minor Updates
Priority Medium
Problems add a forum post link
OR add a lab issue tracker link
How to Improve Improve readability
Section in to Client/Server, with Simple/Advanced in each