1.\" $NetBSD: boot.8,v 1.12 2009/09/04 23:29:02 apb Exp $ 2.\" 3.\" Copyright (c) 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" This code is derived from software written and contributed 7.\" to Berkeley by William Jolitz. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94 34.\" 35.Dd September 4, 2009 36.Dt BOOT 8 37.Os 38.Sh NAME 39.Nm boot 40.Nd 41system bootstrapping procedures 42.Sh DESCRIPTION 43This document provides information on using common features in the 44.Nx 45boot loader. 46Additional information may be found in 47architecture-specific 48.Xr boot 8 49manual pages. 50.Pp 51In the native 52.Nx 53boot protocol, options are passed from the boot loader 54to the kernel via flag bits in the 55.Va boothowto 56variable (see 57.Xr boothowto 9 ) . 58.Ss Interactive mode 59In interactive mode, the boot loader will present a prompt, allowing 60input of these commands: 61.\" NOTE: much of this text is duplicated in architecture-specific 62.\" man pages (man8/man8.*/*boot*.8); 63.\" please try to keep all relevant files synchronized. 64.Bl -tag -width 04n -offset 04n 65.It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc 66The default 67.Va device 68will be set to the disk that the boot loader was 69loaded from. 70To boot from an alternate disk, the full name of the device should 71be given at the prompt. 72.Va device 73is of the form 74.Xo Va xd 75.Op Va N Ns Op Va x 76.Xc 77where 78.Va xd 79is the device from which to boot, 80.Va N 81is the unit number, and 82.Va x 83is the partition letter. 84.Pp 85The following list of supported devices may vary from installation to 86installation: 87.Pp 88.Bl -hang -compact 89.It hd 90Hard disks. 91.It fd 92Floppy drives. 93.El 94.Pp 95The default 96.Va filename 97is 98.Pa netbsd ; 99if the boot loader fails to successfully 100open that image, it then tries 101.Pa netbsd.gz 102(expected to be a kernel image compressed by gzip), followed by 103.Pa netbsd.old , 104.Pa netbsd.old.gz , 105.Pa onetbsd , 106and finally 107.Pa onetbsd.gz . 108Alternate system images can be loaded by just specifying the name of the image. 109.Pp 110Options are: 111.Bl -tag -width xxx 112.It Fl 1 113Sets the machine-dependent flag 114.Sy RB_MD1 115in 116.Va boothowto . 117.It Fl 2 118Sets the machine-dependent flag 119.Sy RB_MD2 120in 121.Va boothowto . 122.It Fl 3 123Sets the machine-dependent flag 124.Sy RB_MD3 125in 126.Va boothowto . 127.It Fl 4 128Sets the machine-dependent flag 129.Sy RB_MD4 130in 131.Va boothowto . 132.It Fl a 133Sets the 134.Sy RB_ASKNAME 135flag in 136.Va boothowto . 137This causes the kernel to prompt for the root file system device, 138the system crash dump device, and the path to 139.Xr init 8 . 140.It Fl b 141Sets the 142.Sy RB_HALT 143flag in 144.Va boothowto . 145This causes subsequent reboot attempts to halt instead of rebooting. 146.It Fl c 147Sets the 148.Sy RB_USERCONF 149flag in 150.Va boothowto . 151This causes the kernel to enter the 152.Xr userconf 4 153device configuration manager as soon as possible during the boot. 154.Xr userconf 4 155allows devices to be enabled or disabled, and allows device locators 156(such as hardware addresses or bus numbers) 157to be modified before the kernel attempts to attach the devices. 158.It Fl d 159Sets the 160.Sy RB_KDB 161flag in 162.Va boothowto . 163Requests the kernel to enter debug mode, in which it 164waits for a connection from a kernel debugger; see 165.Xr ddb 4 . 166.It Fl m 167Sets the 168.Sy RB_MINIROOT 169flag in 170.Va boothowto . 171Informs the kernel that a mini-root file system is present in memory. 172.It Fl q 173Sets the 174.Sy AB_QUIET 175flag in 176.Va boothowto . 177Boot the system in quiet mode. 178.It Fl s 179Sets the 180.Sy RB_SINGLE 181flag in 182.Va boothowto . 183Boot the system in single-user mode. 184.It Fl v 185Sets the 186.Sy AB_VERBOSE 187flag in 188.Va boothowto . 189Boot the system in verbose mode. 190.It Fl x 191Sets the 192.Sy AB_DEBUG 193flag in 194.Va boothowto . 195Boot the system with debug messages enabled. 196.It Fl z 197Sets the 198.Sy AB_SILENT 199flag in 200.Va boothowto . 201Boot the system in silent mode. 202.El 203.It Ic consdev Va dev 204Immediately switch the console to the specified device 205.Va dev 206and reprint the banner. 207.Va dev 208must be one of 209.\" .Bl -item -width com[0123]kbd -offset indent -compact 210.Ar pc , com0 , com1 , com2 , 211.Ar com3 , com0kbd , com1kbd , com2kbd , 212.Ar com3kbd , 213or 214.Ar auto . 215See 216.Sx Console Selection Policy 217in 218.Xr boot_console 8 . 219.It Ic dev Op Va device 220Set the default drive and partition for subsequent filesystem 221operations. 222Without an argument, print the current setting. 223.Va device 224is of the form specified in 225.Cm boot . 226.It Ic help 227Print an overview about commands and arguments. 228.\" .It Ic load Va module Op Va arguments 229.\" [i386 only] 230.It Ic ls Op Pa path 231Print a directory listing of 232.Pa path , 233containing inode number, filename, and file type. 234.Pa path 235can contain a device specification. 236.\" .It Ic multiboot Va kernel Op Va arguments 237.\" [i386 only] 238.It Ic quit 239Reboot the system. 240.El 241.Pp 242In an emergency, the bootstrap methods described in the 243.Nx 244installation notes for the specific architecture 245can be used. 246.Sh FILES 247.Bl -tag -width /usr/mdec/bootxx_fstype -compact 248.It Pa /boot 249boot program code loaded by the primary bootstrap 250.\" .It Pa /boot.cfg 251.\" optional configuration file 252.\" (used only on i386 and amd64 architectures) 253.It Pa /netbsd 254system code 255.It Pa /netbsd.gz 256gzip-compressed system code 257.It Pa /usr/mdec/boot 258master copy of the boot program (copy to /boot) 259.It Pa /usr/mdec/bootxx_fstype 260primary bootstrap for filesystem type fstype, copied to the start of 261the 262.Nx 263partition by 264.Xr installboot 8 . 265.El 266.Sh SEE ALSO 267Architecture-specific 268.Xr boot 8 269manual pages, 270.Xr ddb 4 , 271.Xr userconf 4 , 272.\" .Xr boot.cfg 5 , 273.Xr halt 8 , 274.Xr installboot 8 , 275.Xr reboot 8 , 276.Xr rescue 8 , 277.Xr shutdown 8 , 278.Xr boothowto 9 279.Sh BUGS 280The kernel file name must be specified before, not after, the boot options. 281Any 282.Ar filename 283specified after the boot options, e.g.: 284.Pp 285.Bd -unfilled -offset indent -compact 286.Cm boot -d netbsd.test 287.Ed 288.Pp 289is ignored, and the default kernel is booted. 290