SDB:IPXE booting

Jump to: navigation, search

iPXE is an enhanced open-source bootloader similar to PXE. This article describes what it is good for and how to get it working.

Introduction

iPXE is a bootloader that allows to load an Operating-System over the network. In addition to PXE's DHCP+TFTP it supports HTTP, WLAN, AoE, iSCSI, FCoE

One disadvantage of iPXE is that it is not included in default BIOS/NIC boot ROMs. But you can boot it from USB, CD-ROM, PXE or even burn it into (some) flashes.

One great use-case is with testing openSUSE-Factory installs, where you normally would have to re-download and re-image the current iso, which over time can use up many CD-ROMs or wear down your USB flash storage. But with iPXE, you can just write the bootloader once and have it download everything else over HTTP in the current version. This setup is described below.

Setup

The easiest way to get a working media of your choice is to download it from git and build it like this

cat >myscript.ipxe <<EOF
#!ipxe
dhcp
chain http://example.com/your/script.ipxe
EOF
make bin/ipxe.iso EMBED=myscript.ipxe

and at the chainload URL you return a script like this to have a machine boot into the installer:

#!ipxe
kernel http://download.opensuse.org/factory/repo/oss/boot/i386/loader/linux splash=silent install=http://download.opensuse.org/factory/repo/oss/
initrd http://download.opensuse.org/factory/repo/oss/boot/i386/loader/initrd
boot

You can also redirect to another existing config file to boot a kiwi-built pxeboot live image running from RAM

#!ipxe
chain http://www.zq1.de/ipxe/boot.ipxe


Once you burn the above ipxe.iso to a CDROM you can keep using it to install the openSUSE version of your choice. You can even adapt the script on your server later to make it do completely different things.

Prebuilt images

You can use http://www.zq1.de/ipxe/ iso or usb files with a menu for openSUSE

Prebuilt ipxe image can be generated online at http://rom-o-matic.eu/ , you only need to provide the configuration file contents.


Demo

Video of iPXE boot demo with openSUSE