1.\" $OpenBSD: boot.8,v 1.3 2024/11/05 09:42:48 miod Exp $ 2.\" 3.\" Copyright (c) 1997-2001 Michael Shalayeff 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.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, 19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25.\" THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.\" 28.Dd $Mdocdate: November 5 2024 $ 29.Dt BOOT 8 alpha 30.Os 31.Sh NAME 32.Nm boot , 33.Nm boot.conf 34.Nd alpha-specific bootstrap 35.Sh DESCRIPTION 36The main purpose of this program is to load the system kernel. 37.Pp 38As described in 39.Xr boot_alpha 8 , 40this program is loaded by the SRM firmware 41and provides a convenient way to load the kernel. 42This program acts as an enhanced boot monitor for alpha systems, providing 43a common interface for the kernel to start from. 44.Pp 45Basic operations include: 46.Pp 47.Bl -bullet -compact 48.It 49Loading kernels from hard disk. 50.It 51Loading kernels compressed by 52.Xr gzip 1 . 53.It 54Providing an interactive command line. 55.El 56.Pp 57The sequence of its operation is as follows: initialization, 58parsing the configuration file, then an interactive command line. 59While at the command line you have 5 seconds to type any commands, if needed. 60If time expires, the kernel will be loaded according to 61the current variable settings (see the 62.Ic set 63command). 64If the kernel load fails, a second attempt is made with the timeout increased 65by one second. 66The sequence of 67.Nm 68operations is as follows: 69.Bl -enum 70.It 71If the file 72.Pa /etc/boot.conf 73exists on the filesystem in slice 74.Sq a 75on the disk 76.Nm 77was loaded from, open and parse it. 78Lines beginning with the 79.Sq # 80character, 81as well as whitespace at the beginning of lines, 82are ignored. 83The file may contain any commands 84.Nm 85accepts at the interactive prompt. 86Though default settings usually suffice, they can be changed here. 87.It 88The header line 89.Pp 90.Dl >> OpenBSD/alpha BOOT [x.xx] 91.Pp 92is displayed to the active console, where 93.Ar x.xx 94is the version number of the 95.Nm 96program, followed by the 97.Pp 98.Dl boot> 99.Pp 100prompt, which means you are in interactive mode and may enter commands. 101If you do not, 102.Nm 103will proceed to load the kernel with the current parameters after the 104timeout period has expired. 105.El 106.Pp 107By default, 108.Nm 109attempts to load the kernel executable specified in the SRM environment 110variable 111.Em boot_file , 112defaulting to 113.Pa /bsd 114if not set. 115If it fails to find the kernel and no alternative kernel image has 116been specified, the system will be unable to boot. 117.Sh COMMANDS 118The following commands are accepted at the 119.Nm 120prompt: 121.Bl -tag -width shorten 122.It Ic boot Oo Ns Ar image Oc Op Fl cdns 123Boots the specified kernel image with any options given. 124If 125.Ar image 126is omitted, values from the 127.Nm 128variables will be used. 129.Bl -tag -width _a_ 130.\" XXX Consider documenting -a as silently doing nothing, accepted for 131.\" XXX compatibility purpose (since multiuser boot is the default). 132.It Fl c 133Causes the kernel to go into 134.Xr boot_config 8 135before performing 136.Xr autoconf 4 137procedures. 138.It Fl d 139Causes the kernel to drop into 140.Xr ddb 4 141at the earliest convenient point. 142.It Fl n 143Causes the kernel to ask for the 144.Nm root 145device to use. 146.It Fl s 147Causes the kernel to boot single-user. 148.El 149.It Ic echo Op Ar args 150Displays 151.Ar args 152on the console device. 153.It Ic help 154Prints a list of available commands. 155.It Ic hexdump Ar addr size 156Show 157.Ar size 158bytes of memory at address 159.Ar addr . 160.It Ic ls Op Ar directory 161Prints contents of the specified 162.Ar directory 163in long format including: attributes and file type, owner, group, 164size, filename. 165.It Ic reboot 166Reboots the machine by initiating a warm boot procedure. 167.It Ic set Op Ar varname Op Ar value 168If invoked without arguments, prints a list of variables and their values. 169If only 170.Ar varname 171is specified, displays contents of that variable. 172If 173.Ar varname 174and 175.Ar value 176are both specified, sets that variable to the given value. 177Variables include: 178.Pp 179.Bl -tag -compact -width boothow 180.It Ic debug 181Debug flag if 182.Nm 183was compiled with DEBUG defined. 184.It Ic image 185File name containing the kernel image. 186.It Ic timeout 187Number of seconds boot will wait for human intervention before 188booting the default kernel image. 189.\" .It Ic time 190.\" Displays system time and date. 191.El 192.El 193.Sh FILES 194.Bl -tag -width /etc/boot.conf -compact 195.It Pa /usr/mdec/boot 196system bootstrap 197.It Pa /etc/boot.conf 198system bootstrap's startup file 199.It Pa /bsd 200kernel image 201.It Pa /bsd.rd 202kernel image for installation/recovery 203.El 204.Sh EXAMPLES 205Boot the default kernel: 206.Pp 207.Dl boot> boot 208.Pp 209Remove the 5 second pause at boot-time permanently, causing 210.Nm 211to load the kernel immediately without prompting: 212.Pp 213.Dl # echo \&"boot\&" > /etc/boot.conf 214.Pp 215Boot the kernel named 216.Pa /obsd 217in 218.Dq User Kernel Configuration 219mode (see 220.Xr boot_config 8 ) . 221This mechanism allows for the explicit enabling and disabling of devices 222during the current boot sequence, as well as the modification 223of device parameters. 224Once booted, such changes can be made permanent by using 225.Xr config 8 Ns 's 226.Fl e 227option. 228.Pp 229.Dl boot> boot /obsd -c 230.Sh SEE ALSO 231.Xr gzip 1 , 232.Xr autoconf 4 , 233.Xr ddb 4 , 234.Xr boot_alpha 8 , 235.Xr boot_config 8 , 236.Xr fdisk 8 , 237.Xr reboot 8 238.Sh HISTORY 239This program was written by Michael Shalayeff for 240.Ox 2.1 241on the i386 platform, and was later ported to the alpha platform. 242