1.\" $OpenBSD: boot.8,v 1.5 2015/01/24 20:47:19 naddy 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: January 24 2015 $ 29.Dt BOOT 8 landisk 30.Os 31.Sh NAME 32.Nm boot , 33.Nm boot.conf 34.Nd 35landisk-specific second-stage bootstrap 36.Sh DESCRIPTION 37The main purpose of this program is to load the system kernel from the 38root file system of the machine. 39.Pp 40As described in 41.Xr boot_landisk 8 , 42this program is loaded by the 43.Xr xxboot 8 44primary bootstrap loader and provides a convenient way to load the kernel. 45This program acts as an enhanced boot monitor for landisk systems, providing 46a common interface for the kernel to start from. 47.Pp 48Basic operations include: 49.Pp 50.Bl -bullet -compact 51.It 52Loading kernels from any device supported by your system firmware. 53.It 54Loading kernels compressed by 55.Xr gzip 1 . 56.It 57Providing an interactive command line. 58.El 59.Pp 60The sequence of its operation is as follows: initialization, 61parsing the configuration file, then an interactive command line. 62While at the command line you have 5 seconds to type any commands, if needed. 63If time expires, the kernel will be loaded according to 64the current variable settings (see the 65.Nm set 66command). 67Each time a kernel load fails, the timeout is increased by one second. 68The sequence of 69.Nm 70operations is as follows: 71.Bl -enum 72.It 73If the file 74.Pa /etc/boot.conf 75exists on the filesystem 76.Nm 77was loaded from, open and parse it. 78This file may contain any commands 79.Nm 80accepts at the interactive prompt. 81Though default settings usually suffice, they can be changed here. 82.\" XXX CHECK_SKIP_CONF is not defined... 83.\" .Pa boot.conf 84.\" processing can be skipped by holding down either Control key as 85.\" .Nm 86.\" starts. 87.It 88The header line 89.Pp 90.Dl >> OpenBSD/landisk 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 110.Pa /bsd . 111If it fails to find the kernel and no alternative kernel image has 112been specified, the system will be unable to boot. 113.Sh COMMANDS 114The following commands are accepted at the 115.Nm 116prompt: 117.Bl -tag -width shorten 118.It boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds 119Boots the specified kernel image 120with any options given. 121If 122.Ar device 123or 124.Ar image 125are omitted, values from 126.Nm 127variables will be used. 128.Pp 129The only bootable device, at the moment, is the internal IDE device (either a 130compactflash media or an ATA disk drive), and is named 131.Sq cf . 132Therefore, to boot kernel 133.Pa /bsd 134from 135.\" XXX no support for partition different from `a' yet... 136.\" slice 137.\" .Sq a 138.\" on 139the internal drive, specify 140.Dq boot cf:/bsd . 141.Bl -tag -width _a_ 142.It Fl a 143Causes the kernel to ask for the 144.Nm root 145device to use. 146.It Fl c 147Causes the kernel to go into 148.Xr boot_config 8 149before performing 150.Xr autoconf 4 151procedures. 152.It Fl d 153Causes the kernel to drop into 154.Xr ddb 4 155at the earliest convenient point. 156.It Fl s 157Causes the kernel to boot single-user. 158.El 159.It echo Op Ar args 160Displays 161.Ar args 162on the console device. 163.It help 164Prints a list of available commands. 165.It ls Op Ar directory 166Prints contents of the specified 167.Ar directory 168in long format including: attributes and file type, owner, group, 169size, filename. 170.It reboot 171Reboots the machine by initiating a warm boot procedure. 172.It set Op Ar varname Op Ar value 173If invoked without arguments, prints a list of variables and their values. 174If only 175.Ar varname 176is specified, displays contents of that variable. 177If 178.Ar varname 179and 180.Ar value 181are both specified, sets that variable to the given value. 182Variables include: 183.Pp 184.Bl -tag -compact -width boothow 185.It Nm addr 186Address at which to load the kernel. 187.It Nm debug 188Debug flag if 189.Nm 190was compiled with DEBUG defined. 191.\" XXX Useless until partitions are supported. 192.\" .It Nm device 193.\" Boot device name (e.g., 194.\" .Li cf0a , 195.\" .Li cf0d ) . 196.It Nm howto 197Options to pass to the loaded kernel. 198.It Nm image 199File name containing the kernel image. 200.It Nm timeout 201Number of seconds boot will wait for human intervention before 202booting the default kernel image. 203.\" .It Nm tty 204.\" Active console device name (e.g., 205.\" .Li scif0 ) . 206.El 207.\" XXX although implemented, better leave it undocumented for now -- miod 208.\" .It stty Op Ar device Op Ar speed 209.\" Displays or sets the 210.\" .Ar speed 211.\" for a console 212.\" .Ar device . 213.\" If changing the baudrate for the currently active console, 214.\" .Nm 215.\" offers you five seconds of grace time before committing the change 216.\" to allow you to change your terminal's speed to match. 217.\" If changing speed 218.\" .Em not 219.\" for the active console, the baudrate is set for the 220.\" .Em next 221.\" time you switch to a serial console. 222.\" .Pp 223.\" The default baudrate is 9600bps. 224.It time 225Displays system time and date. 226.El 227.Sh FILES 228.Bl -tag -width /usr/mdec/xxboot -compact 229.It Pa /boot 230system bootstrap 231.It Pa /etc/boot.conf 232system bootstrap's startup file 233.It Pa /bsd 234kernel image 235.It Pa /bsd.rd 236kernel image for installation/recovery 237.It Pa /usr/mdec/xxboot 238first stage bootstrap 239.El 240.Sh EXAMPLES 241Boot the default kernel: 242.Pp 243.Dl boot> boot 244.Pp 245Remove the 5 second pause at boot-time permanently, causing 246.Nm 247to load the kernel immediately without prompting: 248.Pp 249.Dl # echo \&"boot\&" > /etc/boot.conf 250.Pp 251Boot the kernel named 252.Pa /bsd.rd 253in 254.Dq User Kernel Configuration 255mode (see 256.Xr boot_config 8 ) . 257This mechanism allows for the explicit enabling and disabling of devices 258during the current boot sequence, as well as the modification 259of device parameters. 260Once booted, such changes can be made permanent by using 261.Xr config 8 Ns 's 262.Fl e 263option. 264.Pp 265.Dl boot> boot cf:/bsd.rd -c 266.Sh SEE ALSO 267.Xr gzip 1 , 268.Xr autoconf 4 , 269.Xr ddb 4 , 270.Xr boot_config 8 , 271.Xr boot_landisk 8 , 272.Xr fdisk 8 , 273.Xr reboot 8 , 274.Xr xxboot 8 275.Sh HISTORY 276This program was written by Michael Shalayeff for 277.Ox 4.1 . 278