1*62e03839Skn.\"	$OpenBSD: boot_sparc64.8,v 1.18 2022/09/05 10:29:28 kn Exp $
2cdfc4093Smiod.\"
3cdfc4093Smiod.\" Copyright (c) 1992, 1993
4cdfc4093Smiod.\"	The Regents of the University of California.  All rights reserved.
5cdfc4093Smiod.\"
6cdfc4093Smiod.\" Redistribution and use in source and binary forms, with or without
7cdfc4093Smiod.\" modification, are permitted provided that the following conditions
8cdfc4093Smiod.\" are met:
9cdfc4093Smiod.\" 1. Redistributions of source code must retain the above copyright
10cdfc4093Smiod.\"    notice, this list of conditions and the following disclaimer.
11cdfc4093Smiod.\" 2. Redistributions in binary form must reproduce the above copyright
12cdfc4093Smiod.\"    notice, this list of conditions and the following disclaimer in the
13cdfc4093Smiod.\"    documentation and/or other materials provided with the distribution.
1429295d1cSmillert.\" 3. Neither the name of the University nor the names of its contributors
15cdfc4093Smiod.\"    may be used to endorse or promote products derived from this software
16cdfc4093Smiod.\"    without specific prior written permission.
17cdfc4093Smiod.\"
18cdfc4093Smiod.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19cdfc4093Smiod.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20cdfc4093Smiod.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21cdfc4093Smiod.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22cdfc4093Smiod.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23cdfc4093Smiod.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24cdfc4093Smiod.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25cdfc4093Smiod.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26cdfc4093Smiod.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27cdfc4093Smiod.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28cdfc4093Smiod.\" SUCH DAMAGE.
29cdfc4093Smiod.\"
30cdfc4093Smiod.\"     @(#)boot_sparc.8	8.2 (Berkeley) 4/19/94
31cdfc4093Smiod.\"
32*62e03839Skn.Dd $Mdocdate: September 5 2022 $
3375643a34Smiod.Dt BOOT_SPARC64 8 sparc64
34cdfc4093Smiod.Os
35cdfc4093Smiod.Sh NAME
360201bdceSespie.Nm boot_sparc64
3775643a34Smiod.Nd sparc64 system bootstrapping procedures
38cdfc4093Smiod.Sh DESCRIPTION
3975643a34Smiod.Ss System starts
4075643a34SmiodWhen powered on, after a panic, or if the system is rebooted via
4175643a34Smiod.Xr reboot 8
4275643a34Smiodor
4375643a34Smiod.Xr shutdown 8 ,
4475643a34Smiodthe PROM will proceed to its initialization, and will boot an operating
4575643a34Smiodsystem if autoboot is enabled.
4675643a34Smiod.Ss Boot process description
477cfb070fSstspThe sparc64 boot process is split into two parts: a small first-stage bootblock
487cfb070fSstspthat is written into the superblock area of a partition
497cfb070fSstsp.Po
507cfb070fSstspand hence is limited in size to SBSIZE - DEV_BSIZE bytes
517cfb070fSstsp.Pc ,
527cfb070fSstspand a second-stage boot program that resides in the filesystem proper.
537cfb070fSstspThe first-stage bootblock is loaded into memory by the PROM.
547cfb070fSstspAfter it receives control, it loads the second-stage boot program
557cfb070fSstsp.Sy ofwboot
567cfb070fSstspfrom the filesystem.
577cfb070fSstspThe second-stage boot program uses the device driver interface to
587cfb070fSstspthe PROM and the stand-alone filesystem code in
597cfb070fSstsp.Pa libsa.a
607cfb070fSstspto locate and load the kernel.
617cfb070fSstspThe first-stage bootblock and second-stage boot program can be found in
627cfb070fSstsp.Pa /usr/mdec/bootblk
637cfb070fSstspand
647cfb070fSstsp.Pa /usr/mdec/ofwboot
657cfb070fSstsprespectively.
667cfb070fSstspThe second-stage boot program commonly resides in the root directory as
677cfb070fSstsp.Pa /ofwboot .
687cfb070fSstsp.Pp
6975643a34SmiodThe boot program attempts to load the kernel from the selected
7037ad6a15Sschwarzeboot device, which must currently be an SCSI
7137ad6a15Sschwarze.Pq Pa sd
7275643a34Smiodor IDE
7337ad6a15Sschwarze.Pq Pa wd
741791c573Sjmcdisk drive, or a CD-ROM
7537ad6a15Sschwarze.Pq Pa cd ,
7637ad6a15Sschwarzeor an SCSI tape drive
7737ad6a15Sschwarze.Pq Pa st .
78cdfc4093Smiod.Pp
7937ad6a15SschwarzeThe UltraSPARC Open Firmware
80c989ca0dSjmcwill normally look for a bootloader on the device specified by the
8137ad6a15Sschwarze.Va boot-device
8275643a34Smiodvariable.
83cdfc4093SmiodThe
84cdfc4093Smiod.Ox
8575643a34Smiodbootloader will then look for a kernel named
8675643a34Smiod.Pa bsd
8775643a34Smiodby default, unless the
8837ad6a15Sschwarze.Va boot-file
8943cbe5bfSknvariable contains a filename, or a different filename has been specified
9075643a34Smiodin the boot command.
91cdfc4093SmiodTo reset this variable to its default, empty, value, type the following:
92cdfc4093Smiod.Pp
9337ad6a15Sschwarze.D1 Sy ok Li set-default boot-file
9475643a34Smiod.Pp
9575643a34SmiodAutoboot is enabled by setting the
9637ad6a15Sschwarze.Va auto-boot?\&
9775643a34Smiodvariable to
9875643a34Smiod.Dq true ,
9975643a34Smiodand is the factory default.
10075643a34Smiod.Ss Boot process options
10175643a34SmiodThe following options are recognized:
102c989ca0dSjmc.Pp
103d427d14cSschwarze.Bl -tag -width "-XXX" -offset indent -compact
104c989ca0dSjmc.It Fl a
10575643a34SmiodPrompt for the root filesystem and swap devices after the devices have
10675643a34Smiodbeen configured.
107c989ca0dSjmc.It Fl c
10875643a34SmiodEnter the
10975643a34Smiod.Dq User Kernel Configuration
11075643a34Smiodmode upon startup
11175643a34Smiod.Pq see Xr boot_config 8 .
112c989ca0dSjmc.It Fl d
11375643a34SmiodEnter the debugger,
11475643a34Smiod.Xr ddb 4 ,
11575643a34Smiodas soon as the kernel console has been initialized.
116c989ca0dSjmc.It Fl s
11775643a34SmiodBoot the system single-user.
11875643a34SmiodThe system will be booted multi-user unless this option is specified.
11975643a34Smiod.El
1206c04b5e5Smiod.Ss Accessing the PROM during runtime
121cdfc4093SmiodIf the
122cdfc4093Smiod.Xr sysctl 8
123cdfc4093Smiodvariable
12437ad6a15Sschwarze.Va ddb.console
125cdfc4093Smiodis enabled, at any time you can break back to the ROM by pressing the
12637ad6a15Sschwarze.Sq L1
127877d806cSjmc.Pq also known as the Dq stop key
128cdfc4093Smiodand
12937ad6a15Sschwarze.Sq a
130cdfc4093Smiodkeys at the same time (if the console is a serial port the same is
131cdfc4093Smiodachieved by sending a
13275643a34Smiod.Dq break ) ,
13375643a34Smiodand entering
13475643a34Smiod.Ic machine prom
13575643a34Smiodat the prompt.
136cdfc4093SmiodIf you do this accidentally you can continue whatever was in progress
137cdfc4093Smiodby typing
13875643a34Smiod.Ic go
13975643a34Smiodat the PROM prompt, and then
14075643a34Smiod.Ic cont
14175643a34Smiodto return to the system.
142cdfc4093Smiod.Sh FILES
14375643a34Smiod.Bl -tag -width /usr/mdec/ofwboot.net -compact
144cdfc4093Smiod.It Pa /bsd
14575643a34Smioddefault system kernel
146ad3220b1Smiod.It Pa /bsd.rd
147ad3220b1Smiodstandalone installation kernel, suitable for disaster recovery
14875643a34Smiod.It Pa /usr/mdec/bootblk
14975643a34Smiodprimary bootstrap for
15075643a34Smiod.Dq ffs
15175643a34Smiodfile system
15275643a34Smiod.It Pa /usr/mdec/ofwboot
15375643a34Smiodsecondary bootstrap (usually also installed as
15475643a34Smiod.Pa /ofwboot )
15575643a34Smiod.It Pa /usr/mdec/ofwboot.net
15675643a34Smiodnetwork bootstrap
157bb8490e5Sstsp.It Pa /usr/mdec/ofwbootfd
158bb8490e5Sstspfloppy disk bootstrap
159cdfc4093Smiod.El
160cdfc4093Smiod.Sh SEE ALSO
16175643a34Smiod.Xr ddb 4 ,
162bb8490e5Sstsp.Xr softraid 4 ,
1636c04b5e5Smiod.Xr boot_config 8 ,
164cdfc4093Smiod.Xr halt 8 ,
165cdfc4093Smiod.Xr init 8 ,
166cdfc4093Smiod.Xr installboot 8 ,
16775643a34Smiod.Xr reboot 8 ,
16875643a34Smiod.Xr savecore 8 ,
16975643a34Smiod.Xr shutdown 8
170