booting 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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. for details.
  56. .PP
  57. Once the kernel is booted, it behaves like the others.
  58. See
  59. .IR boot (8)
  60. for details.
  61. .SS Alpha PCs
  62. Alpha PCs must be booted via TFTP using the SRM console.
  63. If the system has ARC firmware instead, SRM may be downloaded from
  64. .IP
  65. .EX
  66. http://www.compaq.com/
  67. .EE
  68. .PP
  69. You must configure the SRM firmware to load the file
  70. .BR /alpha/bootalphapc .
  71. The following commands may be used (replace
  72. .B ewa0
  73. with the name of your ethernet device, if different):
  74. .IP
  75. .EX
  76. set boot_reset ON
  77. set boot_file /alpha/bootalphapc
  78. set bootdef_dev ewa0
  79. set ewa0_inet_init bootp
  80. set ewa0_protocols BOOTP
  81. .EE
  82. .PP
  83. This secondary bootstrap program will first load the file
  84. .BR /alpha/conf/ <IP-address>
  85. (substituting the IP address of the system as obtained via bootp).
  86. This file is expected to be in
  87. .IR plan9.ini (8)
  88. format (the file
  89. .B /alpha/conf/10.0.0.2
  90. may be used as a template).
  91. It then loads the kernel via tftp, using the value of
  92. .B bootfile
  93. to tell it which file to load; this should be
  94. .B /alpha/9apc
  95. for terminals.
  96. .SS CPU Servers
  97. The Plan 9 CPU servers are multi-user, so they do not request a user name
  98. when booting.
  99. On the CPU servers, typing a control-P on the console reboots the machine.
  100. .SS PC CPU Server
  101. Proceed as for the PC terminal, but load
  102. .B /386/9pccpu
  103. or
  104. .BR /386/9pccpudisk .
  105. .SS Alpha PC CPU Server
  106. Proceed as for the Alpha PC terminal, but use
  107. .B /alpha/9apccpu
  108. as the value of
  109. .BR bootfile .
  110. .SS SGI Challenge multiprocessor CPU Server
  111. The Challenge ROM monitor can boot from the Ethernet.
  112. To boot from the Ethernet, type
  113. .IP
  114. .EX
  115. .B bootp()/mips/9ch
  116. .EE
  117. .PP
  118. or use the ROM command
  119. .B setenv
  120. to set the variable
  121. .B bootfile
  122. to that same string and type
  123. .BR boot .
  124. To load a different file, tell
  125. .B bootp
  126. which file to load,
  127. and to force the download to come from a particular system,
  128. .BR bootp()system:file .
  129. Any arguments after
  130. .B bootp()file
  131. are passed to
  132. .BR /boot .
  133. If you are running a Plan 9
  134. .SM BOOTP
  135. server (see
  136. .IR dhcpd (8)),
  137. the file name can be omitted and the
  138. file specified by the
  139. .B bootf
  140. parameter for the machine in
  141. .B /lib/ndb
  142. will be downloaded by default.
  143. .PP
  144. Once the kernel is loaded,
  145. it prompts for the Ethernet
  146. protocol to use to reach the root file server; request the default.
  147. .
  148. .SS ARM CPU Servers
  149. All ARM systems are started by
  150. .I U-boot
  151. using similar commands.
  152. The kernels
  153. (and thus
  154. .I ndb
  155. .L bootf
  156. parameters)
  157. are
  158. .TF /arm/9beagl
  159. .TP
  160. .L /arm/9gd
  161. for the Marvell PXA168-based Guruplug Display
  162. .TP
  163. .L /arm/9plug
  164. for other Marvell Kirkwoods (Sheevaplug, Guruplug, Dreamplug, Openrd, etc.)
  165. .TP
  166. .L /arm/9beagle
  167. for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo)
  168. .TP
  169. .L /arm/9ts
  170. for Trimslice systems, which contain the Nvidia Tegra 2
  171. .PD
  172. .LP
  173. In the following,
  174. replace
  175. .I MAC
  176. with your board's MAC address without colons,
  177. in lower case
  178. (the format of the
  179. .L ether
  180. .I ndb
  181. attribute).
  182. If loading from a non-Plan-9
  183. TFTP server,
  184. replace
  185. .L %C
  186. with
  187. .BI /cfg/pxe/ MAC.
  188. .PP
  189. First, establish a
  190. .I /cfg/pxe
  191. (\c
  192. .IR plan9.ini )
  193. file for the new CPU server.
  194. For Kirkwood plugs,
  195. .IP
  196. .EX
  197. cd /cfg/pxe; cp example-kw \fIMAC
  198. .EE
  199. .PP
  200. and edit
  201. .L /cfg/pxe/\fIMAC
  202. to taste.
  203. For PXA plugs, replace
  204. .L kw
  205. with
  206. .LR pxa ;
  207. for OMAP boards, replace
  208. .L kw
  209. with
  210. .LR omap
  211. and
  212. be sure to edit the line for
  213. .L ether0
  214. to set
  215. .IP
  216. .EX
  217. ea=\fIMAC
  218. .EE
  219. .PP
  220. Second,
  221. configure
  222. .I U-boot
  223. to load the appropriate kernel and
  224. .I /cfg/pxe
  225. file at suitable addresses and start the kernel.
  226. For Sheevaplugs and Openrd boards,
  227. type this at U-boot once:
  228. .IP
  229. .EX
  230. setenv bootdelay 2
  231. # \fItype the next two lines as one\fP
  232. setenv bootcmd 'bootp; bootp; tftp 0x1000 %C; bootp; tftp 0x800000;
  233. go 0x800000'
  234. saveenv
  235. .EE
  236. .PP
  237. For Guruplugs Displays,
  238. do the same but type this after
  239. .L "setenv bootcmd"
  240. instead:
  241. .IP
  242. .EX
  243. \&'dhcp; tftpboot; tftpboot 0x1000 %C; bootz 0x500000'
  244. .EE
  245. .PP
  246. For Kirkwood Guruplugs,
  247. type this after
  248. .LR "setenv bootcmd" :
  249. .IP
  250. .EX
  251. \&'dhcp 0x800000; tftp 0x1000 %C; go 0x800000'
  252. .EE
  253. .PP
  254. For IGEPv2 boards,
  255. type this after
  256. .LR "setenv bootcmd" :
  257. .IP
  258. .EX
  259. \&'tftp 0x80300000 %C; dhcp 0x80310000; go 0x80310000'
  260. .EE
  261. .PP
  262. For Gumstix Overo boards,
  263. type this after
  264. .LR "setenv bootcmd" :
  265. .IP
  266. .EX
  267. \&'bootp 0x80310000; bootp 0x80300000 %C; go 0x80310000'
  268. .EE
  269. .PP
  270. For Trimslice systems,
  271. type this after
  272. .LR "setenv bootcmd" :
  273. .IP
  274. .EX
  275. \&'dhcp; dhcp; tftpboot 0x410000; tftpboot 0x400000 %C; go 0x410000'
  276. .EE
  277. .PP
  278. Thereafter, the boards will automatically boot via BOOTP and TFTP
  279. when reset.
  280. .
  281. .SH "SEE ALSO"
  282. .IR ndb (6),
  283. .IR 9boot (8),
  284. .IR boot (8),
  285. .IR init (8),
  286. .IR plan9.ini (8)
  287. .SH SOURCE
  288. Sources for the various boot programs are under
  289. .B /sys/src/boot
  290. and
  291. .BR /sys/src/9/pcboot .