1.\"	$OpenBSD: boot_sparc64.8,v 1.16 2015/10/03 13:22:06 stsp 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 $Mdocdate: October 3 2015 $
33.Dt BOOT_SPARC64 8 sparc64
34.Os
35.Sh NAME
36.Nm boot_sparc64
37.Nd sparc64 system bootstrapping procedures
38.Sh DESCRIPTION
39.Ss System starts
40When powered on, after a panic, or if the system is rebooted via
41.Xr reboot 8
42or
43.Xr shutdown 8 ,
44the PROM will proceed to its initialization, and will boot an operating
45system if autoboot is enabled.
46.Ss Boot process description
47The sparc64 boot process is split into two parts: a small first-stage bootblock
48that is written into the superblock area of a partition
49.Po
50and hence is limited in size to SBSIZE - DEV_BSIZE bytes
51.Pc ,
52and a second-stage boot program that resides in the filesystem proper.
53The first-stage bootblock is loaded into memory by the PROM.
54After it receives control, it loads the second-stage boot program
55.Sy ofwboot
56from the filesystem.
57The second-stage boot program uses the device driver interface to
58the PROM and the stand-alone filesystem code in
59.Pa libsa.a
60to locate and load the kernel.
61The first-stage bootblock and second-stage boot program can be found in
62.Pa /usr/mdec/bootblk
63and
64.Pa /usr/mdec/ofwboot
65respectively.
66The second-stage boot program commonly resides in the root directory as
67.Pa /ofwboot .
68.Pp
69System boot blocks are installed using
70.Xr installboot 8 ,
71which prepares an FFS filesystem partition for boot-strapping from the PROM.
72.Pp
73The boot program attempts to load the kernel from the selected
74boot device, which must currently be an SCSI
75.Pq Pa sd
76or IDE
77.Pq Pa wd
78disk drive, or a CD-ROM
79.Pq Pa cd ,
80or an SCSI tape drive
81.Pq Pa st .
82.Pp
83The UltraSPARC Open Firmware
84will normally look for a bootloader on the device specified by the
85.Va boot-device
86variable.
87The
88.Ox
89bootloader will then look for a kernel named
90.Pa bsd
91by default, unless the
92.Va boot-file
93variable is set, or a different filename has been specified
94in the boot command.
95To reset this variable to its default, empty, value, type the following:
96.Pp
97.D1 Sy ok Li set-default boot-file
98.Pp
99To boot from a
100.Xr softraid 4
101volume by default,
102.Va boot-device
103must be set to a disk device hosting a chunk of the softraid volume:
104.Pp
105.D1 Sy ok Li setenv boot-device disk0
106.Pp
107and
108.Va boot-file
109must contain the
110.Pq Pa sr
111device name of the softraid volume and optionally a partition letter
112and/or kernel:
113.Pp
114.D1 Sy ok Li setenv boot-file sr0a:/bsd
115.Pp
116Autoboot is enabled by setting the
117.Va auto-boot?\&
118variable to
119.Dq true ,
120and is the factory default.
121.Ss Boot process options
122The following options are recognized:
123.Pp
124.Bl -tag -width "-XXX" -offset indent -compact
125.It Fl a
126Prompt for the root filesystem and swap devices after the devices have
127been configured.
128.It Fl c
129Enter the
130.Dq User Kernel Configuration
131mode upon startup
132.Pq see Xr boot_config 8 .
133.It Fl d
134Enter the debugger,
135.Xr ddb 4 ,
136as soon as the kernel console has been initialized.
137.It Fl s
138Boot the system single-user.
139The system will be booted multi-user unless this option is specified.
140.El
141.Ss Accessing the PROM during runtime
142If the
143.Xr sysctl 8
144variable
145.Va ddb.console
146is enabled, at any time you can break back to the ROM by pressing the
147.Sq L1
148.Pq also known as the Dq stop key
149and
150.Sq a
151keys at the same time (if the console is a serial port the same is
152achieved by sending a
153.Dq break ) ,
154and entering
155.Ic machine prom
156at the prompt.
157If you do this accidentally you can continue whatever was in progress
158by typing
159.Ic go
160at the PROM prompt, and then
161.Ic cont
162to return to the system.
163.Sh FILES
164.Bl -tag -width /usr/mdec/ofwboot.net -compact
165.It Pa /bsd
166default system kernel
167.It Pa /bsd.rd
168standalone installation kernel, suitable for disaster recovery
169.It Pa /usr/mdec/bootblk
170primary bootstrap for
171.Dq ffs
172file system
173.It Pa /usr/mdec/ofwboot
174secondary bootstrap (usually also installed as
175.Pa /ofwboot )
176.It Pa /usr/mdec/ofwboot.net
177network bootstrap
178.It Pa /usr/mdec/ofwbootfd
179floppy disk bootstrap
180.El
181.Sh SEE ALSO
182.Xr ddb 4 ,
183.Xr softraid 4 ,
184.Xr boot_config 8 ,
185.Xr halt 8 ,
186.Xr init 8 ,
187.Xr installboot 8 ,
188.Xr reboot 8 ,
189.Xr savecore 8 ,
190.Xr shutdown 8
191