1.\" $NetBSD: boot.8,v 1.13 2003/08/07 10:31:26 agc 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. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.Dd April 8, 2003 35.Dt BOOT 8 pmax 36.Os 37.Sh NAME 38.Nm boot 39.Nd system bootstrapping procedures 40.Sh DESCRIPTION 41The 42.Nx 43kernel is started by placing it near the beginning of physical 44memory and transferring to the entry point. 45Since the system is not reenterable, 46it is necessary to read it in from disk or tape 47each time it is to be bootstrapped. 48.Ss Power fail and crash recovery 49Normally, the system will boot itself at power-up or after crashes. 50An automatic consistency check of the file systems will be performed, 51and unless this fails, the system will resume multi-user operations. 52.Ss Cold starts 53At power up, all DECstation ROMs consult the 54.Nm haltaction 55environment 56variable in EEPROM to determine whether or not to attempt to boot 57automatically. If this 58variable is set to 59.Sq h , 60the ROM prints a prompt on the console and 61waits for user commands. If set to 62.Sq b , 63the ROM attempts to autoboot. 64.Sh DECSTATION 2100 and 3100 65On the DECstation 2100 and 3100, the path used for automatic booting is 66stored in the 67.Nm bootpath 68environment variable. The path is made up of a 69device type specifier (e.g., rz, tz, mop or tftp) followed by 70a triplet in the form (x,y,z), followed by a filename to load. 71.Pp 72Within the triplet, x is the controller (always 0), y is the SCSI id of 73the drive to 74boot from or 0 for net boots, and z is the partition to boot from 75(usually 0 for SCSI devices, always zero for network booting). 76For both disk and network boots, () may be specified instead of 77(0,0,0). 78.Pp 79The filename is optional for bootp/tftp and mop booting, since in 80these cases the network protocol can be used to determine which 81file to boot. When booting off the tape, no filename should be 82specified. When booting off of disk, the filename is optional but is usually specified. If no filename is 83specified when booting off disk, the following filenames are 84tried in order: 85.Nm netbsd.pmax , 86.Nm netbsd , 87.Nm netbsd.gz , 88.Nm netbsd.bak , 89.Nm netbsd.old , 90.Nm onetbsd , 91.Nm gennetbsd . 92Generally, the kernel is named 93.Nm netbsd . 94.Pp 95An example bootpath setting would be: 96.Dl Ic setenv bootpath rz(0,1,0)netbsd 97.Pp 98At the PROM prompt, the user may boot 99.Nx 100with either the 101.Nm auto 102or the 103.Nm boot 104command. If the 105.Nm auto 106command is used, the 107.Fl a 108argument is passed to the kernel, requesting a multi-user boot; otherwise 109the 110.Fl s 111argument is passed, requesting that 112.Nx 113boot to single user mode. 114.Pp 115When either the 116.Nm boot 117or the 118.Nm auto 119command is issued with no arguments, the kernel specified in the bootpath 120environment variable is booted. With the 121.Nm boot 122command, an alternative kernel may be specified 123with the 124.Fl f 125flag, followed by the path of the kernel to boot, as described above. 126For example: 127.Dl Ic boot -f rz(0,4,0)netbsd.new 128.Sh TURBOCHANNEL DECstations 129On TurboChannel machines (all DECstation 5000 models), the boot path 130is specified in the boot environment variable, along with any arguments 131to be passed to the kernel. Note that to specify boot arguments (e.g., 132.Fl a ) 133when setting the 134.Nm boot 135environment variable, the filename and arguments 136must be enclosed in quotes. For example: 137.Dl Ic setenv boot Dq Ic "3/rz4/netbsd -a" 138.Pp 139The device from which to boot is specified as the TurboChannel slot 140number, a TurboChannel-option-specific device name, and a path to the 141file to load, all separated by slashes. You can get a list of the 142devices installed in your TurboChannel slots (as well as any built-in 143devices which appear as TurboChannel slots) by typing the 144.Nm cnfg 145command 146at the boot prompt. You can get more detailed information about a specific 147TurboChannel option by typing 148.Nm cnfg 149followed by the slot number of that 150option. 151.Pp 152For SCSI devices, the option-specific device identifier is either rz# for 153disks or tz# for tapes, where # is the SCSI id of the device. For network 154devices, the option-specific protocol identifier is either mop or tftp. 155Filename requirements are as for the DECstation 2100 and 3100. 156.Pp 157To start 158.Nx 159from the boot prompt, the 160.Nm boot 161command must be used. With no arguments, this simply boots the default 162kernel with the default arguments as set with 163.Nm setenv 164.Nm boot . 165If no boot environment variable is set or if an alternative kernel is to be 166booted, the path of that kernel may be specified after the boot command as 167described above, and any arguments may be passed similarly. For example: 168.Dl Ic boot 3/rz4/netbsd.new -a 169.Sh KERNEL ARGUMENTS 170The kernel supports the following arguments: 171.Bl -tag -width xxx -offset indent 172.It Li a 173Autoboot -- try and boot to multi-user mode without 174further input. 175.It Li m 176Use a miniroot already present in memory. 177.It Li n 178Prompt for the root file system device, the system crash dump 179device, and the path to 180.Xr init 8 . 181.It Li N 182Do not prompt for the root file system device, the system crash dump 183device, and the path to 184.Xr init 8 . 185If the configured-in devices are present, use them. 186.It Li 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