1*80cb79a9Swiz.\" $NetBSD: boot.8,v 1.18 2014/10/27 16:18:38 wiz Exp $ 24e3a142dSmartin.\" 34e3a142dSmartin.\" Copyright (c) 1992, 1993 44e3a142dSmartin.\" The Regents of the University of California. All rights reserved. 54e3a142dSmartin.\" 64e3a142dSmartin.\" Redistribution and use in source and binary forms, with or without 74e3a142dSmartin.\" modification, are permitted provided that the following conditions 84e3a142dSmartin.\" are met: 94e3a142dSmartin.\" 1. Redistributions of source code must retain the above copyright 104e3a142dSmartin.\" notice, this list of conditions and the following disclaimer. 114e3a142dSmartin.\" 2. Redistributions in binary form must reproduce the above copyright 124e3a142dSmartin.\" notice, this list of conditions and the following disclaimer in the 134e3a142dSmartin.\" documentation and/or other materials provided with the distribution. 14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 154e3a142dSmartin.\" may be used to endorse or promote products derived from this software 164e3a142dSmartin.\" without specific prior written permission. 174e3a142dSmartin.\" 184e3a142dSmartin.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 194e3a142dSmartin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 204e3a142dSmartin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 214e3a142dSmartin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 224e3a142dSmartin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 234e3a142dSmartin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 244e3a142dSmartin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 254e3a142dSmartin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 264e3a142dSmartin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 274e3a142dSmartin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 284e3a142dSmartin.\" SUCH DAMAGE. 294e3a142dSmartin.\" 304e3a142dSmartin.\" @(#)boot_sparc.8 8.2 (Berkeley) 4/19/94 314e3a142dSmartin.\" 3261d904bdSjdc.Dd November 9, 2008 334e3a142dSmartin.Dt BOOT 8 sparc64 344e3a142dSmartin.Os 354e3a142dSmartin.Sh NAME 362f2c2ac1Smrg.Nm boot , 372f2c2ac1Smrg.Nm ofwboot 382e72bf05Swiz.Nd system bootstrapping procedures 394e3a142dSmartin.Sh SYNOPSIS 404e3a142dSmartin.Nm boot 414e3a142dSmartin.Op Fl adqsv 424e3a142dSmartin.Oo 432e72bf05Swiz.Ar -- 442e72bf05Swiz.Aq Ar boot string 454e3a142dSmartin.Oc 464e3a142dSmartin.Sh DESCRIPTION 4747dc853eSfair.Tn Sun 4812f3ab83Sfair.Tn UltraSPARC 4947dc853eSfairsystems support booting from locally attached storage media 5012f3ab83Sfair.Pq e.g. hard disk, Tn CD-ROM , 5147dc853eSfairand booting over 5247dc853eSfair.Tn Ethernet 5347dc853eSfairnetworks using 5447dc853eSfair.Tn BOOTP . 554e3a142dSmartin.Ss Power fail and crash recovery 564e3a142dSmartinNormally, the system will reboot itself at power-up or after crashes. 574e3a142dSmartinAn automatic consistency check of the file systems will be performed 584e3a142dSmartinas described in 592e72bf05Swiz.Xr fsck 8 , 604e3a142dSmartinand unless this fails, the system will resume multi-user operations. 614e3a142dSmartin.Ss Cold starts 624e3a142dSmartinThe 6347dc853eSfair.Tn Sun 6447dc853eSfairOpen Firmware performs a Power On Self Test 6547dc853eSfair.Pq Tn POST , 6647dc853eSfairand then will boot an operating system according to 6747dc853eSfairconfiguration in Open Firmware environment variables. 684e3a142dSmartin.Ss Boot program options 694e3a142dSmartin.Bl -tag -width xxx 704e3a142dSmartin.It Fl a 714e3a142dSmartinPrompt for the root file system device, the system crash dump 724e3a142dSmartindevice, and the path to 734e3a142dSmartin.Xr init 8 . 744e3a142dSmartin.It Fl d 754e3a142dSmartinBring the system up in debug mode. 764e3a142dSmartinHere it waits for a kernel debugger connect; see 774e3a142dSmartin.Xr gdb 1 . 784e3a142dSmartin.It Fl q 794e3a142dSmartinBoot the system in quiet mode. 804e3a142dSmartin.It Fl s 814e3a142dSmartinBring the system up in single-user mode. 824e3a142dSmartin.It Fl v 834e3a142dSmartinBoot the system in verbose mode. 844e3a142dSmartin.El 854e3a142dSmartin.Pp 864e3a142dSmartinAny extra flags or arguments, or the 872e72bf05Swiz.Aq Ar boot string 884e3a142dSmartinafter the -- separator are passed to the boot PROM. 894e3a142dSmartinOther flags are currently ignored. 904e3a142dSmartin.Pp 9147dc853eSfairAt any time you can halt the running system and get back to the Open Firmware. 9247dc853eSfairIf the console is the 9347dc853eSfair.Tn Sun 9447dc853eSfairframebuffer and keyboard, 9547dc853eSfairpress the 962e72bf05Swiz.Sq STOP 9747dc853eSfairand 9847dc853eSfair.Sq A 9947dc853eSfairkeys at the same time on the keyboard. 10047dc853eSfairOn older models of 10147dc853eSfair.Tn Sun 10247dc853eSfairkeyboards, the 10347dc853eSfair.Sq STOP 104e76a48e3Swizkey is labeled 10547dc853eSfair.Sq L1 . 10647dc853eSfair.Pp 10747dc853eSfairIf the console is a serial port the same is 1082e72bf05Swizachieved by sending a 10947dc853eSfair.Sq BREAK . 11047dc853eSfair.Pp 11147dc853eSfairIf you do this accidentally, you can continue whatever was in progress 11247dc853eSfairwith the 11347dc853eSfair.Ic go 11447dc853eSfaircommand. 1154e3a142dSmartin.Sh BOOT DEVICES 11647dc853eSfairSince machines vary greatly in the way their devices are connected, 11747dc853eSfairthere are aliases defined by the firmware. 11847dc853eSfairYou can either use the fully qualified 11947dc853eSfairOpen Firmware path of a device node, or the alias. 1204e3a142dSmartin.Pp 1212f2c2ac1SmrgThe secondary boot loader, 1222f2c2ac1Smrg.Nm ofwboot , 1232f2c2ac1Smrgtakes 1242f2c2ac1Smrg.Nm 1252f2c2ac1Smrgcommands virtually the same as Open Firmware. 12648c350d4SwizThus, the following examples apply equally to 1272f2c2ac1Smrg.Nm ofwboot 1282f2c2ac1Smrgas well as Open Firmware. 1292f2c2ac1Smrg.Pp 1304e3a142dSmartinA typical list of usable boot devices (extracted from the output of 1314e3a142dSmartinthe Open Firmware command 1322e72bf05Swiz.Ic devalias ) 1334e3a142dSmartinis: 1344e3a142dSmartin.Bd -literal -offset indent 1354e3a142dSmartinnet /sbus/SUNW,hme@e,8c00000 1364e3a142dSmartindisk /sbus/SUNW,fas@e,8800000/sd@0,0 1374e3a142dSmartincdrom /sbus/SUNW,fas@e,8800000/sd@6,0:f 1384e3a142dSmartindisk6 /sbus/SUNW,fas@e,8800000/sd@6,0 1394e3a142dSmartindisk5 /sbus/SUNW,fas@e,8800000/sd@5,0 1404e3a142dSmartindisk4 /sbus/SUNW,fas@e,8800000/sd@4,0 1414e3a142dSmartindisk3 /sbus/SUNW,fas@e,8800000/sd@3,0 1424e3a142dSmartindisk2 /sbus/SUNW,fas@e,8800000/sd@2,0 1434e3a142dSmartindisk1 /sbus/SUNW,fas@e,8800000/sd@1,0 1444e3a142dSmartindisk0 /sbus/SUNW,fas@e,8800000/sd@0,0 1454e3a142dSmartin.Ed 1464e3a142dSmartin.Pp 14747dc853eSfairIf a device specification includes a partition letter (for example 14847dc853eSfair.Em cdrom 14947dc853eSfairin above list), that partition is used by default, otherwise the first (a) 15047dc853eSfairpartition is used. 15147dc853eSfairIf booting from the net device, there is no partition involved. 1524e3a142dSmartin.Pp 1534e3a142dSmartinThe boot device is an optional first part of the boot string, if no device 1544e3a142dSmartinis specified the default device is used (see below). 1554e3a142dSmartin.Sh FIRMWARE ENVIRONMENT VARIABLES 1564e3a142dSmartinAll Open Firmware environment variables can be printed with the 1572e72bf05Swiz.Ic printenv 1585fe6660bSwizcommand and changed with the 15947dc853eSfair.Ic setenv 16047dc853eSfaircommand. 1614e3a142dSmartinThe boot process relevant variables and their suggested value for 1622e72bf05Swizbooting 1632e72bf05Swiz.Nx 1642e72bf05Swizare: 1654e3a142dSmartin.Bd -literal -offset indent 1664e3a142dSmartinboot-command boot 1674e3a142dSmartinauto-boot? true 1684e3a142dSmartinboot-file 1694e3a142dSmartinboot-device disk 1704e3a142dSmartindiag-switch? false 1714e3a142dSmartin.Ed 1724e3a142dSmartin.Pp 17347dc853eSfairOf course you may select any other boot device, 17447dc853eSfairif you do not want to boot from the device aliased to 1754e3a142dSmartin.Em disk , 1764e3a142dSmartinsee the discussion on devices above. 1772e72bf05Swiz.Sh FILES 178b21f878eSmartin.Bl -tag -width /usr/mdec/ofwboot.netxx -compact 1792e72bf05Swiz.It Pa /netbsd 1802e72bf05Swizsystem code 181b21f878eSmartin.It Pa /ofwboot 1822e72bf05Swizsystem bootstrap 183b21f878eSmartin.It Pa /usr/mdec/ofwboot.net 184b21f878eSmartinalternate bootstrap when booting from the network, see 185b21f878eSmartin.Xr diskless 8 186b21f878eSmartinfor details. 1872e72bf05Swiz.El 1884e3a142dSmartin.Sh EXAMPLES 18947dc853eSfairBoot from 19047dc853eSfair.Tn CD-ROM : 19147dc853eSfair.Pp 1924e3a142dSmartin.Bd -literal -offset indent 1934e3a142dSmartinboot cdrom 1944e3a142dSmartin.Ed 19547dc853eSfair.Pp 19647dc853eSfairNote that some multi-architecture CDs are not able to use the 19747dc853eSfairdefault sparc64 partition for 19847dc853eSfair.Tn CD-ROMs 19947dc853eSfair.Pq f , 20047dc853eSfairso they may require an explicit partition letter, for example 2014e3a142dSmartin.Bd -literal -offset indent 2024e3a142dSmartinboot cdrom:c 2034e3a142dSmartin.Ed 20447dc853eSfair.Pp 20547dc853eSfairWhen using external 20647dc853eSfair.Tn SCSI 20747dc853eSfair.Tn CD-ROM 20847dc853eSfairdrives it is important to know two things: the 20947dc853eSfair.Tn Sun 21047dc853eSfairfirmware expects the 21147dc853eSfair.Tn SCSI 21247dc853eSfairID to be six, and the drive must support 512-byte block reads, 21347dc853eSfairin addition to the standard 2048-byte reads. 21447dc853eSfair.Pp 215b21f878eSmartinUse 2164e3a142dSmartin.Bd -literal -offset indent 2174e3a142dSmartinboot net -sd 2184e3a142dSmartin.Ed 21947dc853eSfair.Pp 2204e3a142dSmartinto boot single user from network and break into the kernel debugger as 2214e3a142dSmartinsoon as possible. 222b21f878eSmartin.Pp 2232c2348b3SspzUse 2242c2348b3Sspz.Bd -literal -offset indent 2252c2348b3Sspzboot net tftp:netbsd -a 2262c2348b3Sspz.Ed 2272c2348b3Sspz.Pp 2282c2348b3Sspzto boot a kernel named netbsd obtained via tftp and have it ask for 2292c2348b3Sspzroot file system, swap partition and init location once it is up. 2302c2348b3Sspz.Pp 231b21f878eSmartinDuring installation from a different operating system 232b21f878eSmartin.Bd -literal -offset indent 233b21f878eSmartinboot disk:b 234b21f878eSmartin.Ed 235b21f878eSmartin.Pp 236b21f878eSmartinis used to boot a 237b21f878eSmartin.Dq miniroot 238b21f878eSmartinfile system from the swap partition. 2394e3a142dSmartin.Sh SEE ALSO 2404e3a142dSmartin.Xr disklabel 8 , 241b21f878eSmartin.Xr diskless 8 , 2424e3a142dSmartin.Xr fsck 8 , 2434e3a142dSmartin.Xr halt 8 , 2444e3a142dSmartin.Xr init 8 , 2454e3a142dSmartin.Xr installboot 8 , 2464e3a142dSmartin.Xr rc 8 , 2474e3a142dSmartin.Xr shutdown 8 , 248*80cb79a9Swiz.Xr sparc/boot 8 , 24947dc853eSfair.Xr syslogd 8 25047dc853eSfair.Sh STANDARDS 25147dc853eSfair.Tn Sun 25247dc853eSfairdeveloped its firmware and promoted it to become 2532e8cb0dfSwiz.St -ieee1275-94 . 25447dc853eSfair.Pp 255bed7cf5aSnjoly.Lk http://www.openfirmware.org/1275/ "IEEE 1275 Open Firmware" 256b21f878eSmartin.Sh BUGS 257b21f878eSmartin.Nx 25812f3ab83Sfairprovides no way to boot 25912f3ab83Sfair.Tn UltraSPARC 26012f3ab83Sfairsystems from floppy disks. 261b21f878eSmartinThis is unlikely to change, due to very low demand for this feature. 26261d904bdSjdc.Pp 26361d904bdSjdcThe OBP on Ultra 1 and Ultra 2 machines can only boot from the first 26461d904bdSjdc4Gb of the disk. 265