293 lines
7.2 KiB
Groff
293 lines
7.2 KiB
Groff
.\" $NetBSD: boot.8,v 1.11 2009/03/11 19:01:29 joerg Exp $
|
|
.\"
|
|
.\" Copyright (c) 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software written and contributed
|
|
.\" to Berkeley by William Jolitz.
|
|
.\"
|
|
.\" 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.
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
|
.\"
|
|
.\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94
|
|
.\"
|
|
.Dd October 30, 2008
|
|
.Dt BOOT 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm boot
|
|
.Nd
|
|
system bootstrapping procedures
|
|
.Sh DESCRIPTION
|
|
This document provides information on using common features in the
|
|
.Nx
|
|
boot loader.
|
|
Additional information may be found in
|
|
architecture-specific
|
|
.Xr boot 8
|
|
manual pages.
|
|
.Pp
|
|
In the native
|
|
.Nx
|
|
boot protocol, options are passed from the boot loader
|
|
to the kernel via flag bits in the
|
|
.Va boothowto
|
|
variable, which is interpreted by the kernel in much the same way
|
|
as the
|
|
.Va howto
|
|
argument passed to the
|
|
.Xr reboot 2
|
|
system call.
|
|
.Ss Interactive mode
|
|
In interactive mode, the boot loader will present a prompt, allowing
|
|
input of these commands:
|
|
.\" NOTE: much of this text is duplicated in architecture-specific
|
|
.\" man pages (man8/man8.*/*boot*.8);
|
|
.\" please try to keep all relevant files synchronized.
|
|
.Bl -tag -width 04n -offset 04n
|
|
.It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
|
|
The default
|
|
.Va device
|
|
will be set to the disk that the boot loader was
|
|
loaded from.
|
|
To boot from an alternate disk, the full name of the device should
|
|
be given at the prompt.
|
|
.Va device
|
|
is of the form
|
|
.Xo Va xd
|
|
.Op Va N Ns Op Va x
|
|
.Xc
|
|
where
|
|
.Va xd
|
|
is the device from which to boot,
|
|
.Va N
|
|
is the unit number, and
|
|
.Va x
|
|
is the partition letter.
|
|
.Pp
|
|
The following list of supported devices may vary from installation to
|
|
installation:
|
|
.Pp
|
|
.Bl -hang -compact
|
|
.It hd
|
|
Hard disks.
|
|
.It fd
|
|
Floppy drives.
|
|
.El
|
|
.Pp
|
|
The default
|
|
.Va filename
|
|
is
|
|
.Pa netbsd ;
|
|
if the boot loader fails to successfully
|
|
open that image, it then tries
|
|
.Pa netbsd.gz
|
|
(expected to be a kernel image compressed by gzip), followed by
|
|
.Pa netbsd.old ,
|
|
.Pa netbsd.old.gz ,
|
|
.Pa onetbsd ,
|
|
and finally
|
|
.Pa onetbsd.gz .
|
|
Alternate system images can be loaded by just specifying the name of the image.
|
|
.Pp
|
|
Options are:
|
|
.Bl -tag -width xxx
|
|
.It Fl 1
|
|
Sets the machine-dependent flag
|
|
.Sy RB_MD1
|
|
in
|
|
.Va boothowto .
|
|
.It Fl 2
|
|
Sets the machine-dependent flag
|
|
.Sy RB_MD2
|
|
in
|
|
.Va boothowto .
|
|
.It Fl 3
|
|
Sets the machine-dependent flag
|
|
.Sy RB_MD3
|
|
in
|
|
.Va boothowto .
|
|
.It Fl 4
|
|
Sets the machine-dependent flag
|
|
.Sy RB_MD4
|
|
in
|
|
.Va boothowto .
|
|
.It Fl a
|
|
Sets the
|
|
.Sy RB_ASKNAME
|
|
flag in
|
|
.Va boothowto .
|
|
This causes the kernel to prompt for the root file system device,
|
|
the system crash dump device, and the path to
|
|
.Xr init 8 .
|
|
.It Fl b
|
|
Sets the
|
|
.Sy RB_HALT
|
|
flag in
|
|
.Va boothowto .
|
|
This causes subsequent reboot attempts to halt instead of rebooting.
|
|
.It Fl c
|
|
Sets the
|
|
.Sy RB_USERCONF
|
|
flag in
|
|
.Va boothowto .
|
|
This causes the kernel to enter the
|
|
.Xr userconf 4
|
|
device configuration manager as soon as possible during the boot.
|
|
.Xr userconf 4
|
|
allows devices to be enabled or disabled, and allows device locators
|
|
(such as hardware addresses or bus numbers)
|
|
to be modified before the kernel attempts to attach the devices.
|
|
.It Fl d
|
|
Sets the
|
|
.Sy RB_KDB
|
|
flag in
|
|
.Va boothowto .
|
|
Requests the kernel to enter debug mode, in which it
|
|
waits for a connection from a kernel debugger; see
|
|
.Xr ddb 4 .
|
|
.It Fl m
|
|
Sets the
|
|
.Sy RB_MINIROOT
|
|
flag in
|
|
.Va boothowto .
|
|
Informs the kernel that a mini-root file system is present in memory.
|
|
.It Fl q
|
|
Sets the
|
|
.Sy AB_QUIET
|
|
flag in
|
|
.Va boothowto .
|
|
Boot the system in quiet mode.
|
|
.It Fl s
|
|
Sets the
|
|
.Sy RB_SINGLE
|
|
flag in
|
|
.Va boothowto .
|
|
Boot the system in single-user mode.
|
|
.It Fl v
|
|
Sets the
|
|
.Sy AB_VERBOSE
|
|
flag in
|
|
.Va boothowto .
|
|
Boot the system in verbose mode.
|
|
.It Fl x
|
|
Sets the
|
|
.Sy AB_DEBUG
|
|
flag in
|
|
.Va boothowto .
|
|
Boot the system with debug messages enabled.
|
|
.It Fl z
|
|
Sets the
|
|
.Sy AB_SILENT
|
|
flag in
|
|
.Va boothowto .
|
|
Boot the system in silent mode.
|
|
.El
|
|
.It Ic consdev Va dev
|
|
Immediately switch the console to the specified device
|
|
.Va dev
|
|
and reprint the banner.
|
|
.Va dev
|
|
must be one of
|
|
.\" .Bl -item -width com[0123]kbd -offset indent -compact
|
|
.Ar pc , com0 , com1 , com2 ,
|
|
.Ar com3 , com0kbd , com1kbd , com2kbd ,
|
|
.Ar com3kbd ,
|
|
or
|
|
.Ar auto .
|
|
See
|
|
.Sx Console Selection Policy
|
|
in
|
|
.Xr boot_console 8 .
|
|
.It Ic dev Op Va device
|
|
Set the default drive and partition for subsequent filesystem
|
|
operations.
|
|
Without an argument, print the current setting.
|
|
.Va device
|
|
is of the form specified in
|
|
.Cm boot .
|
|
.It Ic help
|
|
Print an overview about commands and arguments.
|
|
.\" .It Ic load Va module Op Va arguments
|
|
.\" [i386 only]
|
|
.It Ic ls Op Pa path
|
|
Print a directory listing of
|
|
.Pa path ,
|
|
containing inode number, filename, and file type.
|
|
.Pa path
|
|
can contain a device specification.
|
|
.\" .It Ic multiboot Va kernel Op Va arguments
|
|
.\" [i386 only]
|
|
.It Ic quit
|
|
Reboot the system.
|
|
.El
|
|
.Pp
|
|
In an emergency, the bootstrap methods described in the
|
|
.Nx
|
|
installation notes for the specific architecture
|
|
can be used.
|
|
.Sh FILES
|
|
.Bl -tag -width /usr/mdec/bootxx_fstype -compact
|
|
.It Pa /boot
|
|
boot program code loaded by the primary bootstrap
|
|
.\" .It Pa /boot.cfg
|
|
.\" optional configuration file
|
|
.\" (used only on i386 and amd64 architectures)
|
|
.It Pa /netbsd
|
|
system code
|
|
.It Pa /netbsd.gz
|
|
gzip-compressed system code
|
|
.It Pa /usr/mdec/boot
|
|
master copy of the boot program (copy to /boot)
|
|
.It Pa /usr/mdec/bootxx_fstype
|
|
primary bootstrap for filesystem type fstype, copied to the start of
|
|
the
|
|
.Nx
|
|
partition by
|
|
.Xr installboot 8 .
|
|
.El
|
|
.Sh SEE ALSO
|
|
Architecture-specific
|
|
.Xr boot 8
|
|
manual pages,
|
|
.Xr ddb 4 ,
|
|
.Xr userconf 4 ,
|
|
.\" .Xr boot.cfg 5 ,
|
|
.Xr halt 8 ,
|
|
.Xr installboot 8 ,
|
|
.Xr reboot 8 ,
|
|
.Xr rescue 8 ,
|
|
.Xr shutdown 8
|
|
.Sh BUGS
|
|
The kernel file name must be specified before, not after, the boot options.
|
|
Any
|
|
.Ar filename
|
|
specified after the boot options, e.g.:
|
|
.Pp
|
|
.Bd -unfilled -offset indent -compact
|
|
.Cm boot -d netbsd.test
|
|
.Ed
|
|
.Pp
|
|
is ignored, and the default kernel is booted.
|