glenda.party
term% ls -F
term% pwd
$home/manuals/9front/8/9boot
term% cat index.txt
9BOOT(8)                    System Manager's Manual                   9BOOT(8)

NAME
       9bootfat,  9bootiso, 9bootpxe, bootia32.efi, bootx64.efi, efiboot.fat -
       PC bootloader for FAT, ISO and PXE network booting

SYNOPSIS
       Started by PC BIOS/EFI or chainloaded by partition bootsector

DESCRIPTION
       9boot is the bootloader used on PCs to start the Plan  9  kernel.   Its
       task  is  to read and parse the plan9.ini(8) configuration file, gather
       some basic system information like the amount of usable system  memory,
       do  some  basic system initialization and load the kernel from the boot
       media into memory.

       After reading the configuration, the loader will automatically  attempt
       to  boot  the  kernel that was specified by the bootfile= parameter. If
       there is no such parameter, a key gets pressed on the keyboard  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 the plan9.ini(8)  file
       with key=value pairs setting boot parameters. In addition a few command
       words are recognized that are intended for interactive use:

       clear[prefix]
              can  be  used to remove parameters from the configuration.  If a
              prefix is specified, the first parameter that matches the prefix
              is removed. If the prefix argument is omitted, the whole config‐
              uration will be reset.

       show   displays the current configuration in memory.

       wait   will return to the console prompt after processing the  configu‐
              ration file preventing automatic boot.

       boot   will end the console and attempt booting the kernel.

   There are many ways to boot a PC so
       9boot  was  split  into a number of distinct programs one for each boot
       method.

FAT BOOTING
       When booting Plan 9 from a harddisk or USB pen drive, a FAT16/32 parti‐
       tion (9fat) is used to store the kernel and plan9.ini(8) configuration.
       Due to size limitations, instead of loading the  kernel  directly,  the
       bootsector  (pbs)  of  the  FAT  partition loads a 2nd stage bootloader
       (9bootfat) from the root directory of the filesystem.

CD-ROM BOOTING
       Booting from CD-ROM requires only the 9bootiso  bootloader  to  be  in‐
       cluded  in  the ISO-9660 image under /386/9bootiso, set as a non-emula‐
       tion bootblock (see -B in mk9660(8)).  Boot parameters  are  read  from
       /cfg/plan9.ini.

NETWORK BOOTING
       With  a PXE capable BIOS and network card one can download 9bootpxe and
       boot the kernel from a TFTP server (see dhcpd(8)  and  ndb(6)  for  de‐
       tails).  Once  started, 9bootpxe will read the file /cfg/pxe/$ether or,
       if this file is not present, /cfg/pxe/default  from  the  tftp  server,
       where  $ether  is the MAC address of the client's network card in lower
       case hex, and uses this as its plan9.ini(8) file.

EFI BOOTING
       EFI firmware looks for the files bootia32.efi (for 386) or  bootx64.efi
       (for amd64) in the boot media and executes them.  For local disk media,
       these  files are located in the directory /efi/boot of the FAT formated
       boot partition.  For CD-ROM media, the boot partition is provided as  a
       embedded  FAT  filesystem  image efiboot.fat (see -E in mk9660(8)).  In
       the network boot case, the bootia32.efi or bootx64.efi files  are  used
       as  the  BSP program instead of 9bootpxe.  Once started, the boot media
       (PXE, ISO, FAT) is discovered and plan9.ini(8)  configuration  is  read
       from it in the same way as with the BIOS-based 9boot* loaders.


FILES
       /386/pbs
       /386/9bootfat
       /386/9bootiso
       /386/9bootpxe
       /386/bootia32.efi
       /386/bootx64.efi
       /386/efiboot.fat

SOURCE
       /sys/src/boot/pc
       /sys/src/boot/efi

SEE ALSO
       plan9.ini(8), mk9660(8), dhcpd(8), ndb(6)

HISTORY
       9boot  first  appeared  in 9front (April, 2011).  EFI support first ap‐
       peared in 9front (Oct, 2014).

                                                                      9BOOT(8)