booting 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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/9load
  28. or
  29. .B /386/9pxeload
  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 9load (8).
  40. .B 9load
  41. then locates and loads a Plan 9 kernel, using configuration information
  42. from the file
  43. .B plan9.ini
  44. stored in the
  45. .B 9fat
  46. configuration partition or on a DOS file system.
  47. See
  48. .IR 9load (8)
  49. for details.
  50. .PP
  51. Once the kernel is booted, it behaves like the others.
  52. See
  53. .IR boot (8)
  54. for details.
  55. .SS Alpha PCs
  56. Alpha PCs must be booted via TFTP using the SRM console.
  57. If the system has ARC firmware instead, SRM may be downloaded from
  58. .IP
  59. .EX
  60. http://www.compaq.com/
  61. .EE
  62. .PP
  63. You must configure the SRM firmware to load the file
  64. .BR /alpha/bootalphapc .
  65. The following commands may be used (replace
  66. .B ewa0
  67. with the name of your ethernet device, if different):
  68. .IP
  69. .EX
  70. set boot_reset ON
  71. set boot_file /alpha/bootalphapc
  72. set bootdef_dev ewa0
  73. set ewa0_inet_init bootp
  74. set ewa0_protocols BOOTP
  75. .EE
  76. .PP
  77. This secondary bootstrap program will first load the file
  78. .BR /alpha/conf/ <IP-address>
  79. (substituting the IP address of the system as obtained via bootp).
  80. This file is expected to be in
  81. .IR plan9.ini (8)
  82. format (the file
  83. .B /alpha/conf/10.0.0.2
  84. may be used as a template).
  85. It then loads the kernel via tftp, using the value of
  86. .B bootfile
  87. to tell it which file to load; this should be
  88. .B /alpha/9apc
  89. for terminals.
  90. .SS CPU Servers
  91. The Plan 9 CPU servers are multi-user, so they do not request a user name
  92. when booting.
  93. On the CPU servers, typing a control-P on the console reboots the machine.
  94. .SS PC CPU Server
  95. Proceed as for the PC terminal, but load
  96. .B /386/9pccpu
  97. or
  98. .BR /386/9pccpudisk .
  99. .SS Alpha PC CPU Server
  100. Proceed as for the Alpha PC terminal, but use
  101. .B /alpha/9apccpu
  102. as the value of
  103. .BR bootfile .
  104. .SS SGI Challenge multiprocessor CPU Server
  105. The Challenge ROM monitor can boot from the Ethernet.
  106. To boot from the Ethernet, type
  107. .IP
  108. .EX
  109. .B bootp()/mips/9ch
  110. .EE
  111. .PP
  112. or use the ROM command
  113. .B setenv
  114. to set the variable
  115. .B bootfile
  116. to that same string and type
  117. .BR boot .
  118. To load a different file, tell
  119. .B bootp
  120. which file to load,
  121. and to force the download to come from a particular system,
  122. .BR bootp()system:file .
  123. Any arguments after
  124. .B bootp()file
  125. are passed to
  126. .BR /boot .
  127. If you are running a Plan 9
  128. .SM BOOTP
  129. server (see
  130. .IR dhcpd (8)),
  131. the file name can be omitted and the
  132. file specified by the
  133. .B bootf
  134. parameter for the machine in
  135. .B /lib/ndb
  136. will be downloaded by default.
  137. .PP
  138. Once the kernel is loaded,
  139. it prompts for the Ethernet
  140. protocol to use to reach the root file server; request the default.
  141. .
  142. .SS ARM CPU Servers
  143. All ARM systems are started by
  144. .I U-boot
  145. using similar commands.
  146. The kernels
  147. (and thus
  148. .I ndb
  149. .L bootf
  150. parameters)
  151. are
  152. .L /arm/9gd
  153. for the Marvell PXA168-based Guruplug Display,
  154. .L /arm/9plug
  155. for all Marvell Kirkwood plugs (Sheevaplug, Guruplug, Dreamplug, Openrd, etc.),
  156. and
  157. .L /arm/9beagle
  158. for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo).
  159. In the following,
  160. replace
  161. .I MAC
  162. with your board's MAC address without colons,
  163. in lower case
  164. (the format of the
  165. .L ether
  166. .I ndb
  167. attribute).
  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 /cfg/pxe/\fIMAC\fP; bootp;
  213. tftp 0x800000; 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 /cfg/pxe/\fIMAC\fP; 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 /cfg/pxe/\fIMAC\fP; 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 /cfg/pxe/\fIMAC\fP; 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 /cfg/pxe/\fIMAC\fP; go 0x80310000'
  248. .EE
  249. .PP
  250. Thereafter, the boards will automatically boot via BOOTP and TFTP
  251. when reset.
  252. .
  253. .SH "SEE ALSO"
  254. .IR ndb (6),
  255. .IR 9load (8),
  256. .IR boot (8),
  257. .IR init (8),
  258. .IR plan9.ini (8)
  259. .SH SOURCE
  260. Sources for the various boot programs are under
  261. .BR /sys/src/boot .