1.\" $NetBSD: boot.8,v 1.8 2001/07/22 13:34:02 wiz Exp $ 2.\" 3.\" Copyright (c) 1990, 1991 The Regents of the University of California. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" the Systems Programming Group of the University of Utah Computer 8.\" Science Department. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 3. All advertising materials mentioning features or use of this software 19.\" must display the following acknowledgement: 20.\" This product includes software developed by the University of 21.\" California, Berkeley and its contributors. 22.\" 4. Neither the name of the University nor the names of its contributors 23.\" may be used to endorse or promote products derived from this software 24.\" without specific prior written permission. 25.\" 26.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36.\" SUCH DAMAGE. 37.\" 38.Dd July 23, 1991 39.Dt BOOT 8 pmax 40.Os 41.Sh NAME 42.Nm boot 43.Nd 44system bootstrapping procedures 45.Sh DESCRIPTION 46The 47.Nx 48kernel is started by placing it near the beginning of physical 49memory and transferring to the entry point. 50Since the system is not reenterable, 51it is necessary to read it in from disk or tape 52each time it is to be bootstrapped. 53.Pp 54.Sy Power fail and crash recovery. 55Normally, the system will boot itself at power-up or after crashes. 56An automatic consistency check of the file systems will be performed, 57and unless this fails, the system will resume multi-user operations. 58.Pp 59.Sy Cold starts. 60At power up, all DECstation ROMs consult the 61.Nm haltaction 62environment 63variable in EEPROM to determine whether or not to attempt to boot 64automatically. If this 65variable is set to \fBh\fR, the ROM prints a prompt on the console and 66waits for user commands. If set to \fBb\fR, the ROM attempts to autoboot. 67.Sh DECSTATION 2100 and 3100 68On the DECstation 2100 and 3100, the path used for automatic booting is 69stored in the 70.Nm bootpath 71environment variable. The path is made up of a 72device type specifier (e.g., rz, tz, mop or tftp) followed by 73a triplet in the form (x,y,z), followed by a filename to load. 74.Pp 75Within the triplet, x is the controller (always 0), y is the SCSI id of 76the drive to 77boot from or 0 for net boots, and z is the partition to boot from 78(usually 0 for SCSI devices, always zero for network booting). 79For both disk and network boots, () may be specified instead of 80(0,0,0). 81.Pp 82The filename is optional for bootp/tftp and mop booting, since in 83these cases the network protocol can be used to determine which 84file to boot. When booting off the tape, no filename should be 85specified. When booting off of disk, the filename is optional but is usually specified. If no filename is 86specified when booting off disk, the following filenames are 87tried in order: 88.Nm netbsd.pmax , 89.Nm netbsd , 90.Nm netbsd.gz , 91.Nm netbsd.bak , 92.Nm netbsd.old , 93.Nm onetbsd , 94.Nm gennetbsd . 95Generally, the kernel is named 96.Nm netbsd. 97.Pp 98An example bootpath setting would be: 99.nf 100.sp 1 101.ce 1 102setenv bootpath rz(0,1,0)netbsd 103.fi 104.Pp 105At the PROM prompt, the user may boot 106.Nx 107with either the 108.Nm auto 109or the 110.Nm boot 111command. If the 112.Nm auto 113command is used, the 114.Fl a 115argument is passed to the kernel, requesting a multi-user boot; otherwise 116the 117.Fl s 118argument is passed, requesting that 119.Nx 120boot to single user mode. 121.Pp 122When either the 123.Nm boot 124or the 125.Nm auto 126command is issued with no arguments, the kernel specified in the bootpath 127environment variable is booted. With the 128.Nm boot 129command, an alternative kernel may be specified 130with the 131.Fl f 132flag, followed by the path of the kernel to boot, as described above. 133For example: 134.sp 1 135.ce 1 136boot -f rz(0,4,0)netbsd.new 137.Pp 138.Sh TURBOCHANNEL DECstations 139On TurboChannel machines (all DECstation 5000 models), the boot path 140is specified in the boot environment variable, along with any arguments 141to be passed to the kernel. Note that to specify boot arguments (e.g., 142.Fl a) 143when setting the 144.Nm boot 145environment variable, the filename and arguments 146must be enclosed in quotes. For example: 147.nf 148.sp 1 149.ce 1 150setenv boot "3/rz4/netbsd -a" 151.fi 152.Pp 153The device from which to boot is specified as the TurboChannel slot 154number, a TurboChannel-option-specific device name, and a path to the 155file to load, all separated by slashes. You can get a list of the 156devices installed in your TurboChannel slots (as well as any built-in 157devices which appear as TurboChannel slots) by typing the 158.Nm cnfg 159command 160at the boot prompt. You can get more detailed information about a specific 161TurboChannel option by typing 162.Nm cnfg 163followed by the slot number of that 164option. 165.Pp 166For SCSI devices, the option-specific device identifier is either rz# for 167disks or tz# for tapes, where # is the SCSI id of the device. For network 168devices, the option-specific protocol identifier is either mop or tftp. 169Filename requirements are as for the DECstation 2100 and 3100. 170.Pp 171To start 172.Nx 173from the boot prompt, the 174.Nm boot 175command must be used. With no arguments, this simply boots the default 176kernel with the default arguments as set with 177.Nm setenv 178.Nm boot. 179If no boot environment variable is set or if an alternative kernel is to be 180booted, the path of that kernel may be specified after the boot command as 181described above, and any arguments may be passed similarly. For example: 182.sp 1 183.ce 1 184boot 3/rz4/netbsd.new -a 185.Sh KERNEL ARGUMENTS 186 187The kernel supports the following arguments: 188.Bd -unfilled -offset indent 189a Autoboot -- try and boot to multi-user mode without 190 further input. 191m use a miniroot already present in memory. 192 193 194n Ask for names of boot and dump devices. 195N Do not ask for the names of boot and dump devices. 196 If the configured-in devices are present, use them. 197s Boot only to single-user mode. 198.Ed 199.Pp 200 201Since DECstation PROMs also parse any arguments with a leading 202"-", and reject unrecognized options, arguments other than "a" or "s" 203should be specified after the kernel name with no leading "-". 204For example: 205.nf 206.sp 10 207.ce 1 208boot 3/rz4/netbsd ns 209.fi 210.Sh SEE ALSO 211.Xr ddb 4 , 212.Xr halt 8 , 213.Xr init 8 , 214.Xr installboot 8 , 215.Xr rc 8 , 216.Xr reboot 8 , 217.Xr savecore 8 , 218.Xr shutdown 8 219.Sh HISTORY 220The 221.Nm 222command is 223.Ud . 224