xref: /netbsd-src/share/man/man8/man8.sandpoint/altboot.8 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\" $NetBSD: altboot.8,v 1.3 2011/01/27 11:33:43 nisimura Exp $
2.\"
3.\" Copyright (c) 2011 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Tohru Nishimura.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd January 26, 2011
31.Dt ALTBOOT 8 sandpoint
32.Os
33.Sh NAME
34.Nm altboot
35.Nd program to boot
36.Nx
37kernel from disk or network
38.Sh DESCRIPTION
39.Nm
40is a
41.Nx
42program which works on top of a
43.Tn NAS
44product's bootloader.
45It is capable of loading a
46.Nx
47kernel from an
48.Tn IDE
49or
50.Tn SATA
51disk drive, or via network with
52.Tn NFS
53or
54.Tn TFTP
55protocol.
56.Nm
57can be stored in flash ROM.
58Typically you will first copy it from flash into RAM and then invoke
59it there to boot the
60.Nx
61kernel.
62.Pp
63.Nm
64runs in conjunction with popular
65.Tn U-Boot/PPCBoot
66bootloaders used by
67.Tn NAS
68products.
69With an appropriate boot command line, saved in the environment,
70.Nm
71can load and start a
72.Nx
73kernel without manual intervention.
74The original
75.Tn U-Boot/PPCBoot
76bootloaders remain useful and altboot works as a functional extension
77of them.
78.Sh EXAMPLES
79.Nm
80occupies less than 128KB in volume and can be stored to any vacant
81space of the system's flash.
82It is made to run at RAM address offset 0x0100'0000.
83.Tn U-Boot/PPCboot
84is instructed to copy the program to RAM in this way:
85.Pp
86.Dl => cp.b fffe0000 1000000 20000
87.Pp
88Here 0xfffe'0000 is the flash address where
89.Nm
90is stored while 0x0100'0000 is the RAM address to copy to.
91.Pp
92The invocation syntax is:
93.Pp
94.Dl => go 1000000 Ar opt1 Ar opt2 ... Ar bootname
95.Bl -tag -width xx
96.It Va optN
97multi, auto, ask, single, ddb, userconf, norm, quiet, verb,
98silent, debug
99.Pp
100Omitting optN makes
101.Nm
102default to multi-user mode boot.
103.Pp
104N.B., the maximum number of the go command argument varies
105and depends on the
106.Tn U-Boot/PPCBoot
107buildtime configuration.
108.It Va bootname
109One of the following:
110.Pp
111.Dl nfs: Ns Ar filename
112.Dl nfs:
113.Dl tftp: Ns Ar filename
114.Dl tftp:
115.Dl wd Ns Ar Np Ns : Ns Ar filename
116.Dl wd Ns Ar Np Ns :
117.Dl net:
118.Pp
119The last one is a synonym of
120.Dq nfs .
121.It nfs: Ns Va filename
122issue a
123.Tn DHCP
124request to determine the
125.Tn IP
126address and download
127.Em filename
128from the
129.Tn NFS
130server.
131.It nfs:
132target file is determined by
133.Sy filename
134field of
135.Pa /etc/dhcpd.conf
136.It tftp: Ns Va filename
137issue a
138.Tn DHCP
139request to determine
140.Tn IP
141address and download
142.Em filename
143from the
144.Tn TFTP
145server.
146.It tftp:
147target file is determined by
148.Sy filename
149field of
150.Pa /etc/dhcpd.conf
151.It wd Ns Va Np : Ns Va filename
152load the
153.Tn ELF
154.Nx
155kernel
156.Em filename
157from an
158.Tn FFSv2
159or
160.Tn FFSv1
161filesystem.
162.Em N
163is a number to distinguish the target drive.
164.Em p
165is a partition specifier.
166When omitted, partition
167.Sq a
168is assumed.
169.Dq wd0a
170means partition
171.Sq a
172of the first disk drive.
173.It wd Ns Va Np :
174use filename
175.Dq netbsd
176for booting the
177.Tn ELF
178.Nx
179kernel.
180.El
181.Pp
182.Tn U-Boot/PPCBoot
183provides a way to run a short list of commands right after power-on.
184The following is a procedure to setup the system for starting
185.Nx
186after a 5 second delay, allowing the user to break into interactive
187mode.
188Note that a backslashed
189.Sq \&;
190is necessary to enter the script correctly.
191.Bd -literal -offset indent
192=> setenv bootcmd cp.b fffe0000 1000000 20000\e; go 1000000 wd0:
193=> setenv bootdelay 5
194=> saveenv
195.Ed
196.Sh SEE ALSO
197.Xr dhcpd 8 ,
198.Xr diskless 8
199.Sh HISTORY
200The
201.Nx Ns Tn /sandpoint
202.Nm
203first appeared in
204.Nx 6.0 .
205