1*50e68e12Sflxd.\" $NetBSD: boot.8,v 1.16 2017/06/22 16:46:52 flxd Exp $ 27b8bdc7aSmellon.\" 37b8bdc7aSmellon.\" Copyright (c) 1990, 1991 The Regents of the University of California. 47b8bdc7aSmellon.\" All rights reserved. 57b8bdc7aSmellon.\" 67b8bdc7aSmellon.\" This code is derived from software contributed to Berkeley by 77b8bdc7aSmellon.\" the Systems Programming Group of the University of Utah Computer 87b8bdc7aSmellon.\" Science Department. 97b8bdc7aSmellon.\" 107b8bdc7aSmellon.\" Redistribution and use in source and binary forms, with or without 117b8bdc7aSmellon.\" modification, are permitted provided that the following conditions 127b8bdc7aSmellon.\" are met: 137b8bdc7aSmellon.\" 1. Redistributions of source code must retain the above copyright 147b8bdc7aSmellon.\" notice, this list of conditions and the following disclaimer. 157b8bdc7aSmellon.\" 2. Redistributions in binary form must reproduce the above copyright 167b8bdc7aSmellon.\" notice, this list of conditions and the following disclaimer in the 177b8bdc7aSmellon.\" documentation and/or other materials provided with the distribution. 18075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 197b8bdc7aSmellon.\" may be used to endorse or promote products derived from this software 207b8bdc7aSmellon.\" without specific prior written permission. 217b8bdc7aSmellon.\" 227b8bdc7aSmellon.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 237b8bdc7aSmellon.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 247b8bdc7aSmellon.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 257b8bdc7aSmellon.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 267b8bdc7aSmellon.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 277b8bdc7aSmellon.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 287b8bdc7aSmellon.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 297b8bdc7aSmellon.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 307b8bdc7aSmellon.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 317b8bdc7aSmellon.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 327b8bdc7aSmellon.\" SUCH DAMAGE. 337b8bdc7aSmellon.\" 345b7b2b65Slukem.Dd April 8, 2003 35739b6cf9Sperry.Dt BOOT 8 pmax 367b8bdc7aSmellon.Os 377b8bdc7aSmellon.Sh NAME 387b8bdc7aSmellon.Nm boot 3954148629Swiz.Nd system bootstrapping procedures 407b8bdc7aSmellon.Sh DESCRIPTION 417b8bdc7aSmellonThe 4234a98169Sperry.Nx 430785eb04Ssimonbkernel is started by placing it near the beginning of physical 440785eb04Ssimonbmemory and transferring to the entry point. 457b8bdc7aSmellonSince the system is not reenterable, 467b8bdc7aSmellonit is necessary to read it in from disk or tape 477b8bdc7aSmelloneach time it is to be bootstrapped. 4854148629Swiz.Ss Power fail and crash recovery 497b8bdc7aSmellonNormally, the system will boot itself at power-up or after crashes. 507b8bdc7aSmellonAn automatic consistency check of the file systems will be performed, 517b8bdc7aSmellonand unless this fails, the system will resume multi-user operations. 5254148629Swiz.Ss Cold starts 537b8bdc7aSmellonAt power up, all DECstation ROMs consult the 547b8bdc7aSmellon.Nm haltaction 557b8bdc7aSmellonenvironment 567b8bdc7aSmellonvariable in EEPROM to determine whether or not to attempt to boot 57ed449c06Swizautomatically. 58ed449c06SwizIf this variable is set to 5954148629Swiz.Sq h , 6054148629Swizthe ROM prints a prompt on the console and 61ed449c06Swizwaits for user commands. 62ed449c06SwizIf set to 6354148629Swiz.Sq b , 6454148629Swizthe ROM attempts to autoboot. 652c299cbdSjonathan.Sh DECSTATION 2100 and 3100 667b8bdc7aSmellonOn the DECstation 2100 and 3100, the path used for automatic booting is 677b8bdc7aSmellonstored in the 687b8bdc7aSmellon.Nm bootpath 69ed449c06Swizenvironment variable. 70ed449c06Swiz The path is made up of a 717b8bdc7aSmellondevice type specifier (e.g., rz, tz, mop or tftp) followed by 727b8bdc7aSmellona triplet in the form (x,y,z), followed by a filename to load. 737b8bdc7aSmellon.Pp 747b8bdc7aSmellonWithin the triplet, x is the controller (always 0), y is the SCSI id of 757b8bdc7aSmellonthe drive to 767b8bdc7aSmellonboot from or 0 for net boots, and z is the partition to boot from 77ee4b4791Ssimonb(usually 0 for SCSI devices, always zero for network booting). 780785eb04SsimonbFor both disk and network boots, () may be specified instead of 790785eb04Ssimonb(0,0,0). 807b8bdc7aSmellon.Pp 817b8bdc7aSmellonThe filename is optional for bootp/tftp and mop booting, since in 827b8bdc7aSmellonthese cases the network protocol can be used to determine which 83ed449c06Swizfile to boot. 84ed449c06SwizWhen booting off the tape, no filename should be specified. 85ed449c06SwizWhen booting off of disk, the filename is optional but is usually specified. 86ed449c06SwizIf no filename is specified when booting off disk, the following 87ed449c06Swizfilenames are tried in order: 880785eb04Ssimonb.Nm netbsd.pmax , 890785eb04Ssimonb.Nm netbsd , 900785eb04Ssimonb.Nm netbsd.gz , 910785eb04Ssimonb.Nm netbsd.bak , 920785eb04Ssimonb.Nm netbsd.old , 930785eb04Ssimonb.Nm onetbsd , 940785eb04Ssimonb.Nm gennetbsd . 950785eb04SsimonbGenerally, the kernel is named 967b8bdc7aSmellon.Nm netbsd . 977b8bdc7aSmellon.Pp 987b8bdc7aSmellonAn example bootpath setting would be: 9954148629Swiz.Dl Ic setenv bootpath rz(0,1,0)netbsd 1007b8bdc7aSmellon.Pp 1010785eb04SsimonbAt the PROM prompt, the user may boot 10234a98169Sperry.Nx 1037b8bdc7aSmellonwith either the 1047b8bdc7aSmellon.Nm auto 1057b8bdc7aSmellonor the 1067b8bdc7aSmellon.Nm boot 107ed449c06Swizcommand. 108ed449c06SwizIf the 1097b8bdc7aSmellon.Nm auto 1107b8bdc7aSmelloncommand is used, the 1117b8bdc7aSmellon.Fl a 1127b8bdc7aSmellonargument is passed to the kernel, requesting a multi-user boot; otherwise 1137b8bdc7aSmellonthe 1147b8bdc7aSmellon.Fl s 1157b8bdc7aSmellonargument is passed, requesting that 11634a98169Sperry.Nx 1177b8bdc7aSmellonboot to single user mode. 1187b8bdc7aSmellon.Pp 1197b8bdc7aSmellonWhen either the 1207b8bdc7aSmellon.Nm boot 1217b8bdc7aSmellonor the 1227b8bdc7aSmellon.Nm auto 1237b8bdc7aSmelloncommand is issued with no arguments, the kernel specified in the bootpath 124ed449c06Swizenvironment variable is booted. 125ed449c06SwizWith the 1260785eb04Ssimonb.Nm boot 1270785eb04Ssimonbcommand, an alternative kernel may be specified 1287b8bdc7aSmellonwith the 1297b8bdc7aSmellon.Fl f 1307b8bdc7aSmellonflag, followed by the path of the kernel to boot, as described above. 1317b8bdc7aSmellonFor example: 13254148629Swiz.Dl Ic boot -f rz(0,4,0)netbsd.new 133*50e68e12Sflxd.Sh TURBOchannel DECstations 134*50e68e12SflxdOn TURBOchannel machines (all DECstation 5000 models), the boot path 1357b8bdc7aSmellonis specified in the boot environment variable, along with any arguments 136ed449c06Swizto be passed to the kernel. 137ed449c06SwizNote that to specify boot arguments (e.g., 1387b8bdc7aSmellon.Fl a ) 1397b8bdc7aSmellonwhen setting the 1407b8bdc7aSmellon.Nm boot 1417b8bdc7aSmellonenvironment variable, the filename and arguments 142ed449c06Swizmust be enclosed in quotes. 143ed449c06SwizFor example: 14454148629Swiz.Dl Ic setenv boot Dq Ic "3/rz4/netbsd -a" 1457b8bdc7aSmellon.Pp 146*50e68e12SflxdThe device from which to boot is specified as the TURBOchannel slot 147*50e68e12Sflxdnumber, a TURBOchannel-option-specific device name, and a path to the 148ed449c06Swizfile to load, all separated by slashes. 149ed449c06SwizYou can get a list of the 150*50e68e12Sflxddevices installed in your TURBOchannel slots (as well as any built-in 151*50e68e12Sflxddevices which appear as TURBOchannel slots) by typing the 1527b8bdc7aSmellon.Nm cnfg 1537b8bdc7aSmelloncommand 154ed449c06Swizat the boot prompt. 155ed449c06SwizYou can get more detailed information about a specific 156*50e68e12SflxdTURBOchannel option by typing 1577b8bdc7aSmellon.Nm cnfg 1587b8bdc7aSmellonfollowed by the slot number of that 1597b8bdc7aSmellonoption. 1607b8bdc7aSmellon.Pp 1617b8bdc7aSmellonFor SCSI devices, the option-specific device identifier is either rz# for 162ed449c06Swizdisks or tz# for tapes, where # is the SCSI id of the device. 163ed449c06SwizFor network 1647b8bdc7aSmellondevices, the option-specific protocol identifier is either mop or tftp. 1657b8bdc7aSmellonFilename requirements are as for the DECstation 2100 and 3100. 1667b8bdc7aSmellon.Pp 1677b8bdc7aSmellonTo start 16834a98169Sperry.Nx 1697b8bdc7aSmellonfrom the boot prompt, the 1707b8bdc7aSmellon.Nm boot 171ed449c06Swizcommand must be used. 172ed449c06SwizWith no arguments, this simply boots the default 1737b8bdc7aSmellonkernel with the default arguments as set with 1747b8bdc7aSmellon.Nm setenv 1757b8bdc7aSmellon.Nm boot . 17680c0d60fSmouseIf no boot environment variable is set or if an alternative kernel is to be 1777b8bdc7aSmellonbooted, the path of that kernel may be specified after the boot command as 178ed449c06Swizdescribed above, and any arguments may be passed similarly. 179ed449c06SwizFor example: 18054148629Swiz.Dl Ic boot 3/rz4/netbsd.new -a 1812c299cbdSjonathan.Sh KERNEL ARGUMENTS 1822c299cbdSjonathanThe kernel supports the following arguments: 18354148629Swiz.Bl -tag -width xxx -offset indent 1845b7b2b65Slukem.It Li a 18554148629SwizAutoboot -- try and boot to multi-user mode without 1862c299cbdSjonathanfurther input. 1875b7b2b65Slukem.It Li m 1885b7b2b65SlukemUse a miniroot already present in memory. 1895b7b2b65Slukem.It Li n 1905b7b2b65SlukemPrompt for the root file system device, the system crash dump 1915b7b2b65Slukemdevice, and the path to 1925b7b2b65Slukem.Xr init 8 . 1935b7b2b65Slukem.It Li N 1945b7b2b65SlukemDo not prompt for the root file system device, the system crash dump 1955b7b2b65Slukemdevice, and the path to 1965b7b2b65Slukem.Xr init 8 . 1972c299cbdSjonathanIf the configured-in devices are present, use them. 1985b7b2b65Slukem.It Li s 19954148629SwizBoot only to single-user mode. 20054148629Swiz.El 2012c299cbdSjonathan.Pp 2022c299cbdSjonathanSince DECstation PROMs also parse any arguments with a leading 2032c299cbdSjonathan"-", and reject unrecognized options, arguments other than "a" or "s" 2042c299cbdSjonathanshould be specified after the kernel name with no leading "-". 2052c299cbdSjonathanFor example: 20654148629Swiz.Dl Ic boot 3/rz4/netbsd \&ns 2077b8bdc7aSmellon.Sh SEE ALSO 2082c299cbdSjonathan.Xr ddb 4 , 2097b8bdc7aSmellon.Xr halt 8 , 2107b8bdc7aSmellon.Xr init 8 , 2110785eb04Ssimonb.Xr installboot 8 , 2127b8bdc7aSmellon.Xr rc 8 , 2130785eb04Ssimonb.Xr reboot 8 , 2140785eb04Ssimonb.Xr savecore 8 , 2150785eb04Ssimonb.Xr shutdown 8 2167b8bdc7aSmellon.Sh HISTORY 2177b8bdc7aSmellonThe 2187b8bdc7aSmellon.Nm 2197b8bdc7aSmelloncommand is 220100c18a3Sjoerg.Ud 221