1.\" $OpenBSD: boot.8,v 1.6 2023/02/23 19:48:22 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: February 23 2023 $ 29.Dt BOOT 8 macppc 30.Os 31.Sh NAME 32.Nm boot , 33.Nm boot.conf 34.Nd macppc-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_macppc 8 , 40this program is loaded by the 41firmware 42and provides a convenient way to load the kernel. 43This program acts as an enhanced boot monitor for macppc systems, providing 44a common interface for the kernel to start from. 45.Pp 46Basic operations include: 47.Pp 48.Bl -bullet -compact 49.It 50Loading kernels from hard disk. 51.It 52Loading 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). 65Each time a kernel load fails, the timeout is increased by one second. 66The sequence of 67.Nm 68operations is as follows: 69.Bl -enum 70.It 71If the file 72.Pa /etc/boot.conf 73.\" XXX BEWARE! wd0 only, so text change... 74.\" exists on the filesystem 75.\" .Nm 76.\" was loaded from, open and parse it. 77exists on the filesystem in slice 78.Sq a 79on the first disk drive 80.Pq wd0 , 81open and parse it. 82Lines beginning with the 83.Sq # 84character, 85as well as whitespace at the beginning of lines, 86are ignored. 87The file may contain any commands 88.Nm 89accepts at the interactive prompt. 90Though default settings usually suffice, they can be changed here. 91.\" XXX CHECK_SKIP_CONF is not defined... 92.\" .Pp 93.\" .Pa boot.conf 94.\" processing can be skipped by holding down either Control key as 95.\" .Nm 96.\" starts. 97.It 98The header line 99.Pp 100.Dl >> OpenBSD/macppc BOOT [x.xx] 101.Pp 102is displayed to the active console, where 103.Ar x.xx 104is the version number of the 105.Nm 106program, followed by the 107.Pp 108.Dl boot> 109.Pp 110prompt, which means you are in interactive mode and may enter commands. 111If you do not, 112.Nm 113will proceed to load the kernel with the current parameters after the 114timeout period has expired. 115.El 116.Pp 117By default, 118.Nm 119attempts to load the kernel executable 120.Pa /bsd . 121If it fails to find the kernel and no alternative kernel image has 122been specified, the system will be unable to boot. 123.Sh COMMANDS 124The following commands are accepted at the 125.Nm 126prompt: 127.Bl -tag -width shorten 128.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds 129Boots the specified kernel image with any options given. 130If 131.Ar device 132or 133.Ar image 134are omitted, values from the 135.Nm 136variables will be used. 137.Pp 138The only bootable devices, at the moment, are IDE devices connected to 139the internal controller; 140they are detected as 141.Sq hd 142devices. 143Therefore, to boot kernel 144.Pa /bsd 145on the first hard drive, 146specify 147.Dq boot hd:/bsd . 148.Bl -tag -width _a_ 149.It Fl a 150Causes the kernel to ask for the 151.Nm root 152device to use. 153.It Fl c 154Causes the kernel to go into 155.Xr boot_config 8 156before performing 157.Xr autoconf 4 158procedures. 159.It Fl d 160Causes the kernel to drop into 161.Xr ddb 4 162at the earliest convenient point. 163.It Fl s 164Causes the kernel to boot single-user. 165.El 166.It Ic echo Op Ar args 167Displays 168.Ar args 169on the console device. 170.It Ic help 171Prints a list of available commands. 172.It Ic hexdump Ar addr size 173Show 174.Ar size 175bytes of memory at address 176.Ar addr . 177.It Ic ls Op Ar directory 178Prints contents of the specified 179.Ar directory 180in long format including: attributes and file type, owner, group, 181size, filename. 182.It Ic reboot 183Reboots the machine by initiating a warm boot procedure. 184.It Ic set Op Ar varname Op Ar value 185If invoked without arguments, prints a list of variables and their values. 186If only 187.Ar varname 188is specified, displays contents of that variable. 189If 190.Ar varname 191and 192.Ar value 193are both specified, sets that variable to the given value. 194Variables include: 195.Pp 196.Bl -tag -compact -width boothow 197.It Ic debug 198Debug flag if 199.Nm 200was compiled with DEBUG defined. 201.It Ic device 202Boot device name (e.g., 203.Li ide , 204.Li ide0 , 205.Li hd , 206.Li hd1 ) . 207.It Ic howto 208Options to pass to the loaded kernel. 209.It Ic image 210File name containing the kernel image. 211.It Ic timeout 212Number of seconds boot will wait for human intervention before 213booting the default kernel image. 214.It Ic time 215Displays system time and date. 216.El 217.Sh FILES 218.Bl -tag -width /etc/boot.conf -compact 219.It Pa /usr/mdec/boot 220system bootstrap 221.It Pa /etc/boot.conf 222system bootstrap's startup file 223.It Pa /bsd 224kernel image 225.It Pa /bsd.rd 226kernel image for installation/recovery 227.El 228.Sh EXAMPLES 229Boot the default kernel: 230.Pp 231.Dl boot> boot 232.Pp 233Remove the 5 second pause at boot-time permanently, causing 234.Nm 235to load the kernel immediately without prompting: 236.Pp 237.Dl # echo \&"boot\&" > /etc/boot.conf 238.Pp 239Boot the kernel named 240.Pa /bsd 241from the second hard disk in 242.Dq User Kernel Configuration 243mode (see 244.Xr boot_config 8 ) . 245This mechanism allows for the explicit enabling and disabling of devices 246during the current boot sequence, as well as the modification 247of device parameters. 248Once booted, such changes can be made permanent by using 249.Xr config 8 Ns 's 250.Fl e 251option. 252.Pp 253.Dl boot> boot hd:/bsd -c 254.Sh SEE ALSO 255.Xr gzip 1 , 256.Xr autoconf 4 , 257.Xr ddb 4 , 258.Xr boot_config 8 , 259.Xr boot_macppc 8 , 260.Xr fdisk 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 macppc platform. 266