NetBSD/sbin/reboot/reboot_i386.8

181 lines
5.8 KiB
Groff
Raw Normal View History

1993-03-21 12:45:37 +03:00
.\" Copyright (c) 1991 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.
.\"
1993-08-01 11:32:48 +04:00
.\" from: @(#)reboot_i386.8 1.2 (Berkeley) 4/25/91
1994-02-15 00:34:39 +03:00
.\" $Id: reboot_i386.8,v 1.7 1994/02/14 21:34:43 cgd Exp $
1993-03-22 11:04:00 +03:00
.\"
1993-03-21 12:45:37 +03:00
.Dd April 25, 1991
.Dt REBOOT 8
.Os
.Sh NAME
.Nm reboot
.Nd
1994-02-15 00:34:39 +03:00
.Tn NetBSD
1993-03-21 12:45:37 +03:00
bootstrapping procedures
.Sh SYNOPSIS
.Nm reboot
.Op Fl n
.Op Fl q
.Sh DESCRIPTION
1994-02-15 00:34:39 +03:00
The
.Tn NetBSD
kernel, an ordinary executable file,
1993-03-21 12:45:37 +03:00
is placed into memory by bootstrap at location absolute zero, and
entered at the executable's entry point
.Pq Va a_entry .
Upon startup, the system reorganizes memory to suit the needs of
the hardware configuration found, thus it is not designed to
be restartable without being reloaded on reboot.
Each time it is to be bootstrapped, it must be reloaded, usually from
a disk file.
.Pp
.Sy Rebooting a running system .
When a
1994-02-15 00:34:39 +03:00
.Tn NetBSD
kernel is running and a reboot is desired,
1993-03-21 12:45:37 +03:00
.Xr shutdown 8
is normally used.
If there are no users then
.Nm reboot
can be used.
Reboot causes the disks to be synced and allows the system
to perform other shutdown activities such as resynchronizing
hardware time-of-day clocks.
A multi-user reboot (as described below) is then initiated.
This causes a system to be
booted and an automatic disk check to be performed. If all this succeeds
without incident, the system is then brought up for many users.
.Pp
Options to reboot are:
.Bl -tag -width indent
.It Fl n
option avoids the sync. It can be used if a disk or the processor
is on fire.
.It Fl q
reboots quickly and ungracefully, without shutting down running
processes first.
.El
.Pp
.Nm Reboot
normally logs the reboot using
.Xr syslog 8
and places a shutdown record in the login accounting file
.Pa /var/log/wtmp .
These actions are inhibited if the
.Fl n
or
.Fl q
options are present.
.Pp
.Sy 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
as described in
.Xr fsck 8 .
and unless this fails, the system will resume multi-user operations.
.Pp
.Sy Cold starts .
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).
The automatic boot will attempt to load
.Pa netbsd
1993-03-21 12:45:37 +03:00
from partition A of
either the floppy or the hard disk. This boot may be aborted by typing
any character on the keyboard repeatedly (four or five times at least)
during the operating system load phase, after which the bootstrap will
prompt for the file that you wish to load instead.
.Pp
One exception to this is the
.Ql d
key, which will not abort the load but
instead silently force the
.Dv DEBUG
boot flags. The boot flags for an autoboot
are 0, and 3 for the successive boot after an aborted autoboot sequence.
1994-01-14 05:05:23 +03:00
No other provision is made for setting boot flags (yet).
1993-03-21 12:45:37 +03:00
A specific device or bootstrap file may be used; for example,
.Pp
The file specifications used for the boostrap
when loaded with the
.Dq askme
flag
(e.g. an aborted autoboot)
are of the form:
.Pp
.Dl device unit partition:
.Pp
where
.Ar device
is the type of the device, assumed to be on the ISA bus, to be searched,
.Ar unit
is the unit number of the disk or tape,
and
.Ar partition
is the disk partition or tape file number.
Normal line editing characters can be used when typing the file specification.
The following list of supported devices may vary from installation to
installation:
.Bd -unfilled -offset indent
wd ST506, IDE, ESDI, RLL disks on a WD100[2367] or lookalike
controller
fd 5 1/4" or 3 1/2" High density floppies
.Ed
.Pp
For example,
to boot from a file system which starts at cylinder 0
of unit 0 of an IDE disk, type
.Dq Li wd(0,a)/netbsd
1993-03-21 12:45:37 +03:00
to the boot prompt;
.Dq Li fd(0,a)/netbsd
1993-03-21 12:45:37 +03:00
would specify a 3 1/2" floppy drive 0 .
.Sh FILES
.Bl -tag -width /netbsd -compact
.It Pa /netbsd
1993-03-21 12:45:37 +03:00
system code
1994-02-15 00:34:39 +03:00
.\".It Pa /boot
.\"system bootstrap
1993-03-21 12:45:37 +03:00
.El
.Sh SEE ALSO
.Xr crash 8 ,
.Xr disklabel 8 ,
.Xr fsck 8 ,
.Xr halt 8 ,
.Xr init 8 ,
.Xr rc 8 ,
.Xr shutdown 8 ,
.Xr syslogd 8