1.\" $NetBSD: boot.8,v 1.18 2014/10/27 16:18:38 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 November 9, 2008 33.Dt BOOT 8 sparc64 34.Os 35.Sh NAME 36.Nm boot , 37.Nm ofwboot 38.Nd system 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.Tn Sun 48.Tn UltraSPARC 49systems support booting from locally attached storage media 50.Pq e.g. hard disk, Tn CD-ROM , 51and booting over 52.Tn Ethernet 53networks using 54.Tn BOOTP . 55.Ss Power fail and crash recovery 56Normally, the system will reboot itself at power-up or after crashes. 57An automatic consistency check of the file systems will be performed 58as described in 59.Xr fsck 8 , 60and unless this fails, the system will resume multi-user operations. 61.Ss Cold starts 62The 63.Tn Sun 64Open Firmware performs a Power On Self Test 65.Pq Tn POST , 66and then will boot an operating system according to 67configuration in Open Firmware environment variables. 68.Ss Boot program options 69.Bl -tag -width xxx 70.It Fl a 71Prompt for the root file system device, the system crash dump 72device, and the path to 73.Xr init 8 . 74.It Fl d 75Bring the system up in debug mode. 76Here it waits for a kernel debugger connect; see 77.Xr gdb 1 . 78.It Fl q 79Boot the system in quiet mode. 80.It Fl s 81Bring the system up in single-user mode. 82.It Fl v 83Boot the system in verbose mode. 84.El 85.Pp 86Any extra flags or arguments, or the 87.Aq Ar boot string 88after the -- separator are passed to the boot PROM. 89Other flags are currently ignored. 90.Pp 91At any time you can halt the running system and get back to the Open Firmware. 92If the console is the 93.Tn Sun 94framebuffer and keyboard, 95press the 96.Sq STOP 97and 98.Sq A 99keys at the same time on the keyboard. 100On older models of 101.Tn Sun 102keyboards, the 103.Sq STOP 104key is labeled 105.Sq L1 . 106.Pp 107If the console is a serial port the same is 108achieved by sending a 109.Sq BREAK . 110.Pp 111If you do this accidentally, you can continue whatever was in progress 112with the 113.Ic go 114command. 115.Sh BOOT DEVICES 116Since machines vary greatly in the way their devices are connected, 117there are aliases defined by the firmware. 118You can either use the fully qualified 119Open Firmware path of a device node, or the alias. 120.Pp 121The secondary boot loader, 122.Nm ofwboot , 123takes 124.Nm 125commands virtually the same as Open Firmware. 126Thus, the following examples apply equally to 127.Nm ofwboot 128as well as Open Firmware. 129.Pp 130A typical list of usable boot devices (extracted from the output of 131the Open Firmware command 132.Ic devalias ) 133is: 134.Bd -literal -offset indent 135net /sbus/SUNW,hme@e,8c00000 136disk /sbus/SUNW,fas@e,8800000/sd@0,0 137cdrom /sbus/SUNW,fas@e,8800000/sd@6,0:f 138disk6 /sbus/SUNW,fas@e,8800000/sd@6,0 139disk5 /sbus/SUNW,fas@e,8800000/sd@5,0 140disk4 /sbus/SUNW,fas@e,8800000/sd@4,0 141disk3 /sbus/SUNW,fas@e,8800000/sd@3,0 142disk2 /sbus/SUNW,fas@e,8800000/sd@2,0 143disk1 /sbus/SUNW,fas@e,8800000/sd@1,0 144disk0 /sbus/SUNW,fas@e,8800000/sd@0,0 145.Ed 146.Pp 147If a device specification includes a partition letter (for example 148.Em cdrom 149in above list), that partition is used by default, otherwise the first (a) 150partition is used. 151If booting from the net device, there is no partition involved. 152.Pp 153The boot device is an optional first part of the boot string, if no device 154is specified the default device is used (see below). 155.Sh FIRMWARE ENVIRONMENT VARIABLES 156All Open Firmware environment variables can be printed with the 157.Ic printenv 158command and changed with the 159.Ic setenv 160command. 161The boot process relevant variables and their suggested value for 162booting 163.Nx 164are: 165.Bd -literal -offset indent 166boot-command boot 167auto-boot? true 168boot-file 169boot-device disk 170diag-switch? false 171.Ed 172.Pp 173Of course you may select any other boot device, 174if you do not want to boot from the device aliased to 175.Em disk , 176see the discussion on devices above. 177.Sh FILES 178.Bl -tag -width /usr/mdec/ofwboot.netxx -compact 179.It Pa /netbsd 180system code 181.It Pa /ofwboot 182system bootstrap 183.It Pa /usr/mdec/ofwboot.net 184alternate bootstrap when booting from the network, see 185.Xr diskless 8 186for details. 187.El 188.Sh EXAMPLES 189Boot from 190.Tn CD-ROM : 191.Pp 192.Bd -literal -offset indent 193boot cdrom 194.Ed 195.Pp 196Note that some multi-architecture CDs are not able to use the 197default sparc64 partition for 198.Tn CD-ROMs 199.Pq f , 200so they may require an explicit partition letter, for example 201.Bd -literal -offset indent 202boot cdrom:c 203.Ed 204.Pp 205When using external 206.Tn SCSI 207.Tn CD-ROM 208drives it is important to know two things: the 209.Tn Sun 210firmware expects the 211.Tn SCSI 212ID to be six, and the drive must support 512-byte block reads, 213in addition to the standard 2048-byte reads. 214.Pp 215Use 216.Bd -literal -offset indent 217boot net -sd 218.Ed 219.Pp 220to boot single user from network and break into the kernel debugger as 221soon as possible. 222.Pp 223Use 224.Bd -literal -offset indent 225boot net tftp:netbsd -a 226.Ed 227.Pp 228to boot a kernel named netbsd obtained via tftp and have it ask for 229root file system, swap partition and init location once it is up. 230.Pp 231During installation from a different operating system 232.Bd -literal -offset indent 233boot disk:b 234.Ed 235.Pp 236is used to boot a 237.Dq miniroot 238file system from the swap partition. 239.Sh SEE ALSO 240.Xr disklabel 8 , 241.Xr diskless 8 , 242.Xr fsck 8 , 243.Xr halt 8 , 244.Xr init 8 , 245.Xr installboot 8 , 246.Xr rc 8 , 247.Xr shutdown 8 , 248.Xr sparc/boot 8 , 249.Xr syslogd 8 250.Sh STANDARDS 251.Tn Sun 252developed its firmware and promoted it to become 253.St -ieee1275-94 . 254.Pp 255.Lk http://www.openfirmware.org/1275/ "IEEE 1275 Open Firmware" 256.Sh BUGS 257.Nx 258provides no way to boot 259.Tn UltraSPARC 260systems from floppy disks. 261This is unlikely to change, due to very low demand for this feature. 262.Pp 263The OBP on Ultra 1 and Ultra 2 machines can only boot from the first 2644Gb of the disk. 265