.TH REBOOT 8 .UC 4 .SH NAME reboot \- UNIX bootstrapping procedures .SH SYNOPSIS .B /etc/reboot [ .B \-s ] [ .B \-n ] [ .B \-a ] .SH DESCRIPTION .PP UNIX is started by placing it in memory at location zero and transferring to zero. Since the system is not reenterable, it is necessary to read it in from disk or tape each time it is to be bootstrapped. .PP .B Rebooting a running system. When a UNIX is running and a reboot is desired, .B /etc/reboot can be used. It normally causes the disks to be synced, and then a multi-user reboot (as described below) is 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 The options to the .I reboot command are: .TP .B \-s Come up single user after the reboot, rather than doing a disk check and going multi-user. .TP .B \-n Don't sync out the disks before performing the reboot. This is useful if the reboot is immediately following rebuilding of the free list on the root file system. .TP .B \-a Reload the bootstrap program and have it wait and ask for a filename to be booted from. .PP .B "Power fail and crash recovery." Normally, the system will reboot itself at power-up or after crashes. Provided the auto-restart is enabled on the machine front panel, an automatic consistency check of the file systems will be performed then and unless this fails the system will resume multi-user operations. .PP .B Cold starts. Files on the console floppy make cold-starting the system easy. For each disk controller there are two floppy files from the root file system of unit 0 of that controller: one which gives a single user shell, while the other invokes the multi-user automatic reboot. Thus these files are RPS and RPM for the single and multi-user boot from MASSBUS RP06/RM03/RM05 disks, UPS and UPM for UNIBUS controller and disks such as the EMULEX SC-21 and AMPEX 9300 pair, or RKS and RKM for RK07 disks. .PP Giving the command .IP >>>BOOT RPM .LP Would boot the system from (e.g.) an RP06 and run the automatic consistency check as described in .IR fsck (8). (Note that it may be necessary to type control-P to gain the attention of the LSI-11 before getting the >>> prompt.) The command .IP >>>BOOT ANY .LP invokes a version of the boot program in a way which allows you to specify any system as the system to be booted. It reads from the console a device specification (see below) followed immediately by a pathname. .I Boot finds the corresponding file on the given device, loads that file into memory location zero, and starts the program at the entry address specified in the program header (after clearing off the high bit of the specified entry address.) Normal line editing characters can be used in specifying the pathname. .PP If you have an rp06, rm05 or rm03 disk and wish to boot off of a file system which starts at cylinder 0 of unit 0, you can type \*(lqhp(0,0)vmunix\*(rq to the boot prompt; \*(lqup(0,0)vmunix\*(rq would specify a UNIBUS ampex 9300 drive, ``rk(0,0)vmunix'' would specify a RK-07 disk drive. .PP A device specification has the following form: .IP device(unit, minor) .PP where .I device is the type of the device to be searched, .I unit is the unit number of the device, and .I minor is the minor device index. The following list of supported devices may vary from installation to installation: .ta 5 10 .nf hp RP06, RM05 or RM03 on MASSBUS up AMPEX 9300 on UNIBUS ht TE16 rk RK07 tm TM11 .fi .PP For tapes, the minor device number gives a file offset. .PP .B "Emergency bootstraps." If the console BOOT command does not work, here is a position-independent program which will read the boot block (block 0) from a RP06, RM05, or RM03 disk on the MASSBUS; the boot block will then boot in the file .I /boot off the file system at cylinder 0 of the RP. .PP .nf .if n .ta 3 14 21 41 49 .if t .ta .3i 1i 1.6i 3.5i RP06 disk (MBA 0, drive 0) 00009fde moval *$0x20010000,r1 # MBA 0 \0\0512001 d0 movl $1,4(r1) # initialize MBA \0\004a101 d0 movl $0x13,0x400(r1) # volume valid 0400c113 10008f32 cvtwl $0x1000,0x424(r1) # 16-bit format \0\00424c1 d4 clrl 12(r1) # map reg. 0, offset 0 \0\0\0\00ca1 8fd0 movl $0x80000000,0x800(r1) # valid, page 0/0 80000000 \0\00800c1 32 cvtwl $-512,16(r1) # byte count a1fe008f \0\0\0\0\0\010 28c1d4 clrl 0x428(r1) # cylinder \0\0\0\0\0\004 14c1d4 clrl 0x414(r1) # sector, track \0\0\0\0\0\004 c139d0 movl $0x39,0x400(r1) # read 1 block \0\0\0\00400 \0\000 halt .fi .PP To boot from magnetic tape: The .IR tp (1) command places the bootstrap program .I mboot on block 0 of the tape. When read into memory at location 0 and executed, .I mboot prompts with an equal sign `=', reads a file name from the console, then loads and executes that file from the .I tp tape. Unfortunately DEC does not provide a console command to read a block from tape to memory. Here is a position-independent program which does: .PP .nf TM03 magtape (MBA 1, drive 0) from load point: .if n .ta 3 14 21 41 49 .if t .ta .3i 1i 1.6i 3.5i 20009fde moval *$0x20012000,r1 # MBA 1 \0\0512001 d0 movl $1,4(r1) # initialize \0\004a101 32 cvtwl $0x14c0,0x424(r1) # drive characteristics c114c08f \0\0\0\00424 a1d4 clrl 12(r1) # map reg. 0, offset 0 \0\0\0\0\0\00c 008fd0 movl $0x80000000,0x800(r1) # valid, page 0/0 c1800000 \0\0\0\00800 8f32 cvtwl $-512,16(r1) # byte count 10a1fe00 00c139d0 movl $0x39,0x400(r1) # read 1 block \0\0\0\0\0\004 \0\0\0\000 halt Then give the console command \*(lqSTART 0\er\*(rq. .fi .PP .I mboot does not perform character erase and line kill editing. Instead, it starts over with the prompt for file name whenever the requested file cannot be found. .PP Be sure that .I mboot exists whenever a .I tp tape is made. Remember to put an appropriate block 0 boot and a .IR /boot in file systems when running .IR mkfs . .SH FILES .ta \w'/usr/mdec/mboot 'u /vmunix UNIX code .br /usr/mdec/uboot rp disk bootstrap .br /boot backup system bootstrap .br /usr/mdec/mboot .IR tp "" magtape bootstrap .SH "SEE ALSO" tp(1), crash(8), fsck(8), init(8), rc(8)