NAME

iplfat, ipliso, iplpxe – PC bootloader for FAT, ISO and PXE network booting

SYNOPSIS

Started by PC BIOS or chainloaded by partition bootsector

DESCRIPTION

Ipl is a PC bootloader capable of loading 32– or 64–bit Plan 9 kernels. It loads configuration from plan9.ini(8), and gathers additional system information (discussed below). It loads the kernel into memory, and jumps to it in 32–bit protected mode. During operation, output is sent both to the VGA and serial consoles.
The interpreted configuration is placed at CONFADDR, 0x1200 along with any discovered hardware information. The E820 memory map is presented as *e820, and consists of 3–tuples of memory type, base address and end address. All delimiters are spaces. The configuration variable drive0 holds information about the first BIOS drive using tag=value format. The required tags are tbdf, chan, and sectors. USB drives also have the tag usb=y. For PXE–capable systems, ether0 holds information about the first PXE device. The required tags are ea, the ethernet address, and tbdf. The kernels use this information to select the first ethernet port. (see ether(3))
The loader will automatically attempt to boot the kernel specified by bootfile. If there is no such parameter, a key is pressed or the kernel file was not found then the loader enters the interactive boot console.
The syntax of the boot console is the same as in plan9.ini, except for multiple configurations (boot menus). The word clear [ prefix ] can be used to remove parameters from the current configuration. If a prefix is specified, the first matching parameter is removed. If the prefix is omitted, the whole configuration will be reset. If the word wait appears in the configuration then ipl will return to the console prompt after processing the file.
The word boot will resume booting the kernel, while panic will warm boot the machine.
The menu symtax differs from standard plan9.ini files, but the semantics are the same. The menu section contains two types of items: optionn, and default. The option syntax is optionn=blockname, Blockname is the name of the block to be included. There is no descriptive text. The syntax for default is default=blockname. With a default, ipl will wait for 10 seconds for a response, otherwise selecting the default. Without a default, ipl will wait indefinitely.
There are many ways to boot a PC; there is one ipl program for each boot method.

FAT Booting
When booting from a harddisk or USB pen drive, a FAT16/32 partition, 9fat, is used to store the kernel and plan9.ini. Due to size limitations, instead of loading the kernel directly, the bootsector, pbs, of the FAT partition loads a 2nd stage bootloader, iplfat, from the root directory of the filesystem.

CD–ROM Booting
Booting from CD–ROM requires only the ipliso bootloader to be included in the ISO–9660 image under 386/ipliso, set as a non–emulation bootblock (see mk9660(8)). Boot parameters are read from cfg/plan9.ini.

Network Booting
With a PXE capable BIOS and network card one can download iplpxe and boot the kernel from a TFTP server (see dhcpd(8) and ndb(6) for details). Once started, iplpxe will read the file /cfg/pxe/ether from the tftp server to use as its plan9.ini. Ether is the MAC address of the PXEing interface in lower case hex.

EXAMPLES

On a typical FAT–booted server, iplfat might set the following based on hardware configuration
*e820=1 0x0 0x9b000 2 0x9b000 0xa0000 [...]
2 0xff000000 0x100000000
drive0=sectors=0x1e78780 tbdf=0x2000 usb=y chan=0x5
On a typical PXE–booted server, iplpxe might also set
ea=002590c1a56e tbdf=0x0c030000
Note that drive0 is set by both iplpxe and iplfat.
This configuration file will boot from either a primary or secondary file server. To select the secondary file server, one must override the default within 10 seconds.
[menu]
option0=wrens
option1=swift
[wrens]
fs=10.220.1.17
bootfile=9cpu
[swift]
fs=10.220.1.22
bootfile=9paecpu
[common]
console=0 b115200
ether0=type=i82598
auth=10.220.1.1
nobootprompt=il –g 10.220.10.1 ether /net/ether0 10.220.1.1 /112

FILES

/386/iplmbr
/386/iplpbs
/386/iplfat
/386/ipliso
/386/iplpxe

SOURCE

/sys/src/boot/pcipl

SEE ALSO

ether(3), plan9.ini(8).

BUGS

Booting from disk requires a FAT filesystem.