205 lines
4.6 KiB
Groff
205 lines
4.6 KiB
Groff
.\" $NetBSD: altboot.8,v 1.3 2011/01/27 11:33:43 nisimura Exp $
|
|
.\"
|
|
.\" Copyright (c) 2011 The NetBSD Foundation, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
.\" by Tohru Nishimura.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd January 26, 2011
|
|
.Dt ALTBOOT 8 sandpoint
|
|
.Os
|
|
.Sh NAME
|
|
.Nm altboot
|
|
.Nd program to boot
|
|
.Nx
|
|
kernel from disk or network
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
is a
|
|
.Nx
|
|
program which works on top of a
|
|
.Tn NAS
|
|
product's bootloader.
|
|
It is capable of loading a
|
|
.Nx
|
|
kernel from an
|
|
.Tn IDE
|
|
or
|
|
.Tn SATA
|
|
disk drive, or via network with
|
|
.Tn NFS
|
|
or
|
|
.Tn TFTP
|
|
protocol.
|
|
.Nm
|
|
can be stored in flash ROM.
|
|
Typically you will first copy it from flash into RAM and then invoke
|
|
it there to boot the
|
|
.Nx
|
|
kernel.
|
|
.Pp
|
|
.Nm
|
|
runs in conjunction with popular
|
|
.Tn U-Boot/PPCBoot
|
|
bootloaders used by
|
|
.Tn NAS
|
|
products.
|
|
With an appropriate boot command line, saved in the environment,
|
|
.Nm
|
|
can load and start a
|
|
.Nx
|
|
kernel without manual intervention.
|
|
The original
|
|
.Tn U-Boot/PPCBoot
|
|
bootloaders remain useful and altboot works as a functional extension
|
|
of them.
|
|
.Sh EXAMPLES
|
|
.Nm
|
|
occupies less than 128KB in volume and can be stored to any vacant
|
|
space of the system's flash.
|
|
It is made to run at RAM address offset 0x0100'0000.
|
|
.Tn U-Boot/PPCboot
|
|
is instructed to copy the program to RAM in this way:
|
|
.Pp
|
|
.Dl => cp.b fffe0000 1000000 20000
|
|
.Pp
|
|
Here 0xfffe'0000 is the flash address where
|
|
.Nm
|
|
is stored while 0x0100'0000 is the RAM address to copy to.
|
|
.Pp
|
|
The invocation syntax is:
|
|
.Pp
|
|
.Dl => go 1000000 Ar opt1 Ar opt2 ... Ar bootname
|
|
.Bl -tag -width xx
|
|
.It Va optN
|
|
multi, auto, ask, single, ddb, userconf, norm, quiet, verb,
|
|
silent, debug
|
|
.Pp
|
|
Omitting optN makes
|
|
.Nm
|
|
default to multi-user mode boot.
|
|
.Pp
|
|
N.B., the maximum number of the go command argument varies
|
|
and depends on the
|
|
.Tn U-Boot/PPCBoot
|
|
buildtime configuration.
|
|
.It Va bootname
|
|
One of the following:
|
|
.Pp
|
|
.Dl nfs: Ns Ar filename
|
|
.Dl nfs:
|
|
.Dl tftp: Ns Ar filename
|
|
.Dl tftp:
|
|
.Dl wd Ns Ar Np Ns : Ns Ar filename
|
|
.Dl wd Ns Ar Np Ns :
|
|
.Dl net:
|
|
.Pp
|
|
The last one is a synonym of
|
|
.Dq nfs .
|
|
.It nfs: Ns Va filename
|
|
issue a
|
|
.Tn DHCP
|
|
request to determine the
|
|
.Tn IP
|
|
address and download
|
|
.Em filename
|
|
from the
|
|
.Tn NFS
|
|
server.
|
|
.It nfs:
|
|
target file is determined by
|
|
.Sy filename
|
|
field of
|
|
.Pa /etc/dhcpd.conf
|
|
.It tftp: Ns Va filename
|
|
issue a
|
|
.Tn DHCP
|
|
request to determine
|
|
.Tn IP
|
|
address and download
|
|
.Em filename
|
|
from the
|
|
.Tn TFTP
|
|
server.
|
|
.It tftp:
|
|
target file is determined by
|
|
.Sy filename
|
|
field of
|
|
.Pa /etc/dhcpd.conf
|
|
.It wd Ns Va Np : Ns Va filename
|
|
load the
|
|
.Tn ELF
|
|
.Nx
|
|
kernel
|
|
.Em filename
|
|
from an
|
|
.Tn FFSv2
|
|
or
|
|
.Tn FFSv1
|
|
filesystem.
|
|
.Em N
|
|
is a number to distinguish the target drive.
|
|
.Em p
|
|
is a partition specifier.
|
|
When omitted, partition
|
|
.Sq a
|
|
is assumed.
|
|
.Dq wd0a
|
|
means partition
|
|
.Sq a
|
|
of the first disk drive.
|
|
.It wd Ns Va Np :
|
|
use filename
|
|
.Dq netbsd
|
|
for booting the
|
|
.Tn ELF
|
|
.Nx
|
|
kernel.
|
|
.El
|
|
.Pp
|
|
.Tn U-Boot/PPCBoot
|
|
provides a way to run a short list of commands right after power-on.
|
|
The following is a procedure to setup the system for starting
|
|
.Nx
|
|
after a 5 second delay, allowing the user to break into interactive
|
|
mode.
|
|
Note that a backslashed
|
|
.Sq \&;
|
|
is necessary to enter the script correctly.
|
|
.Bd -literal -offset indent
|
|
=> setenv bootcmd cp.b fffe0000 1000000 20000\e; go 1000000 wd0:
|
|
=> setenv bootdelay 5
|
|
=> saveenv
|
|
.Ed
|
|
.Sh SEE ALSO
|
|
.Xr dhcpd 8 ,
|
|
.Xr diskless 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nx Ns Tn /sandpoint
|
|
.Nm
|
|
first appeared in
|
|
.Nx 6.0 .
|