1 .\" $NetBSD: boot.8,v 1.51 2009/09/01 21:30:17 ahoka Exp $
3 .\" Copyright (c) 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" This code is derived from software written and contributed
7 .\" to Berkeley by William Jolitz.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
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
33 .\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94
41 system bootstrapping procedures
52 can use any of the following boot procedures, depending on what the hardware and
56 .Bl -tag -width "pxeboot(8)"
84 .Ss Power fail and crash recovery
85 Normally, the system will reboot itself at power-up or after crashes.
86 An automatic consistency check of the file systems will be performed,
87 and unless this fails, the system will resume multi-user operations.
91 clones attempt to boot the floppy disk drive A (otherwise known as drive
92 0) first, and failing that, attempt to boot the hard disk C (otherwise
93 known as hard disk controller 1, drive 0).
96 bootblocks are loaded and started either by the
98 or by a boot selector program (such as OS-BS, BOOTEASY, the OS/2 Boot Menu or
101 master boot record - see
104 Once running, a banner similar to the following will appear:
105 .Bd -unfilled -offset indent
106 \*[Gt]\*[Gt] NetBSD BIOS Boot, revision 3.0
107 \*[Gt]\*[Gt] (user@buildhost, builddate)
108 \*[Gt]\*[Gt] Memory: 637/15360 k
109 Press return to boot now, any other key for boot menu
110 booting hd0a:netbsd - starting in 5
113 After a countdown, the system image listed will be loaded.
114 In the example above, it will be
123 partition of the first hard disk known to the
128 or similar device - see the
133 Pressing a key within the time limit, or before the boot program starts, will
134 enter interactive mode.
135 When using a short or 0 timeout, it is often useful to interrupt the boot
136 by holding down a shift key, as some BIOSes and BIOS extensions will drain the
137 keystroke buffer at various points during POST.
141 will be used to configure the behaviour of the boot loader including
142 setting the timeout, choosing a console device, altering the banner
143 text and displaying a menu allowing boot commands to be easily chosen.
149 boot loader can boot a kernel using either the native
151 boot protocol, or the
153 protocol (which is compatible with some other operating systems).
156 boot protocol, options are passed from the boot loader
157 to the kernel via flag bits in the
161 In the multiboot protocol, options are passed from the boot loader
162 to the kernel as strings.
163 .Ss Diagnostic Output
164 If the first stage boot fails to load the boot, it will print a terse
165 message indicating the reason for the failure.
166 The possible error messages and their cause are listed in
169 If the first stage boot succeeds, the banner will be shown and the
170 error messages should be self-explanatory.
172 In interactive mode, the boot loader will present a prompt, allowing
173 input of these commands:
174 .\" NOTE: much of this text is duplicated in the MI boot.8.
176 .\" also duplicated in the i386-specific dosboot.8 and pxeboot.8;
177 .\" please try to keep all relevant files synchronized.
178 .Bl -tag -width 04n -offset 04n
179 .It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
182 will be set to the disk that the boot loader was
184 To boot from an alternate disk, the full name of the device should
185 be given at the prompt.
193 is the device from which to boot,
195 is the unit number, and
197 is the partition letter.
199 The following list of supported devices may vary from installation to
204 Hard disks as numbered by the BIOS.
205 This includes ST506, IDE, ESDI, RLL disks on a WD100[2367] or
206 lookalike controller(s), and SCSI disks
207 on SCSI controllers recognized by the BIOS.
209 Floppy drives as numbered by the BIOS.
216 if the boot loader fails to successfully
217 open that image, it then tries
219 (expected to be a kernel image compressed by gzip), followed by
225 Alternate system images can be loaded by just specifying the name of the image.
230 Sets the machine-dependent flag
236 this disables multiprocessor boot;
237 the kernel will boot in uniprocessor mode.
239 Sets the machine-dependent flag
247 Sets the machine-dependent flag
255 Sets the machine-dependent flag
267 This causes the kernel to prompt for the root file system device,
268 the system crash dump device, and the path to
275 This causes subsequent reboot attempts to halt instead of rebooting.
281 This causes the kernel to enter the
283 device configuration manager as soon as possible during the boot.
285 allows devices to be enabled or disabled, and allows device locators
286 (such as hardware addresses or bus numbers)
287 to be modified before the kernel attempts to attach the devices.
293 Requests the kernel to enter debug mode, in which it
294 waits for a connection from a kernel debugger; see
301 Informs the kernel that a mini-root file system is present in memory.
307 Boot the system in quiet mode.
313 Boot the system in single-user mode.
319 Boot the system in verbose mode.
325 Boot the system with debug messages enabled.
331 Boot the system in silent mode.
333 .It Ic consdev Va dev
334 Immediately switch the console to the specified device
336 and reprint the banner.
339 .\" .Bl -item -width com[0123]kbd -offset indent -compact
340 .Ar pc , com0 , com1 , com2 ,
341 .Ar com3 , com0kbd , com1kbd , com2kbd ,
346 .Sx Console Selection Policy
349 .It Ic vesa Va modenum | on | off | enabled | disabled | list
350 Initialise the video card to the specified resolution and bit depth.
353 should be in the form of
354 .Ar 0x100 , 800x600 , 800x600x32 .
357 put the display into the default mode, and
359 returns the display into standard vga mode.
362 lists all supported modes.
363 .It Ic dev Op Va device
364 Set the default drive and partition for subsequent filesystem
366 Without an argument, print the current setting.
368 is of the form specified in
371 Print an overview about commands and arguments.
372 .It Ic load Va module Op Va arguments
373 Load the specified kernel
375 and pass it the specified
377 If the module name is not an absolute path,
391 command include loading a memory disk image before booting a kernel,
392 or loading a Xen DOM0 kernel before booting the Xen hypervisor.
394 Print a directory listing of
396 containing inode number, filename, and file type.
398 can contain a device specification.
399 .It Ic multiboot Va kernel Op Va arguments
404 protocol instead of the native
409 is specified in the same way as with the
413 The multiboot protocol may be used in the following cases:
414 .Bl -tag -width indent
415 .It Nx Ns / Ns Xen No kernels
416 The Xen DOM0 kernel must be loaded as a module using the
418 command, and the Xen hypervisor must be booted using the
421 Options for the DOM0 kernel (such as
423 for single user mode) must be passed as options to the
426 Options for the hypervisor (such as
428 to reserve 256 MB of memory for DOM0)
429 must be passed as options to the
434 for examples of how to boot
436 .It Nx No multiboot kernels
439 kernel that was built with
440 .Cd options MULTIBOOT
443 may be booted with either the
447 command, passing the same arguments in either case.
448 .It Non- Ns Nx No kernels
451 operating system that expects to be booted using the
452 multiboot protocol (such as by the GNU
455 may be booted using the
458 See the foreign operating system's documentation for the available arguments.
464 In an emergency, the bootstrap methods described in the
466 installation notes for the i386 architecture
467 can be used to boot from floppy or other media,
470 .Bl -tag -width /usr/mdec/bootxx_fstype -compact
472 boot program code loaded by the primary bootstrap
474 optional configuration file
478 gzip-compressed system code
479 .It Pa /usr/mdec/boot
480 master copy of the boot program (copy to /boot)
481 .It Pa /usr/mdec/bootxx_fstype
482 primary bootstrap for filesystem type fstype, copied to the start of
504 The kernel file name must be specified before, not after, the boot options.
507 specified after the boot options, e.g.:
509 .Bd -unfilled -offset indent -compact
510 .Cm boot -d netbsd.test
513 is ignored, and the default kernel is booted.
515 Hard disks are always accessed by
520 device numbers which might differ from numbering in the
522 kernel or physical parameters
528 There isn't any distinction between
532 devices at the bootloader level.
533 This is less a bug of the bootloader code than
534 a shortcoming of the PC architecture.
535 The default disk device's name printed in the starting message
540 disklabel (if it is a hard disk).