1.\" $NetBSD: boot.8,v 1.11 2001/12/26 02:06:45 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 system bootstrapping procedures 44.Sh DESCRIPTION 45The 46.Nx 47kernel is started by placing it near the beginning of physical 48memory and transferring to the entry point. 49Since the system is not reenterable, 50it is necessary to read it in from disk or tape 51each time it is to be bootstrapped. 52.Ss Power fail and crash recovery 53Normally, the system will boot itself at power-up or after crashes. 54An automatic consistency check of the file systems will be performed, 55and unless this fails, the system will resume multi-user operations. 56.Ss Cold starts 57At power up, all DECstation ROMs consult the 58.Nm haltaction 59environment 60variable in EEPROM to determine whether or not to attempt to boot 61automatically. If this 62variable is set to 63.Sq h , 64the ROM prints a prompt on the console and 65waits for user commands. If set to 66.Sq b , 67the ROM attempts to autoboot. 68.Sh DECSTATION 2100 and 3100 69On the DECstation 2100 and 3100, the path used for automatic booting is 70stored in the 71.Nm bootpath 72environment variable. The path is made up of a 73device type specifier (e.g., rz, tz, mop or tftp) followed by 74a triplet in the form (x,y,z), followed by a filename to load. 75.Pp 76Within the triplet, x is the controller (always 0), y is the SCSI id of 77the drive to 78boot from or 0 for net boots, and z is the partition to boot from 79(usually 0 for SCSI devices, always zero for network booting). 80For both disk and network boots, () may be specified instead of 81(0,0,0). 82.Pp 83The filename is optional for bootp/tftp and mop booting, since in 84these cases the network protocol can be used to determine which 85file to boot. When booting off the tape, no filename should be 86specified. When booting off of disk, the filename is optional but is usually specified. If no filename is 87specified when booting off disk, the following filenames are 88tried in order: 89.Nm netbsd.pmax , 90.Nm netbsd , 91.Nm netbsd.gz , 92.Nm netbsd.bak , 93.Nm netbsd.old , 94.Nm onetbsd , 95.Nm gennetbsd . 96Generally, the kernel is named 97.Nm netbsd . 98.Pp 99An example bootpath setting would be: 100.Dl Ic setenv bootpath rz(0,1,0)netbsd 101.Pp 102At the PROM prompt, the user may boot 103.Nx 104with either the 105.Nm auto 106or the 107.Nm boot 108command. If the 109.Nm auto 110command is used, the 111.Fl a 112argument is passed to the kernel, requesting a multi-user boot; otherwise 113the 114.Fl s 115argument is passed, requesting that 116.Nx 117boot to single user mode. 118.Pp 119When either the 120.Nm boot 121or the 122.Nm auto 123command is issued with no arguments, the kernel specified in the bootpath 124environment variable is booted. With the 125.Nm boot 126command, an alternative kernel may be specified 127with the 128.Fl f 129flag, followed by the path of the kernel to boot, as described above. 130For example: 131.Dl Ic boot -f rz(0,4,0)netbsd.new 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.Dl Ic setenv boot Dq Ic "3/rz4/netbsd -a" 142.Pp 143The device from which to boot is specified as the TurboChannel slot 144number, a TurboChannel-option-specific device name, and a path to the 145file to load, all separated by slashes. You can get a list of the 146devices installed in your TurboChannel slots (as well as any built-in 147devices which appear as TurboChannel slots) by typing the 148.Nm cnfg 149command 150at the boot prompt. You can get more detailed information about a specific 151TurboChannel option by typing 152.Nm cnfg 153followed by the slot number of that 154option. 155.Pp 156For SCSI devices, the option-specific device identifier is either rz# for 157disks or tz# for tapes, where # is the SCSI id of the device. For network 158devices, the option-specific protocol identifier is either mop or tftp. 159Filename requirements are as for the DECstation 2100 and 3100. 160.Pp 161To start 162.Nx 163from the boot prompt, the 164.Nm boot 165command must be used. With no arguments, this simply boots the default 166kernel with the default arguments as set with 167.Nm setenv 168.Nm boot . 169If no boot environment variable is set or if an alternative kernel is to be 170booted, the path of that kernel may be specified after the boot command as 171described above, and any arguments may be passed similarly. For example: 172.Dl Ic boot 3/rz4/netbsd.new -a 173.Sh KERNEL ARGUMENTS 174The kernel supports the following arguments: 175.Bl -tag -width xxx -offset indent 176.It a 177Autoboot -- try and boot to multi-user mode without 178further input. 179.It m 180use a miniroot already present in memory. 181.It n 182Ask for names of boot and dump devices. 183.It N 184Do not ask for the names of boot and dump devices. 185If the configured-in devices are present, use them. 186.It s 187Boot only to single-user mode. 188.El 189.Pp 190Since DECstation PROMs also parse any arguments with a leading 191"-", and reject unrecognized options, arguments other than "a" or "s" 192should be specified after the kernel name with no leading "-". 193For example: 194.Dl Ic boot 3/rz4/netbsd \&ns 195.Sh SEE ALSO 196.Xr ddb 4 , 197.Xr halt 8 , 198.Xr init 8 , 199.Xr installboot 8 , 200.Xr rc 8 , 201.Xr reboot 8 , 202.Xr savecore 8 , 203.Xr shutdown 8 204.Sh HISTORY 205The 206.Nm 207command is 208.Ud . 209