1.\" $NetBSD: boot.8,v 1.5 1998/03/23 03:47:18 jonathan 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 at the beginning of physical memory 49and 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 network boots, () may be specified instead of (0,0,0). 80.Pp 81The filename is optional for bootp/tftp and mop booting, since in 82these cases the network protocol can be used to determine which 83file to boot. When booting off the tape, no filename should be 84specified, and when booting off of disk, the filename of a kernel 85must be specified. Generally, the kernel is named 86.Nm netbsd. 87.Pp 88An example bootpath setting would be: 89.nf 90.sp 1 91.ce 1 92setenv bootpath rz(0,1,0)netbsd 93.fi 94.Pp 95For automatic boots, the ROM automatically passes a 96.Fl a 97argument to the boot 98loader, requesting that 99.Nx 100attempt to come up to multi-user mode. At the boot ROM prompt, 101the user may boot 102.Nx 103with either the 104.Nm auto 105or the 106.Nm boot 107command. If the 108.Nm auto 109command is used, the 110.Fl a 111argument is passed to the kernel, requesting a multi-user boot; otherwise 112the 113.Fl s 114argument is passed, requesting that 115.Nx 116boot to single user mode. 117.Pp 118When either the 119.Nm boot 120or the 121.Nm auto 122command is issued with no arguments, the kernel specified in the bootpath 123environment variable is booted. An alternative kernel may be specified 124with the 125.Fl f 126flag, followed by the path of the kernel to boot, as described above. 127For example: 128.sp 1 129.ce 1 130boot -f rz(0,4,0)netbsd.new 131.Pp 132.Sh TURBOCHANNEL DECstations 133On TurboChannel machines (all DECstation 5000 models), the boot path 134is specified in the boot environment variable, along with any arguments 135to be passed to the kernel. Note that to specify boot arguments (e.g., 136.Fl a) 137when setting the 138.Nm boot 139environment variable, the filename and arguments 140must be enclosed in quotes. For example: 141.nf 142.sp 1 143.ce 1 144setenv boot "3/rz4/netbsd -a" 145.fi 146.Pp 147The device from which to boot is specified as the TurboChannel slot 148number, a TurboChannel-option-specific device name, and a path to the 149file to load, all seperated by slashes. You can get a list of the 150devices installed in your TurboChannel slots (as well as any built-in 151devices which appear as TurboChannel slots) by typing the 152.Nm cnfg 153command 154at the boot prompt. You can get more detailed information about a specific 155TurboChannel option by typing 156.Nm cnfg 157followed by the slot number of that 158option. 159.Pp 160For SCSI devices, the option-specific device identifier is either rz# for 161disks or tz# for tapes, where # is the SCSI id of the device. For network 162devices, the option-specific protocol identifier is either mop or tftp. 163Filename requirements are as for the DECstation 2100 and 3100. 164.Pp 165To start 166.Nx 167from the boot prompt, the 168.Nm boot 169command must be used. With no arguments, this simply boots the default 170kernel with the default arguments as set with 171.Nm setenv 172.Nm boot. 173If no boot environment variable is set or if an alternative kernel is to be 174booted, the path of that kernel may be specified after the boot command as 175described above, and any arguments may be passed similarly. For example: 176.sp 1 177.ce 1 178boot 3/rz4/netbsd.new -a 179.Sh KERNEL ARGUMENTS 180 181The kernel supports the following arguments: 182.Bd -unfilled -offset indent 183a Autoboot -- try and boot to multi-user mode without 184 further input. 185m use a miniroot already present in memory. 186 187 188n Ask for names of boot and dump devices. 189N Do not ask for the names of boot and dump devices. 190 If the configured-in devices are present, use them. 191s Boot only to single-user mode. 192.Ed 193.Pp 194 195Since DECstation PROMs also parse any arguments with a leading 196"-", and reject unrecognized options, arguments other than "a" or "s" 197should be specified after the kernel name with no leading "-". 198For example: 199.nf 200.sp 10 201.ce 1 202boot 3/rz4/netbsd ns 203.fi 204.Sh SEE ALSO 205.Xr crash 8m , 206.Xr ddb 4 , 207.Xr fsck 8 , 208.Xr halt 8 , 209.Xr init 8 , 210.Xr newfs 8 , 211.Xr rc 8 , 212.Xr shutdown 8 , 213.Xr syslogd 8 , 214.Xr reboot 8 215.Sh HISTORY 216The 217.Nm 218command is 219.Ud . 220