]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/9boot
merge
[plan9front.git] / sys / man / 8 / 9boot
1 .TH 9BOOT 8
2 .SH NAME
3 9bootfat, 9bootiso, 9boothyb, 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 ISO HYBRID BOOTING
77 With the
78 .I 9boothyb
79 loader, an ISO image can be made into a bootable disk by
80 creating a MBR and appending a bootable DOS partition containing
81 .I 9boothyb
82 renamed to
83 .IR 9bootfat .
84 The loader will read the ISO filesystem as if it were stored
85 on a CD-ROM drive.
86 .SH NETWORK BOOTING
87 With a PXE capable BIOS and network card one can download
88 .IR 9bootpxe
89 and boot the kernel from a TFTP server (see
90 .IR dhcpd (8)
91 and
92 .IR ndb (6)
93 for details). Once started,
94 .IR 9bootpxe
95 will read the file
96 .B /cfg/pxe/$ether
97 or, if this file is not present,
98 .B /cfg/pxe/default
99 from the tftp server, where
100 .B $ether
101 is the MAC address of the client's network card
102 in lower case hex, and uses this as its
103 .IR plan9.ini (8)
104 file.
105 .SH EFI BOOTING
106 EFI firmware looks for the files
107 .I bootia32.efi
108 (for 386)
109 or
110 .I bootx64.efi
111 (for amd64)
112 in the boot media and executes them.
113 For local disk media, these files are located in the directory
114 .B /efi/boot
115 of the 
116 .B FAT
117 formatted boot partition.
118 For 
119 .B CD-ROM
120 media, the boot partition is provided
121 as a embedded 
122 .B FAT
123 filesystem image
124 .I efiboot.fat
125 (see
126 .B -E
127 in
128 .IR mk9660 (8)).
129 In the network boot case, the
130 .I bootia32.efi
131 or
132 .I bootx64.efi
133 files are used as the
134 .B BSP
135 program instead of
136 .IR 9bootpxe .
137 Once started, the boot media 
138 .RB ( PXE ,
139 .BR ISO ,
140 .BR FAT )
141 is discovered and
142 .IR plan9.ini (8)
143 configuration is read from it in the same way as
144 with the BIOS-based
145 .I 9boot*
146 loaders.
147
148 .SH FILES
149 .B /386/pbs
150 .br
151 .B /386/9bootfat
152 .br
153 .B /386/9bootiso
154 .br
155 .B /386/9boothyb
156 .br
157 .B /386/9bootpxe
158 .br
159 .B /386/bootia32.efi
160 .br
161 .B /386/bootx64.efi
162 .br
163 .B /386/efiboot.fat
164 .SH SOURCE
165 .BR /sys/src/boot/pc
166 .br
167 .BR /sys/src/boot/efi
168 .br
169 .SH "SEE ALSO"
170 .IR plan9.ini (8),
171 .IR mk9660 (8),
172 .IR dhcpd (8),
173 .IR ndb (6)
174 .SH HISTORY
175 9boot first appeared in 9front (April, 2011).
176 EFI support first appeared in 9front (Oct, 2014).