]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/9boot
7e4627d184b726e87d03aa13e2d17507951cf501
[plan9front.git] / sys / man / 8 / 9boot
1 .TH 9BOOT 8
2 .SH NAME
3 9bootfat, 9bootiso, 9bootpxe, bootia32.efi, bootx64.efi, efiboot.fat \- PC bootloader for FAT, ISO and PXE network booting
4 .SH SYNOPSIS
5 Started by PC BIOS/EFI or chainloaded by partition bootsector
6 .SH DESCRIPTION
7 9boot is the bootloader used on PCs to start the Plan 9 kernel.
8 Its task is to read and parse the
9 .IR plan9.ini (8)
10 configuration file, gather some basic system information like
11 the amount of usable system memory, do some basic system
12 initialization and load the kernel from the boot media into memory.
13
14 After reading the configuration, the loader will automatically 
15 attempt to boot the kernel that was specified by the
16 .B bootfile=
17 parameter. If there is no such parameter, a key
18 gets pressed on the keyboard or the kernel file was not
19 found then the loader enters the interactive
20 boot console.
21
22 The syntax of the boot console is the same as in the
23 .IR plan9.ini (8)
24 file with
25 .IB key = value
26 pairs setting boot parameters. In addition a few command
27 words are recognized that are intended for interactive use:
28 .TP
29 .BI clear [prefix]
30 can be used to remove parameters from the configuration.
31 If a
32 .IR prefix
33 is specified, the first parameter that matches the prefix
34 is removed. If the
35 .IR prefix
36 argument is omitted, the whole configuration will be reset.
37 .TP
38 .B show
39 displays the current configuration in memory.
40 .TP
41 .B wait
42 will return to the console prompt after processing the
43 configuration file preventing automatic boot.
44 .TP
45 .B boot
46 will end the console and attempt booting the kernel.
47 .SS
48 There are many ways to boot a PC so
49 .IR 9boot
50 was split into a number of distinct programs one for each boot
51 method.
52 .SH FAT BOOTING
53 When booting Plan 9 from a harddisk or USB pen drive, a
54 FAT16/32 partition
55 .IR (9fat) 
56 is used to store the kernel and 
57 .IR plan9.ini (8)
58 configuration. Due to size limitations, instead of loading
59 the kernel directly, the bootsector
60 .IR (pbs)
61 of the FAT partition loads
62 a 2nd stage bootloader 
63 .IR (9bootfat)
64 from the root directory of the filesystem.
65 .SH CD-ROM BOOTING
66 Booting from CD-ROM requires only the 
67 .IR 9bootiso
68 bootloader to be included in the ISO-9660 image under
69 .BR /386/9bootiso ,
70 set as a non-emulation bootblock (see
71 .B -B
72 in
73 .IR mk9660 (8)).
74 Boot parameters are read from
75 .BR /cfg/plan9.ini .
76 .SH NETWORK BOOTING
77 With a PXE capable BIOS and network card one can download
78 .IR 9bootpxe
79 and boot the kernel from a TFTP server (see
80 .IR dhcpd (8)
81 and
82 .IR ndb (6)
83 for details). Once started,
84 .IR 9bootpxe
85 will read the file
86 .B /cfg/pxe/$ether
87 or, if this file is not present,
88 .B /cfg/pxe/default
89 from the tftp server, where
90 .B $ether
91 is the MAC address of the client's network card
92 in lower case hex, and uses this as its
93 .IR plan9.ini (8)
94 file.
95 .SH EFI BOOTING
96 EFI firmware looks for the files
97 .I bootia32.efi
98 (for 386)
99 or
100 .I bootx64.efi
101 (for amd64)
102 in the boot media and executes them.
103 For local disk media, these files are located in the directory
104 .B /efi/boot
105 of the 
106 .B FAT
107 formated boot partition.
108 For 
109 .B CD-ROM
110 media, the boot partition is provided
111 as a embedded 
112 .B FAT
113 filesystem image
114 .I efiboot.fat
115 (see
116 .B -E
117 in
118 .IR mk9660 (8)).
119 In the network boot case, the
120 .I bootia32.efi
121 or
122 .I bootx64.efi
123 files are used as the
124 .B BSP
125 program instead of
126 .IR 9bootpxe .
127 Once started, the boot media 
128 .RB ( PXE ,
129 .BR ISO ,
130 .BR FAT )
131 is discovered and
132 .IR plan9.ini (8)
133 configuration is read from from it in the same way as
134 with the BIOS-based
135 .I 9boot*
136 loaders.
137
138 .SH FILES
139 .B /386/pbs
140 .br
141 .B /386/9bootfat
142 .br
143 .B /386/9bootiso
144 .br
145 .B /386/9bootpxe
146 .br
147 .B /386/bootia32.efi
148 .br
149 .B /386/bootx64.efi
150 .br
151 .B /386/efiboot.fat
152 .SH SOURCE
153 .BR /sys/src/boot/pc
154 .br
155 .BR /sys/src/boot/efi
156 .br
157 .SH "SEE ALSO"
158 .IR plan9.ini (8),
159 .IR mk9660 (8),
160 .IR dhcpd (8),
161 .IR ndb (6)
162 .SH HISTORY
163 9boot first appeared in 9front (April, 2011).
164 EFI support first appeared in 9front (Oct, 2014).