1 .\" $NetBSD: boot.8,v 1.6 2008/11/06 19:40:03 wiz 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
40 .Nd system bootstrapping procedures
43 Networks' MIPS-based Microservers
51 can use any of the following boot procedures:
57 from disk using the standard
85 boot loader which can be loaded by the standard Cobalt Firmware
88 .Ss Power fail and crash recovery
89 Normally, the system will reboot itself at power-up or after crashes.
90 An automatic consistency check of the file systems will be performed,
91 and unless this fails, the system will resume multi-user operations.
92 .Ss Cobalt Boot Sequence
93 The first program to take a control after reboot or at power-on is the
98 can load a compressed kernel from disk, subject to a few limitations.
101 expects the disk to contain DOS-style partition information with
102 the first partition being a boot one which is special in that it
103 should reside close to the beginning of the disk and must contain
108 directory which is treated specially by the
110 The default sequence is pretty straightforward, the
112 finds the boot partition, mounts the Ext2 file system from it and
113 tries to load a compressed kernel image from the
116 The name of the kernel image differs from machine to machine and
117 this is the reason for having multiple copies of
119 kernel installed under different names.
120 The following kernel image names are known to be in use by certain
123 .Bd -unfilled -offset indent
126 .Pa /boot/vmlinux-nfsroot.gz
127 .Pa /boot/vmlinux_RAQ.gz
128 .Pa /boot/vmlinux_raq-2800.gz
133 is the directory on the boot partition.
137 console provides the means to alter the default boot sequence and/or
138 to specify boot parameters.
143 printed its greeting brings the
145 console prompt and pressing
147 at the prompt prints a help screen with all commands supported by
152 command can be used to boot a kernel image:
153 .Bd -unfilled -offset indent
154 Cobalt: bfd /boot/\*[Lt]kernel image\*[Gt] [options]
159 are the kernel options.
160 .Ss Bootstrap from disk using the standard Firmware sequence
163 enters the standard boot sequence after reboot or at power-on when
164 no front-panel buttons are pressed and the
166 console is not used to change the boot procedure.
169 checks the hardware, prints the banner and performs the standard
172 There are a few culprits tightly connected to this boot method.
173 First of all, the kernel must be compressed.
176 enforces a hard restriction on the kernel size
178 it cannot exceed approximately 900,000/2,500,000 bytes
179 compressed/uncompressed
181 resulting in a lock-up should this requirement not be fulfilled.
184 another pitfall is that the uncompressed kernel should be copied to
185 the root directory to make certain system binaries
189 work, and the kernel images in the
191 directory should always be in sync with the ones installed in the
193 .Ss Bootstrap from disk using the NetBSD boot loader
196 boot loader is an attempt to break through the limitations enforced
200 The main idea is to make the
204 boot loader and let the latter take care of loading the kernel.
205 To achieve this goal, multiple copies of the boot loader are
208 directory on the boot partition, one copy per each kernel image
215 kernel is located in the root directory
220 like it is on other platforms.
221 Once running, the boot loader prints a banner to the serial console
222 similar to the following:
223 .Bd -unfilled -offset indent
224 \*[Gt]\*[Gt] NetBSD/cobalt 5.0 Bootloader, Revision 0.9 [@0x80f00000]
225 \*[Gt]\*[Gt] (user@buildhost, builddate)
226 \*[Gt]\*[Gt] Model: Cobalt Qube 2
227 \*[Gt]\*[Gt] Memory: 32768 k
228 \*[Gt]\*[Gt] PROM boot string: root=/dev/hda1 ro
231 3763776+312244 [216944+209676]=0x44b97c
232 Starting at 0x80001000
235 The boot loader also prints a banner to the LCD panels as the following:
236 .Bd -unfilled -offset indent
243 .Ss Boot loader Options
244 It is possible to specify some options and boot devices on the boot loader
247 .Xo No boot [wd0a:netbsd]:
255 will be set to the disk that the boot loader was loaded from.
256 To boot from an alternate disk or partition, the full name of the device should
257 be given at the prompt.
263 is the device from which to boot,
265 is the unit number, and
267 is the partition letter of the NetBSD
269 in the NetBSD partition of the MBR partitions.
272 boot loader recognizes FFS (both UFS1 and UFS2) and Linux Ext2fs.
274 The following list of supported devices may vary from installation to
279 IDE hard disks recognized by the
287 if the boot loader fails to successfully
288 open that image, it then tries
290 (expected to be a kernel image compressed by
302 .Pa netbsd.cobalt.gz ,
306 Alternate system images can be loaded by just specifying the name
307 of the image, so it is always a good idea to have a copy of working kernel
310 root partition before trying a new kernel.
315 Prompt for the root file system device, the system crash dump
316 device, and the path to
319 Bring the system up into the device configuration manager.
320 From here the device locators can be tuned to the hardware; see
323 Bring the system up in debug mode.
324 Here it waits for a kernel debugger connect; see
327 Boot the system in quiet mode.
329 Bring the system up in single-user mode.
331 Boot the system in verbose mode.
334 As the older version of the boot loader, it is also possible to specify
335 options to the boot loader by breaking into the
340 .Bd -unfilled -offset indent
341 Cobalt: bfd /boot/boot.gz [options]
344 The boot loader allows the following options:
345 .Bl -tag -width 04n -offset 04n
346 .It Ic nbsd= Oo Va device : Ns Oc Oo Va filename Oc Oo Fl acdqsv Oc
348 The device, filename and options on the bfd prompt are same with the boot
352 It is also a good idea to have a small rescue kernel in the
354 directory in the Ext2 partition for the Firmware boot.
355 In an emergency case, this will allow you to use the
358 command to boot the rescue image:
359 .Bd -unfilled -offset indent
360 Cobalt: bfd /boot/netbsd.gz
362 .Ss Network bootstrap using the standard Firmware sequence
366 allows to boot a kernel over the network, with all the limitations
369 loader described above.
370 The simplest method is to break into the
374 command to specify where to boot from:
375 .Bd -unfilled -offset indent
376 Cobalt: bfd /netbsd.gz nfsroot=/home/raq/root
381 is picky about syntax and in general, so if things fail mysteriously,
382 try to conform to the conventions described above.
383 For netbooting, you need to NFS-export the directory given to
387 needs to be executable and in that directory.
388 You will also need to setup
390 Once the kernel is loaded with the command line values, the data
391 given via DHCP is used to mount the root file system.
392 Here is a known working DHCP entry:
393 .Bd -unfilled -offset indent
395 hardware ethernet 0:10:e0:0:52:62; # raq MAC
396 fixed-address 10.0.0.15; # raq address
397 filename "/netbsd.gz"; # kernel name in root-path
398 option root-path "/home/raq/root"; # absolute dir on NFS server
399 server-name="10.0.0.3"; # IP of NFS server
403 Another option is to hold down the left and right cursor buttons
404 during power-on which executes the command
405 .Bd -unfilled -offset indent
406 bfd /boot/vmlinux.gz root=/dev/nfs nfsroot=/nfsroot,
409 resulting in a netboot.
410 On RaQ 1's, the default kernel name is
412 and on RaQ 2's, it is
413 .Pa vmlinux_raq-2800.gz .
414 .Ss Network bootstrap using the NetBSD boot loader
415 The idea here is the same with the bootstrap from disk using the NetBSD
417 Make the firmware load the NetBSD boot loader via network and
418 let the latter take care of loading the kernel even via network.
419 A simple method to load the NetBSD boot loader is to use the
421 command as well as booting the NetBSD kernel via network as described above:
422 .Bd -unfilled -offset indent
423 Cobalt: bfd /boot/boot.gz nfsroot=/home/raq/root
426 Note the boot loader binary needs to be
427 .Xr gzip 1 Ns -compressed .
428 Once the boot loader is successfully loaded it prints a banner as well as
430 .Bd -unfilled -offset indent
431 \*[Gt]\*[Gt] NetBSD/cobalt 5.0 Bootloader, Revision 0.9 [@0x80f00000]
432 \*[Gt]\*[Gt] (user@buildhost, builddate)
433 \*[Gt]\*[Gt] Model: Cobalt Qube 2
434 \*[Gt]\*[Gt] Memory: 32768 k
435 \*[Gt]\*[Gt] PROM boot string: root=/dev/nfs nfsroot=/nfsroot nfsaddrs=bootp
438 3763776+312244 [216944+209676]=0x44b97c
439 Starting at 0x80001000
442 The boot loader load the NetBSD kernel via NFS which should be specified
443 by the DHCP configuration on the server.
444 Note the nfsroot option specified on the
446 prompt will be ignored by the
448 boot loader so it's recommended to use the same directory on the
450 prompt and in the DHCP configuration.
452 .Bl -tag -width /usr/mdec/bootxx_fstype -compact
454 boot program code loaded by the
457 .It Pa /boot/netbsd.gz
458 .Xr gzip 1 Ns -compressed
463 .Xr gzip 1 Ns -compressed
465 .It Pa /usr/mdec/boot
466 master copy of the boot program (to be compressed and copied to /boot/boot.gz)
479 .Lk http://www.NetBSD.org/docs/network/netboot/