SliTaz GNU/Linux official and community documentation wiki.
.png
Translations of this page:

This is an old revision of the document!


PXE

PXE boot

This network boot method requires:

  • a server to store files running DHCP and TFTP (each could be on a separate server),
  • a client with a PXE bootloader. Maybe diskless.

PXE server setup

PXE server = DHCP server + DHCP bootfile option + TFTP server

Demo with a Slitaz Live CD: Launch netbox (menu System / netbox)

  • in Static IP tab click start. This box will be the DHCP server. It can't use DHCP to get IP configuration.
  • in Server / INETD tab ensure tftpd line is uncommented (by default) in /etc/initd.conf and click start. (launch the TFTP server)
  • in Server / PXE tab edit configuration and add your boot options. This action will update dhcp server configuration automatically. (configure bootfile option)
  • in Server / DHCP tab check configuration. Previous action has added the lines boot_file and siaddr. Then click start. (launch the DHCP server)
  • ensure files bzImage and rootfs.gz are stored in /boot

PXE client bootloader

Most recent machines with embedded ethernet have PXE BIOS. Look for this feature in BIOS menus and BIOS boot menu. Otherwise create a cdrom or a boot floppy with System → Boot floppy/cdrom creation tool. In PXE Network tab click Write floppy. And boot on it. Your ethernet card is not recognized ? See http://rom-o-matic.net/

PXE boot without PXE server: WEB boot

See http://boot.slitaz.org/ You need a DHCP server to get ip address, netmask, gateway address.

PXE boot without DHCP server: WEB boot and command line

See http://boot.slitaz.org/. You need an ip address with a netmask, a gateway address and optionally a dns address. Example using grub:

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 hack boot url (see below): Replace

 http://mirror.slitaz.org/pxe/pxelinux.0 

With

ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0

Only ip= gw= dns= url= and nodhcp keywords are recognized. nodhcp is useful to avoid dhcp timeout.

WEB boot with embedded PXE boot prom (PXE forwarder)

Configure a PXE server with http://download.tuxfamily.org/slitaz/boot/gpxe.pxe as bootfile, a 42Kb second stage loader. Successfully tested with a http://openwrt.org/ 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 

Hack gpxe default WEB boot URL

The URL is stored at offset 519 in 255 bytes max Show current URL

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

Change URL

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

Change URL and IP stuff

$ 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

Remove URL Will behave as a normal gpxe.

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

Hack gpxe.pxe default WEB boot URL

The URL is stored at offset 5 in 255 bytes max Show current URL

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

Change URL

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

Remove URL

Will behave as a normal gpxe.pxe.

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

Redundant 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


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 Suggest briefly



 
en/guides/pxe.1272987890.txt.gz · Last modified: 2010/07/08 17:17 (external edit)