2000-05-13 09:27:21 +04:00
|
|
|
.\" $NetBSD: boot.8,v 1.11 2000/05/13 05:27:21 jhawk Exp $
|
1995-04-23 14:33:03 +04:00
|
|
|
.\"
|
1995-03-18 18:17:32 +03:00
|
|
|
.\" 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. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. 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
|
|
|
|
.\"
|
2000-05-13 09:27:21 +04:00
|
|
|
.Dd May 12, 2000
|
1995-03-18 18:17:32 +03:00
|
|
|
.Dt BOOT 8 i386
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm boot
|
|
|
|
.Nd
|
|
|
|
system bootstrapping procedures
|
|
|
|
.Sh DESCRIPTION
|
2000-05-13 09:27:21 +04:00
|
|
|
.Ss Power fail and crash recovery
|
1995-03-18 18:17:32 +03:00
|
|
|
Normally, the system will reboot itself at power-up or after crashes.
|
|
|
|
An automatic consistency check of the file systems will be performed,
|
|
|
|
and unless this fails, the system will resume multi-user operations.
|
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
.Ss Cold starts
|
1995-03-18 18:17:32 +03:00
|
|
|
The 386
|
|
|
|
.Tn "PC AT"
|
|
|
|
clones attempt to boot the floppy disk drive A (otherwise known as drive
|
|
|
|
0) first, and failing that, attempt to boot the hard disk C (otherwise
|
|
|
|
known as hard disk controller 1, drive 0).
|
1998-02-06 08:54:12 +03:00
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
bootblocks are loaded and started either by the BIOS, or by
|
1999-05-07 18:00:39 +04:00
|
|
|
a boot selector program (such as OS-BS, BOOTEASY, the OS/2 Boot Menu or
|
2000-05-13 09:27:21 +04:00
|
|
|
.Nx No 's
|
|
|
|
.No boot-selecting
|
|
|
|
master boot record - see
|
1999-05-07 18:00:39 +04:00
|
|
|
.Xr mbr 8 ).
|
1995-03-18 18:17:32 +03:00
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
.Ss Normal Operation
|
|
|
|
Once running, a banner similar to the following will appear:
|
1997-03-13 08:28:42 +03:00
|
|
|
.Bd -unfilled -offset indent
|
1997-10-28 23:45:29 +03:00
|
|
|
>> NetBSD BIOS Boot, revision 2.2
|
|
|
|
>> (user@buildhost, builddate)
|
|
|
|
>> Memory: 637/15360 k
|
|
|
|
Use hd1a:netbsd to boot sd0 when wd0 is also installed
|
|
|
|
Press return to boot now, any other key for boot menu
|
|
|
|
booting wd0a:netbsd - starting in 5
|
1997-03-13 08:28:42 +03:00
|
|
|
.Ed
|
1995-03-18 18:17:32 +03:00
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
After a countdown, the system image listed will be loaded. (In the
|
1997-03-13 08:28:42 +03:00
|
|
|
above example, it will be
|
1997-10-28 23:45:29 +03:00
|
|
|
.Dq Li wd0a:netbsd
|
1997-03-13 08:28:42 +03:00
|
|
|
which is the file
|
|
|
|
.Nm netbsd
|
|
|
|
on partition
|
|
|
|
.Dq a
|
|
|
|
of the
|
|
|
|
.Nx
|
1999-05-07 18:00:39 +04:00
|
|
|
MBR partition of the first hard disk known to the BIOS [which is
|
|
|
|
appearently an IDE or similar device - see the
|
|
|
|
.Em BUGS
|
2000-05-13 09:27:21 +04:00
|
|
|
section].) Pressing a key within the time limit will enter
|
|
|
|
interactive mode.
|
1995-03-18 18:17:32 +03:00
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
.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 dosboot.8; please try to
|
|
|
|
.\" keep both files synchronized.
|
|
|
|
.Bl -tag -width 04n -offset 04n
|
|
|
|
.It Xo Ic boot
|
|
|
|
.Op Va device : Ns
|
|
|
|
.Op Va filename
|
|
|
|
.Op Fl adrs
|
|
|
|
.Xc
|
|
|
|
The default
|
|
|
|
.Va device
|
|
|
|
will be set to the disk that the boot loader was
|
1997-03-13 08:28:42 +03:00
|
|
|
loaded from.
|
|
|
|
To boot from an alternate disk, the full name of the device should
|
2000-05-13 09:27:21 +04:00
|
|
|
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.
|
2000-03-06 04:44:29 +03:00
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
The following list of supported devices may vary from installation to
|
|
|
|
installation:
|
|
|
|
.Pp
|
|
|
|
.Bl -hang -compact
|
|
|
|
.It sd
|
|
|
|
SCSI disks on a controller recognized by the BIOS. The
|
|
|
|
unit number is the BIOS device number.
|
|
|
|
.It wd
|
|
|
|
ST506, IDE, ESDI, RLL disks on a WD100[2367] or
|
|
|
|
lookalike controller(s), as numbered by the BIOS.
|
|
|
|
.It hd
|
|
|
|
Hard disks as numbered by the BIOS.
|
|
|
|
.It fd
|
|
|
|
Floppy drives as numbered by the BIOS.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The default
|
|
|
|
.Va filename
|
|
|
|
is
|
|
|
|
.Pa netbsd ;
|
2000-03-06 04:44:29 +03:00
|
|
|
if the boot loader fails to successfully
|
|
|
|
open that image, it then tries
|
2000-05-13 09:27:21 +04:00
|
|
|
.Pa netbsd.gz
|
2000-03-06 04:44:29 +03:00
|
|
|
(expected to be a kernel image compressed by gzip), followed by
|
2000-05-13 09:27:21 +04:00
|
|
|
.Pa netbsd.old ,
|
|
|
|
.Pa netbsd.old.gz ,
|
|
|
|
.Pa onetbsd ,
|
2000-03-06 04:44:29 +03:00
|
|
|
and finally
|
2000-05-13 09:27:21 +04:00
|
|
|
.Pa onetbsd.gz .
|
2000-03-06 04:44:29 +03:00
|
|
|
Alternate system images can be loaded by just specifying the name of the image.
|
1995-03-18 18:17:32 +03:00
|
|
|
.Pp
|
2000-05-13 09:27:21 +04:00
|
|
|
Options are:
|
|
|
|
.Bl -tag -width xxx
|
|
|
|
.It Fl a
|
|
|
|
Prompt for the location of the root filesystem and the system crash
|
|
|
|
dump device.
|
|
|
|
.It Fl d
|
|
|
|
Bring the system up in debug mode. Here it waits for a kernel
|
|
|
|
debugger connect; see
|
1997-07-10 11:37:23 +04:00
|
|
|
.Xr ddb 4 .
|
2000-05-13 09:27:21 +04:00
|
|
|
.It Fl r
|
|
|
|
Instructs the system to use the compiled in value for the root
|
|
|
|
device, not the device the system image was loaded from.
|
|
|
|
.It Fl s
|
|
|
|
Bring the system up in single-user 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 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 quit
|
|
|
|
Reboot the system.
|
|
|
|
.El
|
1995-03-18 18:17:32 +03:00
|
|
|
.Pp
|
1997-03-13 08:28:42 +03:00
|
|
|
In an emergency, the bootstrap methods described in the
|
|
|
|
.Nx
|
|
|
|
installation notes for the i386 architecture
|
|
|
|
can be used to boot from floppy.
|
1995-03-18 18:17:32 +03:00
|
|
|
.Sh FILES
|
1997-10-28 23:45:29 +03:00
|
|
|
.Bl -tag -width /usr/mdec/biosboot.sym -compact
|
1995-03-18 19:11:33 +03:00
|
|
|
.It Pa /netbsd
|
1995-03-18 18:17:32 +03:00
|
|
|
system code
|
2000-03-06 04:44:29 +03:00
|
|
|
.It Pa /netbsd.gz
|
|
|
|
gzip-compressed system code
|
1997-10-28 23:45:29 +03:00
|
|
|
.It Pa /usr/mdec/biosboot.sym
|
2000-05-13 09:27:21 +04:00
|
|
|
boot block (read by installboot)
|
1997-10-28 23:45:29 +03:00
|
|
|
.It Pa /boot
|
2000-05-13 09:27:21 +04:00
|
|
|
boot block (written by installboot).
|
1995-03-18 18:17:32 +03:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
1998-02-25 15:30:13 +03:00
|
|
|
.Xr boot_console 8 ,
|
1997-07-10 11:37:23 +04:00
|
|
|
.Xr ddb 4 ,
|
2000-05-13 09:27:21 +04:00
|
|
|
.Xr dosboot 8 ,
|
1995-03-18 18:17:32 +03:00
|
|
|
.Xr halt 8 ,
|
1997-10-28 23:45:29 +03:00
|
|
|
.Xr installboot 8 ,
|
2000-05-13 09:27:21 +04:00
|
|
|
.Xr mbr 8
|
1995-03-18 18:17:32 +03:00
|
|
|
.Xr reboot 8 ,
|
1998-02-25 15:30:13 +03:00
|
|
|
.Xr shutdown 8 ,
|
1997-10-28 23:45:29 +03:00
|
|
|
.Sh BUGS
|
|
|
|
Hard disks are always accessed by BIOS functions. Unit numbers are
|
|
|
|
BIOS device numbers which might differ from numbering in the
|
|
|
|
.Nx
|
2000-05-13 09:27:21 +04:00
|
|
|
kernel or physical parameters (eg SCSI slave numbers). The distinction
|
|
|
|
between
|
1997-10-28 23:45:29 +03:00
|
|
|
.Dq sd
|
|
|
|
and
|
|
|
|
.Dq wd
|
|
|
|
devices at the bootloader level is meaningless and exists for
|
1999-05-07 18:00:39 +04:00
|
|
|
historical reasons. (This is less a bug of the bootloader code than
|
|
|
|
a shortcoming of the PC architecture.)
|
|
|
|
The default disk device's name printed in the starting message
|
|
|
|
is derived from the
|
|
|
|
.Dq type
|
|
|
|
field of the
|
|
|
|
.Nx
|
|
|
|
disklabel (if it is a hard disk).
|