booting 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. .TH BOOTING 8
  2. .SH NAME
  3. booting \- bootstrapping procedures
  4. .SH SYNOPSIS
  5. none
  6. .SH DESCRIPTION
  7. This manual page collects the incantations required to bootstrap Plan 9 machines.
  8. Some of the information here is specific to the installation at Bell Labs;
  9. some is generic.
  10. .PP
  11. If a CPU server is up, BOOTP/DHCP and TFTP will run from there;
  12. if not, the necessary files and services must be available on a separate machine,
  13. such as a Unix system, to use these protocols for bootstrapping.
  14. .PP
  15. Be sure to read
  16. .IR boot (8)
  17. to understand what happens after the kernel is loaded.
  18. .SS Terminals
  19. To bootstrap a diskless terminal or a CPU server, a file server must be running.
  20. PCs can boot from a floppy disk or any FAT16 partition.
  21. On all the terminals, typing two control-T's followed by a lower-case
  22. .B r
  23. reboots the machine;
  24. other methods of rebooting are mentioned for some machines.
  25. .SS PCs
  26. To boot a PC, it is necessary to get
  27. .B /386/9boot
  28. or
  29. .B /386/9load
  30. loaded into memory.
  31. There are many ways to do this. A Plan 9 boot floppy prepared by
  32. .B format
  33. (see
  34. .IR prep (8))
  35. will load
  36. .B 9load
  37. when the PC is reset or powered on.
  38. Other methods are described in
  39. .IR 9boot (8).
  40. .I 9boot
  41. or
  42. .I 9load
  43. then locates and loads a Plan 9 kernel, using configuration information
  44. from the matching file in
  45. .B /cfg/pxe
  46. .RI ( 9boot )
  47. or the file
  48. .B plan9.ini
  49. stored in the
  50. .B 9fat
  51. configuration partition or on a DOS file system
  52. .RI ( 9load ).
  53. See
  54. .IR 9boot (8)
  55. program is used to load the kernel
  56. .B /386/9pc
  57. into memory.
  58. .PP
  59. Once the kernel is booted, it behaves like the others.
  60. See
  61. .IR boot (8)
  62. for details.
  63. .SS CPU Servers
  64. The Plan 9 CPU servers are multi-user, so they do not request a user name
  65. when booting.
  66. On the CPU servers, typing a control-P on the console reboots the machine.
  67. .SS PC CPU Server
  68. Proceed as for the PC terminal, but load
  69. .B /386/9pccpu
  70. or
  71. .BR /386/9pccpudisk .
  72. .
  73. .SS MIPS Routerboard CPU Server
  74. Configure RouterBOOT via the serial port (115200 baud)
  75. to always boot from Ethernet via DHCP and TFTP, and arrange to load the ELF executable
  76. .B /mips/9rb
  77. in
  78. .IR ndb (6).
  79. .IP
  80. The following is from 9front, and may not apply to Harvey (yet).
  81. Proceed as for the PC terminal, but have
  82. .B service=cpu
  83. set in
  84. .IR plan9.ini (8).
  85. .SS SGI Challenge multiprocessor CPU Server
  86. The Challenge ROM monitor can boot from the Ethernet.
  87. To boot from the Ethernet, type
  88. .IP
  89. .EX
  90. .B bootp()/mips/9ch
  91. .EE
  92. .PP
  93. or use the ROM command
  94. .B setenv
  95. to set the variable
  96. .B bootfile
  97. to that same string and type
  98. .BR boot .
  99. To load a different file, tell
  100. .B bootp
  101. which file to load,
  102. and to force the download to come from a particular system,
  103. .BR bootp()system:file .
  104. Any arguments after
  105. .B bootp()file
  106. are passed to
  107. .BR /boot .
  108. If you are running a Plan 9
  109. .SM BOOTP
  110. server (see
  111. .IR dhcpd (8)),
  112. the file name can be omitted and the
  113. file specified by the
  114. .B bootf
  115. parameter for the machine in
  116. .B /lib/ndb
  117. will be downloaded by default.
  118. .PP
  119. Once the kernel is loaded,
  120. it prompts for the Ethernet
  121. protocol to use to reach the root file server; request the default.
  122. .
  123. .SS ARM Systems
  124. All ARM systems are started by
  125. .I U-boot
  126. using similar commands.
  127. The kernels
  128. (and thus
  129. .I ndb
  130. .L bootf
  131. parameters)
  132. are
  133. .TF /arm/9beagl
  134. .TP
  135. .L /arm/9gd
  136. for the Marvell PXA168-based Guruplug Display
  137. .TP
  138. .L /arm/9plug
  139. for other Marvell Kirkwoods (Sheevaplug, Guruplug, Dreamplug, Openrd, etc.)
  140. .TP
  141. .L /arm/9beagle
  142. for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo)
  143. .TP
  144. .L /arm/9ts
  145. for Trimslice systems, which contain the Nvidia Tegra 2
  146. .TP
  147. .L /arm/9pi
  148. .TP
  149. .L /arm/9picpu
  150. for Raspberry Pis
  151. .PD
  152. .LP
  153. In the following,
  154. replace
  155. .I MAC
  156. with your board's MAC address without colons,
  157. in lower case
  158. (the format of the
  159. .L ether
  160. .I ndb
  161. attribute).
  162. If loading from a non-Plan-9
  163. TFTP server,
  164. replace
  165. .L %C
  166. with
  167. .BI /cfg/pxe/ MAC.
  168. .PP
  169. First, establish a
  170. .I /cfg/pxe
  171. (\c
  172. .IR plan9.ini )
  173. file for the new CPU server.
  174. For Kirkwood plugs,
  175. .IP
  176. .EX
  177. cd /cfg/pxe; cp example-kw \fIMAC
  178. .EE
  179. .PP
  180. and edit
  181. .L /cfg/pxe/\fIMAC
  182. to taste.
  183. For PXA plugs, replace
  184. .L kw
  185. with
  186. .LR pxa ;
  187. for OMAP boards, replace
  188. .L kw
  189. with
  190. .LR omap
  191. and
  192. be sure to edit the line for
  193. .L ether0
  194. to set
  195. .IP
  196. .EX
  197. ea=\fIMAC
  198. .EE
  199. .PP
  200. Second,
  201. configure
  202. .I U-boot
  203. to load the appropriate kernel and
  204. .I /cfg/pxe
  205. file at suitable addresses and start the kernel.
  206. For Sheevaplugs and Openrd boards,
  207. type this at U-boot once:
  208. .IP
  209. .EX
  210. setenv bootdelay 2
  211. # \fItype the next two lines as one\fP
  212. setenv bootcmd 'bootp; bootp; tftp 0x1000 %C; bootp; tftp 0x800000;
  213. go 0x800000'
  214. saveenv
  215. .EE
  216. .PP
  217. For Guruplugs Displays,
  218. do the same but type this after
  219. .L "setenv bootcmd"
  220. instead:
  221. .IP
  222. .EX
  223. \&'dhcp; tftpboot; tftpboot 0x1000 %C; bootz 0x500000'
  224. .EE
  225. .PP
  226. For Kirkwood Guruplugs,
  227. type this after
  228. .LR "setenv bootcmd" :
  229. .IP
  230. .EX
  231. \&'dhcp 0x800000; tftp 0x1000 %C; go 0x800000'
  232. .EE
  233. .PP
  234. For IGEPv2 boards,
  235. type this after
  236. .LR "setenv bootcmd" :
  237. .IP
  238. .EX
  239. \&'tftp 0x80300000 %C; dhcp 0x80310000; go 0x80310000'
  240. .EE
  241. .PP
  242. For Gumstix Overo boards,
  243. type this after
  244. .LR "setenv bootcmd" :
  245. .IP
  246. .EX
  247. \&'bootp 0x80310000; bootp 0x80300000 %C; go 0x80310000'
  248. .EE
  249. .PP
  250. For Trimslice systems,
  251. type this after
  252. .LR "setenv bootcmd" :
  253. .IP
  254. .EX
  255. \&'dhcp; dhcp; tftpboot 0x410000; tftpboot 0x400000 %C; go 0x410000'
  256. .EE
  257. .PP
  258. For Raspberry Pis,
  259. .I gunzip
  260. the
  261. .B pi.uboot.sd.img.gz
  262. named below onto an SD card and insert that into your Pi.
  263. .PP
  264. Thereafter, the boards will automatically boot via BOOTP and TFTP
  265. when reset.
  266. .
  267. .SH FILES
  268. .B /n/sources/extra/pi.uboot.sd.img.gz
  269. is a compressed bootable SD card image for Raspberry Pi, uses PXE booting.
  270. .SH SOURCE
  271. .B /sys/src/boot
  272. .br
  273. .B /sys/src/9/pcboot
  274. .SH "SEE ALSO"
  275. .IR ndb (6),
  276. .IR 9boot (8),
  277. .IR boot (8),
  278. .IR init (8),
  279. .IR plan9.ini (8)