1*527132ccSfcambus.\" $NetBSD: boot.8,v 1.33 2020/08/29 13:32:27 fcambus Exp $ 2555d4b51Scgd.\" 3369451e4Scgd.\" Copyright (c) 1992, 1993 4369451e4Scgd.\" The Regents of the University of California. All rights reserved. 5369451e4Scgd.\" 6369451e4Scgd.\" Redistribution and use in source and binary forms, with or without 7369451e4Scgd.\" modification, are permitted provided that the following conditions 8369451e4Scgd.\" are met: 9369451e4Scgd.\" 1. Redistributions of source code must retain the above copyright 10369451e4Scgd.\" notice, this list of conditions and the following disclaimer. 11369451e4Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 12369451e4Scgd.\" notice, this list of conditions and the following disclaimer in the 13369451e4Scgd.\" documentation and/or other materials provided with the distribution. 14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 15369451e4Scgd.\" may be used to endorse or promote products derived from this software 16369451e4Scgd.\" without specific prior written permission. 17369451e4Scgd.\" 18369451e4Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19369451e4Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20369451e4Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21369451e4Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22369451e4Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23369451e4Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24369451e4Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25369451e4Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26369451e4Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27369451e4Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28369451e4Scgd.\" SUCH DAMAGE. 29369451e4Scgd.\" 30369451e4Scgd.\" @(#)boot_sparc.8 8.2 (Berkeley) 4/19/94 31369451e4Scgd.\" 32ad424c18Sjdc.Dd June 17, 2006 336dcfe639Sperry.Dt BOOT 8 sparc 34369451e4Scgd.Os 35369451e4Scgd.Sh NAME 366dcfe639Sperry.Nm boot 37369451e4Scgd.Nd 386dcfe639Sperrysystem bootstrapping procedures 39d7afda6dSmrg.Sh SYNOPSIS 40d7afda6dSmrg.Nm boot 415b7b2b65Slukem.Op Fl adqsv 42d7afda6dSmrg.Oo 43befa7a89Swiz.Ar -- 44befa7a89Swiz.Aq Ar boot string 45d7afda6dSmrg.Oc 46369451e4Scgd.Sh DESCRIPTION 475b7b2b65Slukem.Ss Power fail and crash recovery 48369451e4ScgdNormally, the system will reboot itself at power-up or after crashes. 49369451e4ScgdAn automatic consistency check of the file systems will be performed 50369451e4Scgdas described in 51befa7a89Swiz.Xr fsck 8 , 52369451e4Scgdand unless this fails, the system will resume multi-user operations. 535b7b2b65Slukem.Ss Cold starts 54d7afda6dSmrgThe 55d390d285Smrg.Tn Sun 56d390d285Smrgboot firmware, either old-style or new-style (Open Boot Prom), 57d390d285Smrgperforms a Power On Self Test 58d390d285Smrg.Pq Tn POST , 59d390d285Smrgand then will boot an operating system according to 60d390d285Smrgconfiguration in Open Firmware environment variables. 615b7b2b65Slukem.Ss Boot program options 625b7b2b65Slukem.Bl -tag -width xxx 635b7b2b65Slukem.It Fl a 645b7b2b65SlukemPrompt for the root file system device, the system crash dump 655b7b2b65Slukemdevice, and the path to 665b7b2b65Slukem.Xr init 8 . 675b7b2b65Slukem.It Fl d 685b7b2b65SlukemBring the system up in debug mode. 69d7afda6dSmrgHere it waits for a kernel debugger connect; see 703297c18dSwiz.Xr gdb 1 . 71b0c225daSpk.It Fl C 72b0c225daSpkBoot kernel in compat mode. 73b0c225daSpkStarting with revision 1.14 74b0c225daSpk.Pq introduced on 2003/03/01 , 75b0c225daSpkthe sparc boot program loads the 76b0c225daSpk.Nx 77b0c225daSpkkernel at its linked virtual address. 78b0c225daSpkThis feature requires a kernel built after 2003/02/21 79b0c225daSpk.Pq corresponding to kernel version 1.6Q . 80b0c225daSpkTo load older kernels, the 81b0c225daSpk.Fl C 821fa878c4Swizoption must be used, which loads the kernel at physical address 831fa878c4Swiz0x4000. 841fa878c4SwizThe size of a kernel loaded in this way is limited to approximately 851fa878c4Swiz3MB. 865b7b2b65Slukem.It Fl q 875b7b2b65SlukemBoot the system in quiet mode. 885b7b2b65Slukem.It Fl s 895b7b2b65SlukemBring the system up in single-user mode. 905b7b2b65Slukem.It Fl v 915b7b2b65SlukemBoot the system in verbose mode. 925b7b2b65Slukem.El 935b7b2b65Slukem.Pp 945b7b2b65SlukemAny extra flags or arguments, or the 95befa7a89Swiz.Aq Ar boot string 965b7b2b65Slukemafter the -- separator are passed to the boot PROM. 97369451e4ScgdOther flags are currently ignored. 987d07096cSpk.Pp 99befa7a89SwizThe SPARC boot ROM comes in two flavours: an 100befa7a89Swiz.Dq old-style 101befa7a89SwizROM is used in sun4 machines, while a 102befa7a89Swiz.Dq new-style 103befa7a89SwizROM can be found on sun4c and sun4m models. 104befa7a89SwizThe 105befa7a89Swiz.Dq new-style 106befa7a89SwizSPARC boot ROM is a full-featured Forth system with emacs key bindings. 107befa7a89SwizIt can be put in 108befa7a89Swiz.Dq old-style 109befa7a89Swizuser-interface compatibility mode (in which case it shows a simple 11001869ca4Swiz.Sq > 111befa7a89Swizprompt), but this is essentially useless. 112ad424c18SjdcHowever, by default on sun4c models, the ROM runs in old-mode; to 113ad424c18Sjdcenter new-mode type 114befa7a89Swiz.Sq n . 115befa7a89SwizThe ROM then shows a Forth-style 116befa7a89Swiz.Dq ok 117befa7a89Swizprompt. 118befa7a89SwizIt is recommended to have the ROM always start in its native 119befa7a89Swiz.Dq new-style 120befa7a89Swizmode. 121befa7a89SwizUtter the following incantation in new-mode to force the ROM to always start 122befa7a89Swizin new-mode. 1237d07096cSpk.Pp 1247d07096cSpk.Pa \ ok 1257d07096cSpksetenv sunmon-compat? false 1267d07096cSpk.Pp 127befa7a89SwizThe ROM will normally load the kernel from 128befa7a89Swiz.Dq sd(0,0,0)vmunix . 129befa7a89SwizTo change the default so that 13034a98169Sperry.Nx 131befa7a89Swizwill be loaded from somewhere else, type the following 1327d07096cSpk.Pp 1337d07096cSpk.Pa \ ok 1347d07096cSpksetenv boot-from sd(0,0,0)netbsd 1357d07096cSpk.Pp 136d390d285SmrgOn newer SPARC machines, there are various aliases to access common devices. 137d390d285SmrgA typical list of usable boot devices (extracted from the output of 138d390d285Smrgthe Open Boot PROM command 139d390d285Smrg.Ic devalias ) 140d390d285Smrgis: 141ad424c18Sjdc.Bd -literal -offset indent 142d390d285Smrgfloppy /obio/SUNW,fdtwo 143d390d285Smrgnet-aui /iommu/sbus/ledma@f,400010:aui/le@f,c00000 144d390d285Smrgnet-tpe /iommu/sbus/ledma@f,400010:tpe/le@f,c00000 145d390d285Smrgnet /iommu/sbus/ledma@f,400010/le@f,c00000 146d390d285Smrgdisk /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0 147d390d285Smrgcdrom /iommu/sbus/espdma@f,400000/esp@f,800000/sd@6,0:d 148d390d285Smrgtape /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0 149d390d285Smrgtape1 /iommu/sbus/espdma@f,400000/esp@f,800000/st@5,0 150d390d285Smrgtape0 /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0 151d390d285Smrgdisk3 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0 152d390d285Smrgdisk2 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0 153d390d285Smrgdisk1 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@1,0 154d390d285Smrgdisk0 /iommu/sbus/espdma@f,400000/esp@f,800000/sd@0,0 155ad424c18Sjdc.Ed 156d390d285Smrg.Pp 157d390d285SmrgFor new-style machines, 158d390d285Smrgif a device specification includes a partition letter (for example 159d390d285Smrg.Em cdrom 160d390d285Smrgin above list), that partition is used by default, otherwise the first (a) 161d390d285Smrgpartition is used. 162d390d285SmrgIf booting from the net device, there is no partition involved. 163d390d285Smrg.Pp 164befa7a89SwizAt any time you can break back to the ROM by pressing the 165befa7a89Swiz.Sq L1 166befa7a89Swizand 167befa7a89Swiz.Sq a 1687d07096cSpkkeys at the same time (if the console is a serial port the same is 169befa7a89Swizachieved by sending a 170befa7a89Swiz.Sq break ) . 1717d07096cSpkIf you do this accidentally you can continue whatever was in progress 172befa7a89Swizby typing 173befa7a89Swiz.Sq go . 174d390d285Smrg.Sh OPEN BOOT PROM ENVIRONMENT VARIABLES 175d390d285SmrgThis section only applies to new-style machines. 176d390d285Smrg.Pp 177d390d285SmrgAll Open Boot PROM environment variables can be printed with the 178d390d285Smrg.Ic printenv 179d390d285Smrgcommand and changed with the 180d390d285Smrg.Ic setenv 181d390d285Smrgcommand. 182d390d285SmrgThe boot process relevant variables and their suggested value for 183d390d285Smrgbooting 184d390d285Smrg.Nx 185d390d285Smrgare: 186d390d285Smrg.Bd -literal -offset indent 187d390d285Smrgauto-boot? true 188d390d285Smrgboot-file 189d390d285Smrgboot-device disk 190d390d285Smrgdiag-switch? false 191d390d285Smrg.Ed 192d390d285Smrg.Pp 193d390d285SmrgOf course you may select any other boot device, 194d390d285Smrgif you do not want to boot from the device aliased to 195d390d285Smrg.Em disk , 196d390d285Smrgsee the discussion on devices above. 197ad424c18Sjdc.Sh OPEN BOOT PROM ABBREVIATED COMMAND SUMMARY 198ad424c18SjdcThis section only applies to new-style machines. 199ad424c18Sjdc.Pp 200ad424c18SjdcThe following Open Boot PROM commands are related to the boot process: 201ad424c18Sjdc.Bd -literal -offset indent 202ad424c18Sjdcboot boot the system from the default device 203ad424c18Sjdcboot device filename arguments 204ad424c18Sjdc boot the specified device, filename and arguments 205ad424c18Sjdcprobe-ide list devices on the primary IDE controller 206ad424c18Sjdcprobe-ide-all list devices on all known IDE controllers 207ad424c18Sjdcprobe-scsi list devices on the primary SCSI controller 208ad424c18Sjdcprobe-scsi-all list devices on all known SCSI controllers 209ad424c18Sjdcreset reset the system 210ad424c18Sjdc.Ed 211ad424c18SjdcFor disk and tape devices, the boot device is specified as 212ad424c18Sjdc.Sq /path/device@target,lun:partition . 213ad424c18Sjdc.Sh PROM MONITOR ABBREVIATED COMMAND SUMMARY 214ad424c18SjdcThis section only applies to old-style machines. 215ad424c18Sjdc.Pp 216ad424c18SjdcThe following PROM monitor commands are related to the boot process: 217ad424c18Sjdc.Bd -literal -offset indent 218ad424c18Sjdcb boot the system from the default device 219ad424c18Sjdcb device filename arguments 220ad424c18Sjdc boot the specified device, filename and arguments 221ad424c18Sjdcb? list boot device types 222ad424c18Sjdck2 reset the system 223ad424c18Sjdc.Ed 224ad424c18Sjdc.Pp 225ad424c18SjdcFor SCSI disk and tape devices, the boot device is specified as 226ad424c18Sjdc.Sq device(controller,unit,partition) , 227ad424c18Sjdcwhere 228ad424c18Sjdc.Sq unit 229*527132ccSfcambusis the hexadecimal value of the SCSI id of the target multiplied 230ad424c18Sjdcby eight plus the lun, and 231ad424c18Sjdc.Sq partition 232ad424c18Sjdcis the partition number, starting from 0. 233369451e4Scgd.Sh FILES 234ce5ebe99Scgd.Bl -tag -width /netbsdxx -compact 235ce5ebe99Scgd.It Pa /netbsd 236369451e4Scgdsystem code 237369451e4Scgd.It Pa /boot 238369451e4Scgdsystem bootstrap 239369451e4Scgd.El 240369451e4Scgd.Sh SEE ALSO 241d2a81ca5Swiz.Xr crash 8 , 242369451e4Scgd.Xr disklabel 8 , 243369451e4Scgd.Xr fsck 8 , 244369451e4Scgd.Xr halt 8 , 245369451e4Scgd.Xr init 8 , 246acb59d0bSwiz.Xr installboot 8 , 247369451e4Scgd.Xr rc 8 , 248369451e4Scgd.Xr shutdown 8 , 249d2a81ca5Swiz.Xr sparc64/boot 8 , 250acb59d0bSwiz.Xr syslogd 8 251ad424c18Sjdc.Sh BUGS 252ad424c18SjdcOn sun4 machines, the 253ad424c18Sjdc.Nx 254ad424c18Sjdcsparc boot loader can only boot from RAID partitions that start at the 255ad424c18Sjdcbeginning of the disk. 256ad424c18Sjdc.Pp 257ad424c18SjdcOn sun4 and early PROM version sun4c machines, the PROM can only boot from 258ad424c18Sjdcthe first 1Gb of the disk. 259ad424c18Sjdc.Pp 260ad424c18SjdcOn later PROM version sun4c and early PROM version sun4m machines, the PROM 261ad424c18Sjdccan only boot from the first 2Gb of the disk. 262ad424c18Sjdc.Pp 263ad424c18SjdcOn later PROM version sun4m machines, the PROM can only boot from the first 264ad424c18Sjdc4Gb of the disk. 265