1.\" $NetBSD: boot.8,v 1.4 2003/04/29 16:06:44 wiz Exp $ 2.\" 3.\" Copyright (c) 1992, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. 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.\" @(#)boot_sparc.8 8.2 (Berkeley) 4/19/94 35.\" 36.Dd April 29, 2003 37.Dt BOOT 8 sun2 38.Os 39.Sh NAME 40.Nm boot 41.Nd system bootstrapping procedures 42.Sh SYNOPSIS 43.Nm b 44.Oo 45.Ar dev 46.Oo ( Ar cntrl , unit , part ) 47.Oc 48.Oc 49.Op Ar file 50.Op Fl adqsv 51.Sh DESCRIPTION 52.Ss Power fail and crash recovery 53Normally, the system will reboot itself at power-up or after crashes. 54An automatic consistency check of the file systems will be performed 55as described in 56.Xr fsck 8 , 57and unless this fails, the system will resume multi-user operations. 58.Ss Selecting the device and kernel to boot 59Normally, the 60.Nm b 61command alone is sufficient to boot the system, as the PROM chooses 62a default boot device 63.Ar dev 64if none is specified. 65The PROM chooses the first device present on 66the system from the following ordered list: 67.Pp 68.Bd -unfilled -offset indent -compact 69sd SCSI disk 70ie Intel Ethernet 71ec 3Com Ethernet 72.Ed 73.Pp 74Unless specified, the controller number 75.Ar cntrl , 76unit number 77.Ar unit , 78and partition number 79.Ar part 80default to zero, which is almost always correct. 81.Pp 82The controller number can 83be specified if there is more than one of the given device in the system. 84For example, use 85.Dq ie(1,,) 86to boot off of the second Intel Ethernet in the system. 87.Pp 88The unit number specifies one of the many devices attached to a 89controller. 90The exact meaning and values vary depending on the device name. 91For example, 92.Dq sd(,18,) 93boots the disk at target 6 on the first SCSI controller, 18 being the target 94number 6, multiplied by 4, and given in hexadecimal. 95.Pp 96The partition number specifies one of the many partitions on a device. 97The exact meaning and values vary depending on the device name. 98For example, 99.Dq sd(,18,1) 100boots the second partition on the disk at target 6 on the first SCSI 101controller. 102.Pp 103The PROM only loads a first-stage boot program, currently either 104.Pa /usr/mdec/bootxx 105(for a disk boot), or 106.Pa /usr/mdec/bootyy 107(for a network boot). 108This first-stage boot program then loads the 109second-stage boot program from the same device, currently either 110.Pa /usr/mdec/ufsboot 111(for a disk boot), or 112.Pa /usr/mdec/netboot 113(for a network boot). 114.Pp 115The second-stage boot program will then attempt to load the kernel named 116.Ar file 117(or 118.Pa vmunix 119if none is specified). 120The second-stage disk boot program 121.Pa /usr/mdec/ufsboot 122loads the kernel from the same device that it was loaded from, 123while the second-stage network boot program 124.Pa /usr/mdec/netboot 125will load the kernel 126from the NFS root as determined by the procedure described in 127.Xr diskless 8 . 128.Ss Boot program options 129.Bl -tag -width xxx 130.It Fl a 131Prompt for the root file system device, the system crash dump 132device, and the path to 133.Xr init 8 . 134.It Fl d 135Bring the system up in debug mode. 136Here it waits for a kernel debugger connect; see 137.Xr ddb 4 . 138.It Fl q 139Boot the system in quiet mode. 140.It Fl s 141Bring the system up in single-user mode. 142.It Fl v 143Boot the system in verbose mode. 144.El 145.Pp 146Other flags are currently ignored. 147.Pp 148At any time you can break back to the ROM by pressing the 149.Sq L1 150and 151.Sq a 152keys at the same time (if the console is a serial port the same is 153achieved by sending a 154.Sq break ) . 155If you do this accidentally you can continue whatever was in progress 156by typing 157.Sq c 158followed by the return key. 159.Sh FILES 160.Bl -tag -width /usr/mdec/installbootXX -compact 161.It Pa /netbsd 162system code 163.It Pa /usr/mdec/bootxx 164first-level boot block for disks 165.It Pa /usr/mdec/bootyy 166first-level boot block for NFS (diskless) boot 167.It Pa /usr/mdec/netboot 168boot program for NFS (diskless) boot 169.It Pa /usr/mdec/ufsboot 170second-level boot program for UFS disks 171.It Pa /usr/sbin/installboot 172program to install bootxx on a disk 173.El 174.Sh SEE ALSO 175.\" .Xr crash 8 , 176.Xr disklabel 8 , 177.Xr fsck 8 , 178.Xr halt 8 , 179.Xr init 8 , 180.Xr rc 8 , 181.Xr shutdown 8 , 182.Xr syslogd 8 183