1.\" $NetBSD: boot.8,v 1.13 2010/03/22 18:58:32 joerg Exp $ 2.\" 3.\" Copyright (c) 1980, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)boot_vax.8 8.2 (Berkeley) 4/19/94 31.\" 32.Dd April 19, 1994 33.Dt BOOT 8 vax 34.Os 35.Sh NAME 36.Nm boot 37.Nd 38system bootstrapping procedures 39.Sh DESCRIPTION 40.Ss Power fail and crash recovery 41Normally, the system will reboot itself at power-up or after crashes. 42Provided the auto-restart is enabled on the machine front panel, 43an automatic consistency check of the file systems will be performed, 44and unless this fails, the system will resume multi-user operations. 45.Pp 46.Ss Cold starts 47These are processor-type dependent. 48On an 11/780, there are two floppy files for each disk controller, 49both of which cause boots from unit 0 of the root file system 50of a controller located on mba0 or uba0. 51One gives a single user shell, while the other invokes the multi-user 52automatic reboot. 53Thus these files are 54.Tn HPS 55and 56.Tn HPM 57for the single 58and multi-user boot from 59.Tn MASSBUS 60RP06/RM03/RM05 disks, 61.Tn UPS 62and 63.Tn UPM 64for 65.Tn UNIBUS 66storage module controller and disks 67such as the 68.Tn EMULEX 69SC-21 70and 71.Tn AMPEX 729300 pair, 73.Tn RAS 74and 75.Tn RAM 76to boot from 77.Tn MSCP 78controllers and disks such as the RA81, 79or 80.Tn HKS 81and 82.Tn HKM 83for RK07 disks. 84There is also a script for booting from the default device, 85which is normally a copy of one of the standard multi-user boot scripts, 86but which may be modified to perform other actions 87or to boot from a different unit. 88The situation on the 8600 is similar, with scripts loaded from the console RL02. 89.Pp 90Giving the command 91.Pp 92.Dl \*[Gt]\*[Gt]\*[Gt]BOOT HPM 93.Pp 94would boot the system from (e.g.) an RP06 and run the automatic consistency 95check as described in 96.Xr fsck 8 . 97(Note that it may 98be necessary to type control-P 99and halt the processor 100to gain the attention of the 101.Tn LSI-11 102before getting the \*[Gt]\*[Gt]\*[Gt] prompt.) 103The command 104.Pp 105.Dl \*[Gt]\*[Gt]\*[Gt]BOOT ANY 106.Pp 107invokes a version of the boot program in a way which allows you to 108specify any system as the system to be booted. 109It reads from the console a device specification (see below) followed 110immediately by a pathname. 111.Pp 112The scripts may be modified for local configuration if necessary. 113The flags are placed in register 11 (as defined in 114.In sys/reboot.h ) . 115The boot device is specified in register 10. 116The encoding of this register is also defined in 117.In sys/reboot.h . 118The current encoding has a historical basis, and is shown in the following 119table: 120.Pp 121.Bd -unfilled -offset indent -compact 122bits usage 1230-7 boot device type (the device major number) 1248-15 disk partition 12516-19 drive unit 12620-23 controller number 12724-27 adaptor number (UNIBUS or MASSBUS as appropriate) 128.Ed 129.Pp 130The adaptor number corresponds to the normal configuration on the 11/750, 131and to the order in which adaptors are found on the 11/780 and 8600 132(generally the same as the numbers used by 133.Ux ) . 134.Pp 135On an 11/750, the reset button will boot from the device 136selected by the front panel boot device switch. 137In systems with RK07's, position B normally selects the RK07 for boot. 138This will boot multi-user. 139To boot from RK07 with boot flags you may specify 140.Pp 141.Bd -unfilled -offset indent -compact 142.Li \&\*[Gt]\*[Gt]\*[Gt]B/ Ns Fl n No DMA0 143.Ed 144.Pp 145where, giving a 146.Ar n 147of 1 causes the boot program 148to ask for the name of the system to be bootstrapped, 149giving a 150.Ar n 151of 2 causes the boot program to come up single 152user, and a 153.Ar n 154of 3 causes both of these actions to occur. 155The ``DM'' specifies RK07, the ``A'' represents the adaptor number 156.Pf ( Tn UNIBUS 157or 158.Tn MASSBUS ) , 159and the ``0'' is the drive unit number. 160Other disk types which may be used are DB 161.Pq Tn MASSBUS , 162DD (TU58), 163and DU 164.Pf ( Tn UDA-50/RA 165disk). 166A non-zero disk partition can be used by adding (partition times 1000 hex) 167to 168.Ar n . 169.Pp 170The boot procedure on the Micro 171.Tn VAX 172II 173is similar. 174A switch on the back panel sets the power-up action 175to autoboot or to halt. 176When halted, the processor may be booted using the same syntax 177as on the 11/750. 178.Pp 179The 11/750 boot procedure uses the boot ROMs to load block 0 off of 180the specified device. 181The 182.Pa /usr/mdec 183directory contains a number 184of bootstrap programs for the various disks which should be placed 185in a new pack by 186.Xr disklabel 8 . 187Similarly, the Micro 188.Tn VAX 189II boot procedure loads a boot parameter block 190from block 0 of the disk. 191The 192.Ic rdboot 193.Dq bootstrap 194contains the correct parameters for an 195.Tn MSCP 196disk such 197as the RD53. 198.Pp 199On any processor, the 200.Em boot 201program 202finds the corresponding file on the given device 203.Pf ( Pa netbsd 204by default), loads that file 205into memory location zero, and starts the program at the entry address 206specified in the program header (after clearing off the high bit 207of the specified entry address). 208.Pp 209The file specifications used with 210.Dq BOOT ANY 211or 212.Dq \&B/3 213are of the form: 214.Pp 215.Dl device(adaptor,controller,unit,minor) 216.Pp 217where 218.Ar device 219is the type of the device to be searched, 220.Ar adaptor 221is the 222.Tn UNIBUS 223or 224.Tn MASSBUS 225number of the adaptor to which the device is attached, 226.Ar controller 227is the unit number of the controller or 228.Tn MASSBUS 229tape formatter on that adaptor, 230.Ar unit 231is the unit number of the disk or transport slave unit of the tape, 232and 233.Ar minor 234is the disk partition or tape file number. 235Leading adaptor or controller numbers default to 0. 236Normal line editing characters can be used when typing the file specification. 237The following list of supported devices may vary from installation to 238installation: 239.Pp 240.Bd -unfilled -offset indent -compact 241hp MASSBUS disk drive 242up UNIBUS storage module drive 243ht TE16,TU45,TU77 on MASSBUS 244kra storage module on a KDB50 245mt TU78 on MASSBUS 246hk RK07 on UNIBUS 247ra storage module on a MSCP-compatible UNIBUS controller 248rb storage module on a 730 IDC 249rl RL02 on UNIBUS 250tm TM11 emulation tape drives on UNIBUS 251tms TMSCP-compatible tape 252ts TS11 on UNIBUS 253ut UNIBUS TU45 emulator 254.Ed 255.Pp 256For example, 257to boot from a file system which starts at cylinder 0 258of unit 0 of a 259.Tn MASSBUS 260disk, type 261.Ql hp(0,0)netbsd 262to the boot prompt; 263.Ql hp(2,0,1,0)netbsd 264would specify drive 1 on 265.Tn MASSBUS 266adaptor 2; 267.Ql up(0,0)netbsd 268would specify a 269.Tn UNIBUS 270drive, 271.Ql hk(0,0)netbsd 272would specify 273an RK07 disk drive, 274.Ql ra(1,0,0,0)netbsd 275would specify a 276.Tn UDA50 277disk drive on a second 278.Tn UNIBUS , 279and 280.Ql rb(0,0)netbsd 281would specify a 282disk on a 730 283.Tn IDC . 284For tapes, the minor device number gives a file offset; 285.Ql mt(1,2,3,4) 286would specify the fifth file on slave 3 of the formatter 287at 288.Ql drive 2892 on mba 1. 290.Pp 291On an 11/750 with patchable control store, 292microcode patches will be installed by 293.Em boot 294if the file 295.Pa psc750.bin 296exists in the root of the filesystem from which the system is booted. 297.Pp 298In an emergency, the bootstrap methods described in the paper 299.%T Installing and Operating 4.3bsd 300can be used to boot from a distribution tape. 301.Sh FILES 302.Bl -tag -width /usr/mdec/xxboot -compact 303.It Pa /netbsd 304system code 305.It Pa /boot 306system bootstrap 307.It Pa /usr/mdec/xxboot 308sector-0 boot block for 750, xx is disk type 309.It Pa /usr/mdec/bootxx 310second-stage boot for 750, xx is disk type 311.It Pa /pcs750.bin 312microcode patch file on 750 313.El 314.Sh SEE ALSO 315.Xr arff 8 , 316.Xr halt 8 , 317.Xr reboot 8 , 318.Xr shutdown 8 319.Sh HISTORY 320The 321.Nm 322command appeared in 323.Bx 4.0 . 324