1.\" $OpenBSD: boot.8,v 1.3 2024/11/05 09:42:49 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 luna88k 30.Os 31.Sh NAME 32.Nm boot , 33.Nm boot.conf 34.Nd luna88k-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_luna88k 8 , 40this program is loaded by the luna88k ROM monitor 41and provides a convenient way to load the kernel. 42This program acts as an enhanced boot monitor for luna88k 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 the network, or any SCSI device. 50.\" not yet... 51.\" .It 52.\" Loading kernels compressed by 53.\" .Xr gzip 1 . 54.It 55Providing an interactive command line. 56.El 57.Pp 58The sequence of its operation is as follows: initialization, 59parsing the configuration file, then an interactive command line. 60While at the command line you have 5 seconds to type any commands, if needed. 61If time expires, the kernel will be loaded according to 62the current variable settings (see the 63.Ic set 64command). 65If the kernel load fails, a second attempt is made with the timeout increased 66by one second. 67The sequence of 68.Nm 69operations is as follows: 70.Bl -enum 71.It 72If the file 73.Pa /etc/boot.conf 74exists on the filesystem 75.Nm 76was loaded from, open and parse it. 77Lines beginning with the 78.Sq # 79character, 80as well as whitespace at the beginning of lines, 81are ignored. 82The file may contain any commands 83.Nm 84accepts at the interactive prompt. 85Though default settings usually suffice, they can be changed here. 86.It 87The header line 88.Pp 89.Dl >> OpenBSD/luna88k BOOT [x.xx] 90.Pp 91is displayed to the active console, where 92.Ar x.xx 93is the version number of the 94.Nm 95program, followed by the 96.Pp 97.Dl boot> 98.Pp 99prompt, which means you are in interactive mode and may enter commands. 100If you do not, 101.Nm 102will proceed to load the kernel with the current parameters after the 103timeout period has expired. 104.El 105.Pp 106By default, 107.Nm 108attempts to load the kernel executable 109.Pa /bsd . 110If it fails to find the kernel and no alternative kernel image has 111been specified, the system will be unable to boot. 112.Sh COMMANDS 113The following commands are accepted at the 114.Nm 115prompt: 116.Bl -tag -width shorten 117.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds 118Boots the specified kernel image 119with any options given. 120If 121.Ar device 122or 123.Ar image 124are omitted, values from 125.Nm 126variables will be used. 127.Pp 128Available devices are: 129.Bl -tag -width tenletters 130.It sd(d,l,p) 131SCSI device number 132.Ar d , 133logical unit number 134.Ar l , 135and partition 136.Ar p . 137The last two arguments can be omitted, 138in which case they will have a default value of zero. 139The encoding of the device number will match the encoding used by the ROM: 140devices numbered 0 to 6 on the first SCSI controller will use numbers 6 to 0, 141and devices numbered 0 to 6 on the second SCSI controller (on Luna88k-2 systems 142only) will use numbers 16 to 10. 143.It le() 144Onboard Ethernet. 145.El 146.Bl -tag -width _a_ 147.It Fl a 148Causes the kernel to ask for the 149.Nm root 150device to use. 151.It Fl c 152Causes the kernel to go into 153.Xr boot_config 8 154before performing 155.Xr autoconf 4 156procedures. 157.It Fl d 158Causes the kernel to drop into 159.Xr ddb 4 160at the earliest convenient point. 161.It Fl s 162Causes the kernel to boot single-user. 163.El 164.It Ic echo Op Ar args 165Displays 166.Ar args 167on the console device. 168.It Ic help 169Prints a list of available commands. 170.It Ic hexdump Ar addr size 171Show 172.Ar size 173bytes of memory at address 174.Ar addr . 175.It Ic ls Op Ar directory 176Prints contents of the specified 177.Ar directory 178in long format including: attributes and file type, owner, group, 179size, filename. 180.It Ic reboot 181Reboots the machine by initiating a warm boot procedure. 182.It Ic set Op Ar varname Op Ar value 183If invoked without arguments, prints a list of variables and their values. 184If only 185.Ar varname 186is specified, displays contents of that variable. 187If 188.Ar varname 189and 190.Ar value 191are both specified, sets that variable to the given value. 192Variables include: 193.Pp 194.Bl -tag -compact -width db_console 195.It Ic debug 196Debug flag if 197.Nm 198was compiled with DEBUG defined. 199.It Ic device 200Boot device name (e.g., 201.Li sd(6,0) ) . 202.It Ic howto 203Options to pass to the loaded kernel. 204.It Ic image 205File name containing the kernel image. 206.It Ic timeout 207Number of seconds boot will wait for human intervention before 208booting the default kernel image. 209.El 210.\" Intentionally undocumented at the moment 211.\" .It Ic time 212.\" Displays system time and date. 213.El 214.Sh FILES 215.Bl -tag -width /usr/mdec/boot -compact 216.It Pa /usr/mdec/boot 217system bootstrap 218.It Pa /etc/boot.conf 219system bootstrap's startup file 220.It Pa /bsd 221kernel image 222.It Pa /bsd.sp 223kernel image for single processor machines 224.It Pa /bsd.mp 225kernel image for multiprocessor machines 226.It Pa /bsd.rd 227kernel image for installation/recovery 228.El 229.Sh EXAMPLES 230Boot the default kernel: 231.Pp 232.Dl boot> boot 233.Pp 234Remove the 5 second pause at boot-time permanently, causing 235.Nm 236to load the kernel immediately without prompting: 237.Pp 238.Dl # echo \&"boot\&" > /etc/boot.conf 239.Pp 240Boot the kernel named 241.Pa /bsd 242from the SCSI disk with ID 2 in 243.Dq User Kernel Configuration 244mode (see 245.Xr boot_config 8 ) . 246This mechanism allows for the explicit enabling and disabling of devices 247during the current boot sequence, as well as the modification 248of device parameters. 249Once booted, such changes can be made permanent by using 250.Xr config 8 Ns 's 251.Fl e 252option. 253.Pp 254.Dl boot> boot sd(4):/bsd -c 255.Sh SEE ALSO 256.\" .Xr gzip 1 , 257.Xr autoconf 4 , 258.Xr ddb 4 , 259.Xr boot_config 8 , 260.Xr boot_luna88k 8 , 261.Xr reboot 8 262.Sh HISTORY 263This program was written by Michael Shalayeff for 264.Ox 2.1 265on the i386 platform, and was later ported to the luna88k platform. 266