xref: /netbsd-src/share/man/man8/man8.sparc/boot.8 (revision 527132cc8c3ee5aa2cf55eb8f430891fac4b6587)
1.\"	$NetBSD: boot.8,v 1.33 2020/08/29 13:32:27 fcambus 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 June 17, 2006
33.Dt BOOT 8 sparc
34.Os
35.Sh NAME
36.Nm boot
37.Nd
38system 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.Ss Power fail and crash recovery
48Normally, the system will reboot itself at power-up or after crashes.
49An automatic consistency check of the file systems will be performed
50as described in
51.Xr fsck 8 ,
52and unless this fails, the system will resume multi-user operations.
53.Ss Cold starts
54The
55.Tn Sun
56boot firmware, either old-style or new-style (Open Boot Prom),
57performs a Power On Self Test
58.Pq Tn POST ,
59and then will boot an operating system according to
60configuration in Open Firmware environment variables.
61.Ss Boot program options
62.Bl -tag -width xxx
63.It Fl a
64Prompt for the root file system device, the system crash dump
65device, and the path to
66.Xr init 8 .
67.It Fl d
68Bring the system up in debug mode.
69Here it waits for a kernel debugger connect; see
70.Xr gdb 1 .
71.It Fl C
72Boot kernel in compat mode.
73Starting with revision 1.14
74.Pq introduced on 2003/03/01 ,
75the sparc boot program loads the
76.Nx
77kernel at its linked virtual address.
78This feature requires a kernel built after 2003/02/21
79.Pq corresponding to kernel version 1.6Q .
80To load older kernels, the
81.Fl C
82option must be used, which loads the kernel at physical address
830x4000.
84The size of a kernel loaded in this way is limited to approximately
853MB.
86.It Fl q
87Boot the system in quiet mode.
88.It Fl s
89Bring the system up in single-user mode.
90.It Fl v
91Boot the system in verbose mode.
92.El
93.Pp
94Any extra flags or arguments, or the
95.Aq Ar boot string
96after the -- separator are passed to the boot PROM.
97Other flags are currently ignored.
98.Pp
99The SPARC boot ROM comes in two flavours: an
100.Dq old-style
101ROM is used in sun4 machines, while a
102.Dq new-style
103ROM can be found on sun4c and sun4m models.
104The
105.Dq new-style
106SPARC boot ROM is a full-featured Forth system with emacs key bindings.
107It can be put in
108.Dq old-style
109user-interface compatibility mode (in which case it shows a simple
110.Sq >
111prompt), but this is essentially useless.
112However, by default on sun4c models, the ROM runs in old-mode; to
113enter new-mode type
114.Sq n .
115The ROM then shows a Forth-style
116.Dq ok
117prompt.
118It is recommended to have the ROM always start in its native
119.Dq new-style
120mode.
121Utter the following incantation in new-mode to force the ROM to always start
122in new-mode.
123.Pp
124.Pa \	ok
125setenv sunmon-compat? false
126.Pp
127The ROM will normally load the kernel from
128.Dq sd(0,0,0)vmunix .
129To change the default so that
130.Nx
131will be loaded from somewhere else, type the following
132.Pp
133.Pa \	ok
134setenv boot-from sd(0,0,0)netbsd
135.Pp
136On newer SPARC machines, there are various aliases to access common devices.
137A typical list of usable boot devices (extracted from the output of
138the Open Boot PROM command
139.Ic devalias )
140is:
141.Bd -literal -offset indent
142floppy         /obio/SUNW,fdtwo
143net-aui        /iommu/sbus/ledma@f,400010:aui/le@f,c00000
144net-tpe        /iommu/sbus/ledma@f,400010:tpe/le@f,c00000
145net            /iommu/sbus/ledma@f,400010/le@f,c00000
146disk           /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0
147cdrom          /iommu/sbus/espdma@f,400000/esp@f,800000/sd@6,0:d
148tape           /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0
149tape1          /iommu/sbus/espdma@f,400000/esp@f,800000/st@5,0
150tape0          /iommu/sbus/espdma@f,400000/esp@f,800000/st@4,0
151disk3          /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0
152disk2          /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0
153disk1          /iommu/sbus/espdma@f,400000/esp@f,800000/sd@1,0
154disk0          /iommu/sbus/espdma@f,400000/esp@f,800000/sd@0,0
155.Ed
156.Pp
157For new-style machines,
158if a device specification includes a partition letter (for example
159.Em cdrom
160in above list), that partition is used by default, otherwise the first (a)
161partition is used.
162If booting from the net device, there is no partition involved.
163.Pp
164At any time you can break back to the ROM by pressing the
165.Sq L1
166and
167.Sq a
168keys at the same time (if the console is a serial port the same is
169achieved by sending a
170.Sq break ) .
171If you do this accidentally you can continue whatever was in progress
172by typing
173.Sq go .
174.Sh OPEN BOOT PROM ENVIRONMENT VARIABLES
175This section only applies to new-style machines.
176.Pp
177All Open Boot PROM environment variables can be printed with the
178.Ic printenv
179command and changed with the
180.Ic setenv
181command.
182The boot process relevant variables and their suggested value for
183booting
184.Nx
185are:
186.Bd -literal -offset indent
187auto-boot?            true
188boot-file
189boot-device           disk
190diag-switch?          false
191.Ed
192.Pp
193Of course you may select any other boot device,
194if you do not want to boot from the device aliased to
195.Em disk ,
196see the discussion on devices above.
197.Sh OPEN BOOT PROM ABBREVIATED COMMAND SUMMARY
198This section only applies to new-style machines.
199.Pp
200The following Open Boot PROM commands are related to the boot process:
201.Bd -literal -offset indent
202boot               boot the system from the default device
203boot device filename arguments
204                   boot the specified device, filename and arguments
205probe-ide          list devices on the primary IDE controller
206probe-ide-all      list devices on all known IDE controllers
207probe-scsi         list devices on the primary SCSI controller
208probe-scsi-all     list devices on all known SCSI controllers
209reset              reset the system
210.Ed
211For disk and tape devices, the boot device is specified as
212.Sq /path/device@target,lun:partition .
213.Sh PROM MONITOR ABBREVIATED COMMAND SUMMARY
214This section only applies to old-style machines.
215.Pp
216The following PROM monitor commands are related to the boot process:
217.Bd -literal -offset indent
218b       boot the system from the default device
219b device filename arguments
220        boot the specified device, filename and arguments
221b?      list boot device types
222k2      reset the system
223.Ed
224.Pp
225For SCSI disk and tape devices, the boot device is specified as
226.Sq device(controller,unit,partition) ,
227where
228.Sq unit
229is the hexadecimal value of the SCSI id of the target multiplied
230by eight plus the lun, and
231.Sq partition
232is the partition number, starting from 0.
233.Sh FILES
234.Bl -tag -width /netbsdxx -compact
235.It Pa /netbsd
236system code
237.It Pa /boot
238system bootstrap
239.El
240.Sh SEE ALSO
241.Xr crash 8 ,
242.Xr disklabel 8 ,
243.Xr fsck 8 ,
244.Xr halt 8 ,
245.Xr init 8 ,
246.Xr installboot 8 ,
247.Xr rc 8 ,
248.Xr shutdown 8 ,
249.Xr sparc64/boot 8 ,
250.Xr syslogd 8
251.Sh BUGS
252On sun4 machines, the
253.Nx
254sparc boot loader can only boot from RAID partitions that start at the
255beginning of the disk.
256.Pp
257On sun4 and early PROM version sun4c machines, the PROM can only boot from
258the first 1Gb of the disk.
259.Pp
260On later PROM version sun4c and early PROM version sun4m machines, the PROM
261can only boot from the first 2Gb of the disk.
262.Pp
263On later PROM version sun4m machines, the PROM can only boot from the first
2644Gb of the disk.
265