1.\" $NetBSD: boot.8,v 1.17 2024/09/07 19:13:29 rillig Exp $ 2.\" 3.\" Copyright (c) 1999 Christopher G. Demetriou 4.\" 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. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed for the 17.\" NetBSD Project. See https://www.NetBSD.org/ for 18.\" information about NetBSD. 19.\" 4. The name of the author may not be used to endorse or promote products 20.\" derived from this software without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 34.\" 35.\" 36.\" Copyright (c) 1990, 1991 The Regents of the University of California. 37.\" All rights reserved. 38.\" 39.\" This code is derived from software contributed to Berkeley by 40.\" the Systems Programming Group of the University of Utah Computer 41.\" Science Department. 42.\" 43.\" Redistribution and use in source and binary forms, with or without 44.\" modification, are permitted provided that the following conditions 45.\" are met: 46.\" 1. Redistributions of source code must retain the above copyright 47.\" notice, this list of conditions and the following disclaimer. 48.\" 2. Redistributions in binary form must reproduce the above copyright 49.\" notice, this list of conditions and the following disclaimer in the 50.\" documentation and/or other materials provided with the distribution. 51.\" 3. Neither the name of the University nor the names of its contributors 52.\" may be used to endorse or promote products derived from this software 53.\" without specific prior written permission. 54.\" 55.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 56.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 57.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 58.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 59.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 60.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 61.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 62.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65.\" SUCH DAMAGE. 66.\" 67.\" @(#)boot_hp300.8 8.2 (Berkeley) 4/19/94 68.\" 69.Dd February 17, 2017 70.Dt BOOT 8 alpha 71.Os 72.Sh NAME 73.Nm boot 74.Nd Alpha system bootstrapping procedures 75.Sh DESCRIPTION 76.Tn DEC 77.Tn Alpha 78systems can have either of two different firmware systems: 79.Tn ARC 80.Pq a.k.a. Tn AlphaBIOS , 81and 82.Tn SRM . 83Some 84.Tn Alpha 85systems have both in their flash 86.Tn RAM 87and can switch between them on command. 88.Tn ARC 89is used to bootstrap Microsoft Windows NT for 90.Tn Alpha . 91.Tn SRM 92is used to bootstrap 93.Tn OpenVMS 94and 95.Tn Ultrix . 96.Nx 97requires 98.Tn SRM . 99.Pp 100.Tn SRM 101can bootstrap from supported local storage devices, e.g., 102.Tn IDE 103disks or 104.Tn CD-ROM 105drives, 106.Tn SCSI 107disks or 108.Tn CD-ROM 109drives, and floppy drives. 110.Tn SRM 111can also network bootstrap via supported 112.Tn Ethernet 113interfaces, using 114.Tn BOOTP 115or 116.Tn MOP . 117The particular capabilities of 118.Tn SRM 119will vary from system to system. 120.Pp 121When 122.Tn SRM 123boots the system, it performs a Power On Self Test 124.Pq Tn POST , 125probes the system busses to identify devices, and initializes them. 126.Tn SRM 127includes an x86 instruction emulator in order to run the 128.Tn BIOS 129initialization routines found in the 130.Tn PROM 131of any video cards found. 132In this way, most generic 133.Tn PCI 134video cards can work in 135.Tn Alpha 136systems that have 137.Tn PCI 138bus slots. 139.Pp 140.Tn SRM 141then examines the state of one of several variables: 142.Ev auto_action . 143If the value of 144.Ev auto_action 145is 146.Qq halt 147then 148.Tn SRM 149will stop, print its prompt: 150.Qq >>> 151and wait for commands to be entered on the console. 152If the value of 153.Ev auto_action 154is 155.Qq boot 156then 157.Tn SRM 158will automatically bootstrap the operating system specified by 159various non-volatile environment variables. 160.Pp 161.Tn SRM 162device names are not the same as in 163.Nx , 164e.g., 165.Sy ewa0 166is a 167.Tn DEC 168.Qq tulip 169.Tn Ethernet 170interface, 171.Sy dka0 172is a 173.Tn SCSI 174disk on a recognized controller, 175.Sy dqa0 176is an 177.Tn IDE 178disk on a recognized controller. 179The 180.Ic show device 181command will list all the devices that 182.Tn SRM 183can bootstrap from. 184.Ss SRM Commands 185.Tn SRM 186is somewhat 187.Ux Ns No -like 188in that it incorporates a simple pipe and I/O redirection, 189which allows command sequences like: 190.Pp 191.Bd -literal -offset indent 192show config | more 193show * | more 194.Ed 195.Pp 196An essential but incomplete list of 197.Tn SRM 198commands follows: 199.\" .Pp 200.\" .Bl -tag -width "boot [-file filename] [-flags value] [-protocols enet_protocol] [device]" 201.\" .It Ic boot Oo Fl file Ar filename Oc Oo Fl flags Ar value Oc Oo Fl protocols Ar enet_protocol Oc Op Ar device 202.Pp 203.Ic boot 204.Op Fl file Ar filename 205.Op Fl flags Ar value 206.\" .Op Fl protocols Ar enet_protocol 207.Op Ar device 208.Pp 209Boot an operating system. 210The default arguments for this command are taken from the 211.Tn SRM 212environment variables: 213.Pp 214.Bl -tag -compact -width "boot_osflags" -offset indent 215.It Ev boot_file 216file name to bootstrap. 217.It Ev boot_osflags 218flags to pass to the secondary bootstrap program. 219.It Ev bootdef_dev 220default bootstrap device. 221.El 222.\" .It Ic help Op Ar command 223.Pp 224.Ic help Op Ar command 225.Pp 226Invoke the 227.Tn SRM 228help system. 229.\" .It Ic set Ar variable Ar value 230.Pp 231.Ic init 232.Pp 233Reset the 234.Tn SRM 235console, and take actions as specified by 236.Tn SRM 237variables. 238.Pp 239.Ic set Ar variable Ar value Op Fl default 240.Pp 241Set an 242.Tn SRM 243variable, e.g., 244.Bd -literal -offset indent 245set auto_action boot 246set bootdef_dev dka0 247set ewa0_mode auto 248.Ed 249.Pp 250If the 251.Fl default 252flag is used, the variable will be set to its default value. 253.\" .It Ic show Ar variable or subsystem 254.Pp 255.Ic show Ar variable or subsystem 256.Pp 257Show 258.Tn SRM 259variables and values, or show system state or configuration. 260If a wildcard is used, then all matching 261.Tn SRM 262variables are shown, e.g., 263.Pp 264.Bl -tag -width "show device" -compact -offset indent 265.It Ic show \&* 266will display all 267.Tn SRM 268variables. 269.It Ic show b* 270will display all variables whose names begin with 271.Em b . 272.It Ic show config 273will display the complete system configuration. 274.It Ic show device 275will display all bootable devices. 276.It Ic show memory 277will display the system's memory configuration. 278.El 279.\" .El 280.Ss SRM Variables 281.Bl -tag -width "ew*0_protocols" 282.It Ev auto_action 283What 284.Tn SRM 285will do at system startup or reset: 286.Bl -tag -width boot 287.It Ar boot 288automatically bootstrap the operating system. 289.It Ar halt 290after 291.Tn POST , 292prompt the user on the console for commands to execute. 293.El 294.Pp 295Some 296.Tn Alpha 297systems 298.Pq e.g., Tn AlphaServer 800 299have a 300.Qq halt 301switch, which if set, will override the action of this variable, and cause 302.Tn SRM 303to stop after 304.Tn POST 305and prompt the user for commands to execute. 306.It Ev bootdef_dev 307The default bootstrap device, e.g., 308.Sy dka0 , 309.Sy dqa0 , 310.Sy ewa0 . 311The 312.Ic show device 313command will list the available and recognized bootable devices. 314.It Ev boot_file 315The file to bootstrap from; this is a null string by default. 316.It Ev boot_osflags 317The flag passed to the secondary bootstrap program, and the 318.Nx 319kernel: 320.Bl -tag -width "XXXX" 321.It Sy a 322.Pq automatic 323multi-user mode bootstrap. 324.It Sy c 325crash dump immediately after 326.Xr autoconf 4 , 327if the 328.Nx 329kernel is compiled with 330.Dv DEBUG ; 331See 332.Xr options 4 . 333.It Sy d 334break into the debugger ASAP, if the 335.Nx 336kernel is compiled with 337.Dv DDB 338or 339.Dv KGDB ; 340See 341.Xr options 4 . 342.It Sy h 343on a reboot request from the 344.Nx 345kernel, halt the system instead of rebooting. 346.It Sy i 347the 348.Nx 349secondary bootstrap program will stop and prompt for the 350.Nx 351kernel file name to bootstrap. 352.It Sy n 353the 354.Nx 355kernel will ask for the root file system's device, the kernel core 356dump device, and the path to 357.Xr init 8 . 358.It Sy q 359bootstrap quietly. 360.It Sy s 361single-user mode bootstrap. 362.It Sy v 363bootstrap verbosely. 364.El 365.Pp 366These may be used in combinations that are not mutually exclusive. 367These options are case-insensitive to be compatible with 368.Tn DEC 369operating systems. 370.It Ev console 371What type of console device 372.Tn SRM 373and 374.Nx 375will use: 376.Bl -tag -width "graphics" 377.It Ar graphics 378use a video card for output, and a 379.Tn PC 380keyboard for input. 381.It Ar serial 382use the first serial port for console. 383.El 384.Pp 385Just as with 386.Tn Sun 387systems, 388.Tn Alpha 389systems will use the first serial port as a console if there is no 390keyboard plugged into the keyboard port, even if 391.Ev console 392is set to 393.Qq graphics . 394.It Ev ew*0_mode 395The media and speed for 396.Tn DEC 397.Qq tulip 398Ethernet interfaces 399.Po 400e.g., 401.Tn DECchip 40221040, 21140, 21143 403.Pc ; 404possible values are: 405.Ic auto 406.Po 407.Tn IEEE 408802.3u 409.Qq Nway 410negotiation 411.Pc , 412.Ic BNC , 413.Ic AUI , 414.Ic Twisted-Pair , 415.Ic FastFD 416.Pq Fast Full Duplex . 417.It Ev ew*0_protocols 418The protocol to use when netbooting, i.e., 419.Tn MOP 420.Pq Maintenance Operations Protocol , 421or 422.Tn BOOTP 423.Pq Bootstrap Protocol . 424.Pp 425The 426.Tn Alpha 427.Tn SRM 428firmware is picky about 429.Tn BOOTP 430responses; the 431.Xr dhcpd.conf 5 432on the server needs the 433.Pp 434.Bd -literal -offset indent 435always-reply-rfc1048 on; 436.Ed 437.Pp 438directive in the section for netbooting 439.Tn Alpha 440systems. 441.It Ev os_type 442This determines which system firmware will be used after the next 443power-cycle, if both 444.Tn ARC 445and 446.Tn SRM 447are present in 448.Tn Flash RAM . 449This should be set to any of 450.Qq Ux , 451.Qq osf , 452or 453.Qq vms 454to select the 455.Tn SRM 456console required for 457.Nx . 458.Tn OSF 459refers to the Open Software Foundation. 460.El 461.Ss After bootstrap 462Once the 463.Nx Ns Tn /alpha 464kernel is booted normally 465it initializes itself and proceeds to start the system. 466An automatic consistency check of the file systems takes place, 467and unless this fails, the system comes up to multi-user operation. 468.Pp 469The proper way to shut the system down is with the 470.Xr shutdown 8 471command. 472.Pp 473If the system crashes, it will enter the kernel debugger, 474.Xr ddb 4 , 475if it is configured in the kernel. 476If the crash occurred during initialization and the debugger is 477not present or is exited, the kernel will halt the system. 478.Pp 479If the crash occurred during normal operation and the debugger 480is not present or is exited, the system will attempt a dump to the 481configured dump device (which will be automatically recovered with 482.Xr savecore 8 483during the next bootstrap cycle), and after the dump is complete (successful 484or not) the kernel will attempt a reboot. 485.Sh FILES 486.Bl -tag -width /usr/mdec/bootxx_cd9660 -compact 487.It Pa /boot 488.Nx 489secondary bootstrap program 490.Pq installed 491.It Pa /netbsd 492default 493.Nx 494system kernel 495.It Pa /usr/mdec/bootxx_cd9660 496primary bootstrap for 497.Dq cd9660 498.Pq Tn ISO 9660 499file system 500.It Pa /usr/mdec/bootxx_ffs 501primary bootstrap for 502.Dq ffs 503file system 504.Pq Berkeley Fast File System 505.It Pa /usr/mdec/boot 506secondary bootstrap 507.It Pa /usr/mdec/netboot 508network bootstrap 509.It Pa /usr/mdec/ustarboot 510.Dq ustar 511disk and tape bootstrap 512.El 513.Sh SEE ALSO 514.Xr ddb 4 , 515.Xr alpha/mkbootimage 8 , 516.Xr alpha/setnetbootinfo 8 , 517.Xr diskless 8 , 518.Xr init 8 , 519.Xr installboot 8 , 520.Xr rc 8 , 521.Xr reboot 8 , 522.Xr savecore 8 , 523.Xr shutdown 8 524.Rs 525.%T "Alpha Architecture Reference Manual Third Edition" 526.%Q "Alpha Architecture Committee" 527.%I "Digital Press" 528.%D 1998 529.Re 530.Sh BUGS 531The device names used by 532.Nx Ns Tn /alpha 533and the 534.Tn SRM Console 535often have no relation to each other. 536