1 .\" $NetBSD: boot.8,v 1.58 2011/05/31 03:43:47 uebayasi 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 dev Op Va device
350 Set the default drive and partition for subsequent filesystem
352 Without an argument, print the current setting.
354 is of the form specified in
357 Print an overview about commands and arguments.
358 .It Ic load Va module Op Ar arguments
359 Load the specified kernel
361 and pass it the specified
363 If the module name is not an absolute path,
377 command include loading a memory disk image before booting a kernel,
380 DOM0 kernel before booting the
389 options specified above, the DOM0 kernel accepts
391 being separated with spaces
394 .It Ic bootdev Ns = Ns Ar dev Po or Ic root Ns = Ns Ar dev Pc
395 Override the default boot device.
405 for cases where the root file system has to be loaded
406 from network (see the
410 .It Ic console Ns = Ns Ar dev
411 Console used by DOM0 kernel during boot.
413 accepts the same values as the ones given for the
417 .Sx Console Selection Policy
421 .Ar my_ip Ns : Ns Ar serv_ip Ns : Ns Ar gw_ip Ns : Ns
422 .Ar mask Ns : Ns Ar host Ns : Ns Ar iface
424 Specify various parameters for a network boot (IPs are in
426 each one separated by a colon:
427 .Bl -tag -width xxxxxxx
431 address of the NFS server
433 address of the gateway
445 .It Ic nfsroot Ns = Ns Ar address Ns : Ns Ar rootpath
446 Boot the system with root on NFS.
448 is the address of the NFS server, and
450 is the remote mount point for the root file system.
451 .It Ic pciback.hide Ns = Ns Ar pcidevs
452 Pass a list of PCI IDs for use with the PCI backend driver,
455 is formed of multiple IDs (in bus:device.function notation),
456 each ID being surrounded with brackets.
457 PCI domain IDs are currently ignored.
461 .It Ic load_mods Va mods_path_pattern
462 Load modules specified by pattern like /some_path/mod*.
464 Print a directory listing of
466 containing inode number, filename, and file type.
468 can contain a device specification.
469 .It Ic modules Bro Ar on | off | enabled | disabled Brc
472 will enable module loading for
478 will turn off the feature.
479 .It Ic multiboot Va kernel Op Ar arguments
484 protocol instead of the native
489 is specified in the same way as with the
493 The multiboot protocol may be used in the following cases:
494 .Bl -tag -width indent
495 .It Nx Ns / Ns Xen No kernels
498 DOM0 kernel must be loaded as a module using the
502 hypervisor must be booted using the
505 Options for the DOM0 kernel (such as
507 for single user mode) must be passed as options to the
510 Options for the hypervisor (such as
512 to reserve 256 MB of memory for DOM0)
513 must be passed as options to the
518 for examples on how to boot
520 .It Nx No multiboot kernels
523 kernel that was built with
524 .Cd options MULTIBOOT
527 may be booted with either the
531 command, passing the same
534 .It Non- Ns Nx No kernels
537 operating system that expects to be booted using the
538 multiboot protocol (such as by the GNU
541 may be booted using the
544 See the foreign operating system's documentation for the available
549 .It Ic userconf Va command
555 These commands are processed before the interactive
557 shell is executed, if requested .
558 .It Ic vesa Bro Va modenum | Ar on | off | enabled | disabled | list Brc
559 Initialise the video card to the specified resolution and bit depth.
562 should be in the form of
563 .Ar 0x100 , 800x600 , 800x600x32 .
566 put the display into the default mode, and
568 returns the display into standard vga mode.
571 lists all supported modes.
574 In an emergency, the bootstrap methods described in the
576 installation notes for the i386 architecture
577 can be used to boot from floppy or other media,
580 .Bl -tag -width /usr/mdec/bootxx_fstype -compact
582 boot program code loaded by the primary bootstrap
584 optional configuration file
588 gzip-compressed system code
589 .It Pa /usr/mdec/boot
590 master copy of the boot program (copy to /boot)
591 .It Pa /usr/mdec/bootxx_fstype
592 primary bootstrap for filesystem type fstype, copied to the start of
615 The kernel file name must be specified before, not after, the boot options.
618 specified after the boot options, e.g.:
620 .Bd -unfilled -offset indent -compact
621 .Cm boot -d netbsd.test
624 is ignored, and the default kernel is booted.
626 Hard disks are always accessed by
631 device numbers which might differ from numbering in the
633 kernel or physical parameters
639 There isn't any distinction between
643 devices at the bootloader level.
644 This is less a bug of the bootloader code than
645 a shortcoming of the PC architecture.
646 The default disk device's name printed in the starting message
651 disklabel (if it is a hard disk).