BOOTING(8) BOOTING(8) NAME booting - bootstrapping procedures SYNOPSIS none DESCRIPTION This manual page collects the incantations required to bootstrap Plan 9 machines. Some of the information here is specific to the installation at Bell Labs; some is generic. If a CPU server is up, BOOTP/DHCP and TFTP will run from there; if not, the necessary files and services must be available on a separate machine, such as a Unix system, to use these protocols for bootstrapping. Be sure to read boot(8) to understand what happens after the kernel is loaded. Terminals To bootstrap a diskless terminal or a CPU server, a file server must be running. PCs can boot from a floppy disk or any FAT16 partition. On all the terminals, typing two control-T's followed by a lower-case r reboots the machine; other methods of rebooting are mentioned for some machines. PCs To boot a PC, it is necessary to get /386/9load loaded into memory. There are many ways to do this. A Plan 9 boot floppy prepared by format (see prep(8)) will load 9load when the PC is reset or powered on. Other methods are described in 9load(8). 9load then locates and loads a Plan 9 kernel, using configuration information from the file plan9.ini stored in the 9fat configuration partition or on a DOS file system. See 9load(8) for details. Once the kernel is booted, it behaves like the others. See boot(8) for details. Alpha PCs Alpha PCs must be booted via TFTP using the SRM console. If the system has ARC firmware instead, SRM may be downloaded from http://www.compaq.com/ You must configure the SRM firmware to load the file /alpha/bootalphapc. The following commands may be used (replace ewa0 with the name of your ethernet device, if dif- ferent): Page 1 Plan 9 (printed 12/22/24) BOOTING(8) BOOTING(8) set boot_reset ON set boot_file /alpha/bootalphapc set bootdef_dev ewa0 set ewa0_inet_init bootp set ewa0_protocols BOOTP This secondary bootstrap program will first load the file /alpha/conf/<IP-address> (substituting the IP address of the system as obtained via bootp). This file is expected to be in plan9.ini(8) format (the file /alpha/conf/10.0.0.2 may be used as a template). It then loads the kernel via tftp, using the value of bootfile to tell it which file to load; this should be /alpha/9apc for terminals. CPU Servers The Plan 9 CPU servers are multi-user, so they do not request a user name when booting. On the CPU servers, typ- ing a control-P on the console reboots the machine. PC CPU Server Proceed as for the PC terminal, but load /386/9pccpu or /386/9pccpudisk. Alpha PC CPU Server Proceed as for the Alpha PC terminal, but use /alpha/9apccpu as the value of bootfile. SGI Challenge multiprocessor CPU Server The Challenge ROM monitor can boot from the Ethernet. To boot from the Ethernet, type bootp()/mips/9ch or use the ROM command setenv to set the variable bootfile to that same string and type boot. To load a different file, tell bootp which file to load, and to force the down- load to come from a particular system, bootp()system:file. Any arguments after bootp()file are passed to /boot. If you are running a Plan 9 BOOTP server (see dhcpd(8)), the file name can be omitted and the file specified by the bootf parameter for the machine in /lib/ndb will be downloaded by default. Once the kernel is loaded, it prompts for the Ethernet pro- tocol to use to reach the root file server; request the default. ARM CPU Servers All ARM systems are started by U-boot using similar com- mands. The kernels (and thus ndb `bootf' parameters) are `/arm/9gd' for the Marvell PXA168-based Guruplug Display Page 2 Plan 9 (printed 12/22/24) BOOTING(8) BOOTING(8) `/arm/9plug' for other Marvell Kirkwoods (Sheevaplug, Guru- plug, Dreamplug, Openrd, etc.) `/arm/9beagle' for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo) `/arm/9ts' for Trimslice systems, which contain the Nvidia Tegra 2 `/arm/9pi' `/arm/9picpu' for Raspberry Pis In the following, replace MAC with your board's MAC address without colons, in lower case (the format of the `ether' ndb attribute). If loading from a non-Plan-9 TFTP server, replace `%C' with /cfg/pxe/MAC. First, establish a /cfg/pxe (plan9.ini) file for the new CPU server. For Kirkwood plugs, cd /cfg/pxe; cp example-kw MAC and edit `/cfg/pxe/MAC' to taste. For PXA plugs, replace `kw' with `pxa'; for OMAP boards, replace `kw' with `omap' and be sure to edit the line for `ether0' to set ea=MAC Second, configure U-boot to load the appropriate kernel and /cfg/pxe file at suitable addresses and start the kernel. For Sheevaplugs and Openrd boards, type this at U-boot once: setenv bootdelay 2 # type the next two lines as one setenv bootcmd 'bootp; bootp; tftp 0x1000 %C; bootp; tftp 0x800000; go 0x800000' saveenv For Guruplugs Displays, do the same but type this after `setenv bootcmd' instead: 'dhcp; tftpboot; tftpboot 0x1000 %C; bootz 0x500000' For Kirkwood Guruplugs, type this after `setenv bootcmd': 'dhcp 0x800000; tftp 0x1000 %C; go 0x800000' For IGEPv2 boards, type this after `setenv bootcmd': 'tftp 0x80300000 %C; dhcp 0x80310000; go 0x80310000' For Gumstix Overo boards, type this after `setenv bootcmd': Page 3 Plan 9 (printed 12/22/24) BOOTING(8) BOOTING(8) 'bootp 0x80310000; bootp 0x80300000 %C; go 0x80310000' For Trimslice systems, type this after `setenv bootcmd': 'dhcp; dhcp; tftpboot 0x410000; tftpboot 0x400000 %C; go 0x410000' For Raspberry Pis (if using U-boot, which is not the default), type this after `setenv bootcmd': 'usb start; dhcp; tftp 100 %C; go 8000' Thereafter, the boards will automatically boot via BOOTP and TFTP when reset. File servers The CPU servers and terminals run essentially the same pro- gram, but the Plan 9 file servers run a distinct system. The file servers accept only the commands described in fs(8) on their consoles. PC File Server Boot the PC file server like a regular PC, loading the appropriate file system kernel. SEE ALSO 9load(8), boot(8), fs(8), init(8), plan9.ini(8) SOURCE Sources for the various boot programs are under /sys/src/boot. BUGS The file server should be able to boot from its own disk. Page 4 Plan 9 (printed 12/22/24)