1.\" $NetBSD: boot.8,v 1.28 2004/04/01 16:23:55 mrg 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 1, 2004 33.Dt BOOT 8 sparc 34.Os 35.Sh NAME 36.Nm boot 37.Nd 38system bootstrapping procedures 39.Sh SYNOPSIS 40.Nm boot 41.Op Fl adqsv 42.Oo 43.Ar -- 44.Aq Ar boot string 45.Oc 46.Sh DESCRIPTION 47.Ss Power fail and crash recovery 48Normally, the system will reboot itself at power-up or after crashes. 49An automatic consistency check of the file systems will be performed 50as described in 51.Xr fsck 8 , 52and unless this fails, the system will resume multi-user operations. 53.Ss Cold starts 54The 55.Tn Sun 56boot firmware, either old-style or new-style (Open Boot Prom), 57performs a Power On Self Test 58.Pq Tn POST , 59and then will boot an operating system according to 60configuration in Open Firmware environment variables. 61.Ss Boot program options 62.Bl -tag -width xxx 63.It Fl a 64Prompt for the root file system device, the system crash dump 65device, and the path to 66.Xr init 8 . 67.It Fl d 68Bring the system up in debug mode. 69Here it waits for a kernel debugger connect; see 70.Xr gdb 1 . 71.It Fl C 72Boot kernel in compat mode. 73Starting with revision 1.14 74.Pq introduced on 2003/03/01 , 75the sparc boot program loads the 76.Nx 77kernel at its linked virtual address. 78This feature requires a kernel built after 2003/02/21 79.Pq corresponding to kernel version 1.6Q . 80To load older kernels, the 81.Fl C 82option must be used, which loads the kernel at physical address 830x4000. 84The size of a kernel loaded in this way is limited to approximately 853MB. 86.It Fl q 87Boot the system in quiet mode. 88.It Fl s 89Bring the system up in single-user mode. 90.It Fl v 91Boot the system in verbose mode. 92.El 93.Pp 94Any extra flags or arguments, or the 95.Aq Ar boot string 96after the -- separator are passed to the boot PROM. 97Other flags are currently ignored. 98.Pp 99The SPARC boot ROM comes in two flavours: an 100.Dq old-style 101ROM is used in sun4 machines, while a 102.Dq new-style 103ROM can be found on sun4c and sun4m models. 104The 105.Dq new-style 106SPARC boot ROM is a full-featured Forth system with emacs key bindings. 107It can be put in 108.Dq old-style 109user-interface compatibility mode (in which case it shows a simple 110.Sq \*[Gt] 111prompt), but this is essentially useless. 112However, by default the ROM runs in old-mode; to enter new-mode type 113.Sq n . 114The ROM then shows a Forth-style 115.Dq ok 116prompt. 117It is recommended to have the ROM always start in its native 118.Dq new-style 119mode. 120Utter the following incantation in new-mode to force the ROM to always start 121in new-mode. 122.Pp 123.Pa \ ok 124setenv sunmon-compat? false 125.Pp 126The ROM will normally load the kernel from 127.Dq sd(0,0,0)vmunix . 128To change the default so that 129.Nx 130will be loaded from somewhere else, type the following 131.Pp 132.Pa \ ok 133setenv boot-from sd(0,0,0)netbsd 134.Pp 135On newer SPARC machines, there are various aliases to access common devices. 136A typical list of usable boot devices (extracted from the output of 137the Open Boot PROM command 138.Ic devalias ) 139is: 140floppy /obio/SUNW,fdtwo 141net-aui /iommu/sbus/ledma@f,400010:aui/le@f,c00000 142net-tpe /iommu/sbus/ledma@f,400010:tpe/le@f,c00000 143net /iommu/sbus/ledma@f,400010/le@f,c00000 144disk /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0 145cdrom /iommu/sbus/espdma@f,400000/esp@f,800000/sd@6,0:d 146tape /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0 147tape1 /iommu/sbus/espdma@f,400000/esp@f,800000/st@5,0 148tape0 /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0 149disk3 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0 150disk2 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0 151disk1 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@1,0 152disk0 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@0,0 153.Pp 154For new-style machines, 155if a device specification includes a partition letter (for example 156.Em cdrom 157in above list), that partition is used by default, otherwise the first (a) 158partition is used. 159If booting from the net device, there is no partition involved. 160.Pp 161At any time you can break back to the ROM by pressing the 162.Sq L1 163and 164.Sq a 165keys at the same time (if the console is a serial port the same is 166achieved by sending a 167.Sq break ) . 168If you do this accidentally you can continue whatever was in progress 169by typing 170.Sq go . 171.Sh OPEN BOOT PROM ENVIRONMENT VARIABLES 172This section only applies to new-style machines. 173.Pp 174All Open Boot PROM environment variables can be printed with the 175.Ic printenv 176command and changed with the 177.Ic setenv 178command. 179The boot process relevant variables and their suggested value for 180booting 181.Nx 182are: 183.Bd -literal -offset indent 184auto-boot? true 185boot-file 186boot-device disk 187diag-switch? false 188.Ed 189.Pp 190Of course you may select any other boot device, 191if you do not want to boot from the device aliased to 192.Em disk , 193see the discussion on devices above. 194.Sh FILES 195.Bl -tag -width /netbsdxx -compact 196.It Pa /netbsd 197system code 198.It Pa /boot 199system bootstrap 200.El 201.Sh SEE ALSO 202.\" .Xr crash 8 , 203.Xr sparc64/boot 8 , 204.Xr disklabel 8 , 205.Xr fsck 8 , 206.Xr halt 8 , 207.Xr init 8 , 208.Xr installboot 8 , 209.Xr rc 8 , 210.Xr shutdown 8 , 211.Xr syslogd 8 212