1.\" $NetBSD: boot.8,v 1.7 2010/02/25 17:15:55 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. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)boot_sparc.8 8.2 (Berkeley) 4/19/94 31.\" 32.Dd April 29, 2003 33.Dt BOOT 8 sun2 34.Os 35.Sh NAME 36.Nm boot 37.Nd system bootstrapping procedures 38.Sh SYNOPSIS 39.Nm b 40.Oo 41.Ar dev 42.Oo Pq Ar cntrl , unit , part 43.Oc 44.Oc 45.Op Ar file 46.Op Fl adqsv 47.Sh DESCRIPTION 48.Ss Power fail and crash recovery 49Normally, the system will reboot itself at power-up or after crashes. 50An automatic consistency check of the file systems will be performed 51as described in 52.Xr fsck 8 , 53and unless this fails, the system will resume multi-user operations. 54.Ss Selecting the device and kernel to boot 55Normally, the 56.Nm b 57command alone is sufficient to boot the system, as the PROM chooses 58a default boot device 59.Ar dev 60if none is specified. 61The PROM chooses the first device present on 62the system from the following ordered list: 63.Pp 64.Bd -unfilled -offset indent -compact 65sd SCSI disk 66ie Intel Ethernet 67ec 3Com Ethernet 68.Ed 69.Pp 70Unless specified, the controller number 71.Ar cntrl , 72unit number 73.Ar unit , 74and partition number 75.Ar part 76default to zero, which is almost always correct. 77.Pp 78The controller number can 79be specified if there is more than one of the given device in the system. 80For example, use 81.Dq ie(1,,) 82to boot off of the second Intel Ethernet in the system. 83.Pp 84The unit number specifies one of the many devices attached to a 85controller. 86The exact meaning and values vary depending on the device name. 87For example, 88.Dq sd(,18,) 89boots the disk at target 6 on the first SCSI controller, 18 being the target 90number 6, multiplied by 4, and given in hexadecimal. 91.Pp 92The partition number specifies one of the many partitions on a device. 93The exact meaning and values vary depending on the device name. 94For example, 95.Dq sd(,18,1) 96boots the second partition on the disk at target 6 on the first SCSI 97controller. 98.Pp 99The PROM only loads a first-stage boot program, currently either 100.Pa /usr/mdec/bootxx 101(for a disk boot), or 102.Pa /usr/mdec/bootyy 103(for a network boot). 104This first-stage boot program then loads the 105second-stage boot program from the same device, currently either 106.Pa /usr/mdec/ufsboot 107(for a disk boot), or 108.Pa /usr/mdec/netboot 109(for a network boot). 110.Pp 111The second-stage boot program will then attempt to load the kernel named 112.Ar file 113(or 114.Pa vmunix 115if none is specified). 116The second-stage disk boot program 117.Pa /usr/mdec/ufsboot 118loads the kernel from the same device that it was loaded from, 119while the second-stage network boot program 120.Pa /usr/mdec/netboot 121will load the kernel 122from the NFS root as determined by the procedure described in 123.Xr diskless 8 . 124.Ss Boot program options 125.Bl -tag -width xxx 126.It Fl a 127Prompt for the root file system device, the system crash dump 128device, and the path to 129.Xr init 8 . 130.It Fl d 131Bring the system up in debug mode. 132Here it waits for a kernel debugger connect; see 133.Xr ddb 4 . 134.It Fl q 135Boot the system in quiet mode. 136.It Fl s 137Bring the system up in single-user mode. 138.It Fl v 139Boot the system in verbose mode. 140.El 141.Pp 142Other flags are currently ignored. 143.Pp 144At any time you can break back to the ROM by pressing the 145.Sq L1 146and 147.Sq a 148keys at the same time (if the console is a serial port the same is 149achieved by sending a 150.Sq break ) . 151If you do this accidentally you can continue whatever was in progress 152by typing 153.Sq c 154followed by the return key. 155.Sh FILES 156.Bl -tag -width /usr/mdec/installbootXX -compact 157.It Pa /netbsd 158system code 159.It Pa /usr/mdec/bootxx 160first-level boot block for disks 161.It Pa /usr/mdec/bootyy 162first-level boot block for NFS (diskless) boot 163.It Pa /usr/mdec/netboot 164boot program for NFS (diskless) boot 165.It Pa /usr/mdec/ufsboot 166second-level boot program for UFS disks 167.It Pa /usr/sbin/installboot 168program to install bootxx on a disk 169.El 170.Sh SEE ALSO 171.Xr crash 8 , 172.Xr disklabel 8 , 173.Xr fsck 8 , 174.Xr halt 8 , 175.Xr init 8 , 176.Xr rc 8 , 177.Xr shutdown 8 , 178.Xr syslogd 8 179