xref: /csrg-svn/lib/libc/sys/reboot.2 (revision 20123)
Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.

@(#)reboot.2 4.1 (Berkeley) 05/09/85

REBOOT 2V 4/1/81
C 4
NAME
reboot - reboot system or halt processor
SYNOPSIS
 #include <sys/reboot.h> 

reboot(howto) int howto;

DESCRIPTION
Reboot is used to cause a system reboot, and is invoked automatically in the event of unrecoverable system failures. Howto is a mask of options passed to the bootstrap program. The system call interface permits only RB_HALT or RB_AUTOBOOT to be passed to the reboot program; the other flags are used in scripts stored on the console storage media, or used in manual bootstrap procedures. When none of these options (e.g. RB_AUTOBOOT) is given, the system is rebooted from file \*(lqvmunix\*(rq in the root file system of unit 0 of a disk chosen in a processor specific way: on the 11/780 it is specified by a line in the DEFBOO.CMD script on the console floppy; on the 11/750 it is determined by the setting of the front panel switch which picks the bootstrap device. On the 11/730 it is determined by a file on the console casette.
An automatic consistency check of the disks is then normally performed.

The bits of howto are:

RB_HALT the processor is simply halted; no reboot takes place. This should be used with caution.

RB_ASKNAME Interpreted by the bootstrap program itself, causing it to inquire as to what file should be booted. Normally, the system is booted from the file \*(lqxx(0,0)vmunix\*(rq without asking, where xx is determined by a code in register r10 (which is known as devtype) at entry to the bootstrap program. The code corresponds to the major device number of the root file system, i.e. \*(lqmajor(rootdev)\*(rq. Currently, the following values of devtype are understood:

.ns

0 hp rm03/rm05/rm80/rp06 massbus disk
1 -- unused
2 up unibus disks (emulex sc21 w/ cdc/ampex/fujitsu drives)
3 rk rk07 unibus disks
Thus if r10 contained a 2, the system

up(0,0)vmunix.
would be booted. This switch not available from the system call interface.

RB_SINGLE Normally, the reboot procedure involves an automatic disk consistency check and then multi-user operations. This prevents the consistency check, rather simply booting the system with a single-user shell on the console, from the file system specified by r10. This switch is interpreted by the init (8) program in the newly booted system. This switch is not available from the system call interface.

"SEE ALSO"
crash(8), halt(8), init(8), reboot(8)
BUGS