Rototill boot.8 and dosboot.8. Fix a pile of mandoc usage, sort

options, sort SEE ALSOs, etc.

Add support for on-the-fly switching of console devices interactively
from biosboot via the "consdev" command.
This commit is contained in:
jhawk 2000-05-13 05:27:21 +00:00
parent 86584b9a4e
commit 11c5aee5eb
2 changed files with 207 additions and 92 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: boot.8,v 1.10 2000/03/06 01:44:29 hubertf Exp $
.\" $NetBSD: boot.8,v 1.11 2000/05/13 05:27:21 jhawk Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -36,7 +36,7 @@
.\"
.\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94
.\"
.Dd March 13, 1997
.Dd May 12, 2000
.Dt BOOT 8 i386
.Os
.Sh NAME
@ -44,12 +44,12 @@
.Nd
system bootstrapping procedures
.Sh DESCRIPTION
.Sy Power fail and crash recovery.
.Ss Power fail and crash recovery
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
.Sy Cold starts.
.Ss Cold starts
The 386
.Tn "PC AT"
clones attempt to boot the floppy disk drive A (otherwise known as drive
@ -59,11 +59,13 @@ The
.Nx
bootblocks are loaded and started either by the BIOS, or by
a boot selector program (such as OS-BS, BOOTEASY, the OS/2 Boot Menu or
.Nx 's
boot-selecting master boot record - see
.Nx No 's
.No boot-selecting
master boot record - see
.Xr mbr 8 ).
.Pp
Once running, a prompt similar to the following will appear.
.Ss Normal Operation
Once running, a banner similar to the following will appear:
.Bd -unfilled -offset indent
>> NetBSD BIOS Boot, revision 2.2
>> (user@buildhost, builddate)
@ -73,7 +75,7 @@ Press return to boot now, any other key for boot menu
booting wd0a:netbsd - starting in 5
.Ed
.Pp
After a countdown the system image listed will be loaded. (In the
After a countdown, the system image listed will be loaded. (In the
above example, it will be
.Dq Li wd0a:netbsd
which is the file
@ -85,53 +87,118 @@ of the
MBR partition of the first hard disk known to the BIOS [which is
appearently an IDE or similar device - see the
.Em BUGS
section].)
section].) Pressing a key within the time limit will enter
interactive mode.
.Pp
The default disk will be set to the disk that the boot loader was
.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
loaded from.
To boot from an alternate disk, the full name of the device should
be given at the prompt.
.Pp
The default image is
.Dq Li netbsd ;
if the boot loader fails to successfully
open that image, it then tries
.Dq Li netbsd.gz
(expected to be a kernel image compressed by gzip), followed by
.Dq Li netbsd.old ,
.Dq Li netbsd.old.gz ,
.Dq Li onetbsd ,
and finally
.Dq Li onetbsd.gz .
Alternate system images can be loaded by just specifying the name of the image.
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:
.Bd -unfilled -offset indent
sd SCSI disks on a controller recognized by the BIOS. The unit
number is the BIOS device number.
wd ST506, IDE, ESDI, RLL disks on a WD100[2367] or
lookalike controller(s), as numbered by the BIOS.
hd Hard disks as numbered by the BIOS.
fd Floppy drives as numbered by the BIOS.
.Ed
.Pp
The
.Op Fl s
flag to the boot loader will bring the system up in single-user mode.
The
.Op Fl a
flag instructs the system to prompt for the location of the root filesystem
and the system crash dump device.
The
.Op Fl r
flag instructs the system to use the compiled in value for the root
device, not the device the system image was loaded from.
The
.Op Fl d
flag to the boot loader will bring the system up in debug mode.
Here it waits for a kernel debugger connect; see
.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 ;
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 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
.Xr ddb 4 .
.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
.Pp
In an emergency, the bootstrap methods described in the
.Nx
@ -144,25 +211,25 @@ system code
.It Pa /netbsd.gz
gzip-compressed system code
.It Pa /usr/mdec/biosboot.sym
boot block (not installed)
boot block (read by installboot)
.It Pa /boot
boot block (installed).
boot block (written by installboot).
.El
.Sh SEE ALSO
.Xr boot_console 8 ,
.Xr ddb 4 ,
.Xr dosboot 8 ,
.Xr halt 8 ,
.Xr installboot 8 ,
.Xr mbr 8
.Xr reboot 8 ,
.Xr shutdown 8 ,
.Xr dosboot 8 ,
.Xr mbr 8
.Sh BUGS
Hard disks are always accessed by BIOS functions. Unit numbers are
BIOS device numbers which might differ from numbering in the
.Nx
kernel or physical parameters (eg SCSI slave numbers). The distiction
into
kernel or physical parameters (eg SCSI slave numbers). The distinction
between
.Dq sd
and
.Dq wd

View File

@ -1,4 +1,4 @@
.\" $NetBSD: dosboot.8,v 1.7 2000/03/05 23:55:56 nathanw Exp $
.\" $NetBSD: dosboot.8,v 1.8 2000/05/13 05:27:21 jhawk Exp $
.Dd June 20, 1997
.Os
.Dt DOSBOOT 8 i386
@ -8,40 +8,58 @@
.Sh SYNOPSIS
.Nm
.Op Fl u
.Op Fl c Ar <command>
.Op Fl c Ar command
.Op Fl i
.Op Ar path Op Fl bootopts
.Op Ar path Op Fl adrs
.Sh DESCRIPTION
.Nm
is an MS-DOS program. It is a boot loader for the i386 version of
.Nx
is an
.Tn MS-DOS
program. It is a boot loader for
.Nx Ns Tn /i386
designed to permit
.Nx
to be booted directly from MS-DOS. Per default, it boots a file with
to be booted directly from
.Tn MS-DOS .
By default, it boots a file with
name
.Pa NETBSD
in the current MS-DOS directory.
in the current
.Tn MS-DOS
directory.
.Nm
shares common code with the standard boot loader,
.Xr boot 8 .
.Pp
The recognized options are
.Bl -tag -width bootopts
The recognized options are:
.Bl -tag -width -adrs
.It Fl u
Boot from an UFS filesystem instead of an MS-DOS filesystem.
Boot from a UFS filesystem instead of an
.Tn MS-DOS
filesystem.
.It Fl c
Execute <command> (see below).
Execute
.Ar command
(see below).
.It Fl i
Enter interactive mode.
.Nm
will present a prompt, allowing input of commands (see below).
.Pp
.It path
Specifies the kernel file. In MS-DOS mode (default) a normal MS-DOS
.It Pa path
Specifies the kernel file. In
.Tn MS-DOS
mode (default) a normal
.Tn MS-DOS
filename (with or without drive specification) is accepted.
In UFS mode (after
.Fl u
or after a "mode ufs" command), a path in a
or after a
.Ic mode ufs
command), a path in a
.Nx
filesystem
is expected. Per default, the file is looked up in partition 'a' of
is expected. By default, the file is looked up in partition 'a' of
the first harddisk. Another device or partition can be specified
by prepending a block device name in terms of
.Nx ,
@ -49,40 +67,60 @@ followed
by a colon (see
.Xr boot 8
and examples).
.It bootopts
.It Fl adrs
Flags passed to the kernel, see
.Xr boot 8 .
.El
.Pp
The commands accepted after the
.Fl c
flag or in interactive mode are:
.Bl -tag -width help
.It help
Print an overview about commands and arguments.
.It ls Op path
Print a directory listing of path, containing inode number, filename
and file type. This command works in UFS mode only. path can
contain a device specification.
.It quit
Leave the
.Nm
program and exit to MS-DOS.
.It boot Op path Op Fl bootopts
.\" NOTE: much of this text is duplicated in boot.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
Boot
.Nx .
.It mode { dos | ufs }
Switch filesystem type.
.It dev Op device
.Nx . See
.Cm boot
in
.Xr boot 8
for full details.
.It Ic dev Op device
Set the default device and partition for subsequent filesystem operations.
Without an operand, print the current setting.
This setting doesn't apply to MS-DOS mode.
This setting doesn't apply to
.Tn MS-DOS
mode.
.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. This command works in
UFS mode only. path can contain a device specification.
.It Ic mode Va fstype
Switch filesystem type;
.Va fstype
should be one of
.Ar dos
or
.Ar ufs .
.It Ic quit
Leave the
.Nm
program and exit to
.Tn MS-DOS .
.El
.Sh EXAMPLES
To boot a
.Nx
kernel located on MS-DOS drive D, one would issue:
kernel located on
.Tn MS-DOS
drive D, one would issue:
.Bd -literal -offset indent
dosboot D:\\NODOS\\NETBSD
.Ed
@ -96,12 +134,20 @@ dosboot -u fd0a:netbsd -s
.Sh BUGS
.Nm
assumes that the processor is in real mode at startup. It does not work
well in the presence of MS-DOS extenders and memory managers.
well in the presence of
.Tn MS-DOS
extenders and memory managers.
.Pp
.Nm
does not run directly under Windows 95. See
does not run directly under
.Tn Windows 95 .
See
.Xr w95boot 8
for a method of starting NetBSD from Windows 95 using dosboot.
for a method of starting
.Nx
from
.Tn Windows 95
using dosboot.
.Pp
In UFS mode, files can only be loaded from devices known to the BIOS.
The device names do not necessarily comply with the names later
@ -109,7 +155,9 @@ used by the booted
.Nx
kernel.
.Pp
In MS-DOS mode, no useful boot device specification is passed to
In
.Tn MS-DOS
mode, no useful boot device specification is passed to
.Nx .
It is necessary to have the root device hardwired into the kernel
configuration or to enter it manually.