1.\" $NetBSD: boot.8,v 1.11 2003/06/30 12:00:32 wiz Exp $ 2.\" 3.\" Copyright (c) 1980, 1991, 1993 4.\" The Regents of the University of California. 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.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)boot_i386.8 8.2 (Berkeley) 4/19/94 35.\" 36.Dd April 8, 2003 37.Dt BOOT 8 x68k 38.Os 39.Sh NAME 40.Nm boot 41.Nd system bootstrapping procedures 42.Sh DESCRIPTION 43.Ss Power fail and crash recovery 44Normally, the system will reboot itself at power-up or after crashes. 45An automatic consistency check of the file systems will be performed, 46and unless this fails, the system will resume multi-user operations. 47.Ss Cold starts 48The X68000/X68030 system boots from the device 49which is determined by the configuration of 50battery-backuped SRAM. 51By default, the boot ROM attempts to boot from 52floppy disk drives (from 0 to 3) first, 53and then attempts to boot from hard disk (SASI or SCSI). 54On the 55.Nx Ns Tn /x68k , 56booting from SCSI disks (sd??) 57and 2HD floppy disks (fd?a, fd?c) is currently supported. 58.Ss Bootstrapping from a floppy 59When the floppy disk is selected as the boot device, the initial 60program loader of the IOCS (firmware) reads the 61.Pa fdboot_ufs 62program at the top of the disk, and then the fdboot_ufs program loads the 63.Pa /boot 64program from the FFS or LFS file system. Normally, the 65.Pa /boot 66program then loads the 67.Nx 68kernel 69.Pa /netbsd 70from the same floppy. In addition, the 71.Pa /boot 72program has abilities to uncompress gzip'ed kernels, to read 73the kernel from other disks of other file systems etc (see below). 74.Pp 75For floppy disks, 76.Pa fdboot_ustar 77is also provided to read large 78kernels which do not fit one a single floppy. 79.Ss Bootstrapping from a SCSI hard disk 80When a SCSI hard disk is selected as the boot device, the initial 81program loader on the SCSI host adapter's ROM reads the 82operating system-independent IPL menu program at the top of the disk. 83The IPL menu program recognizes the partition table, and selects the partition 84to read the operating system kernel. During this phase, when the 85HELP key on the keyboard is pressed, the IPL menu program displays 86the partition menu of that disk to prompt the user to select the boot 87partition (although the 88.Nx 89implementation of the IPL menu, 90.Pa /usr/mdec/mboot , 91does not have this functionality). 92.Pp 93Next, the IPL menu reads the OS-dependent boot program from the 94top of the selected partition. For 95.Nx 96FFS/LFS file systems 97.Pa sdboot_ufs 98is used. The 99.Pa sdboot_ufs 100program then loads the 101.Pa /boot 102program from that partition. 103.Ss Normal Operation 104Once running, a banner similar to the following will appear: 105.Bd -literal -offset indent 106NetBSD Multi-boot, Revision 1.1 107(user@buildhost, builddate) 108Press return to boot now, any other key for boot menu 109booting sd0a:netbsd - starting in 5 110.Ed 111.Pp 112After a countdown, the system image listed will be loaded. (In the 113example above, it will be 114.Dq Li sd0a:netbsd 115which is the file 116.Nm netbsd 117on partition 118.Dq a 119of the 120.Nx 121SCSI hard disk of ID 0. 122Pressing a key within the time limit will enter interactive mode. 123.Ss Interactive mode 124In interactive mode, the boot loader will present a prompt, allowing 125input of these commands: 126.Bl -tag -width helpx -offset indent 127.It Xo Ic boot 128.Op Ar device : Ns 129.Op Ar filename 130.Op Fl adqsv 131.Xc 132The default 133.Ar device 134will be set to the disk that the boot loader was 135loaded from. 136To boot from an alternate disk, the full name of the device should 137be given at the prompt. 138.Ar device 139is of the form 140.Xo 141.Ar xd Ns Oo 142.Ar N Ns Oo 143.Ar x 144.Oc 145.Oc 146.Xc 147where 148.Ar xd 149is the device from which to boot, 150.Ar N 151is the unit number, and 152.Ar x 153is the partition letter. 154.Pp 155The following list of supported devices may vary from installation to 156installation: 157.Pp 158.Bl -hang -compact 159.It sd 160SCSI disks on a controller recognized by the IOCS. The 161unit number is the SCSI ID. 162.It fd 163Floppy drives as numbered by the IOCS. 164.El 165.Pp 166The default 167.Ar filename 168is 169.Pa netbsd ; 170if the boot loader fails to successfully 171open that image, it then tries 172.Pa netbsd.gz 173(expected to be a kernel image compressed by 174.Xr gzip 1 ) . 175Alternate system images can be loaded by just specifying the name of the image. 176.Pp 177Options are: 178.Bl -tag -width xxx 179.It Fl a 180Prompt for the root file system device, the system crash dump 181device, and the path to 182.Xr init 8 . 183.It Fl d 184Bring the system up in debug mode. Here it waits for a kernel 185debugger connect; see 186.Xr ddb 4 . 187.It Fl q 188Boot the system in quiet mode. 189.It Fl s 190Bring the system up in single-user mode. 191.It Fl v 192Boot the system in verbose mode. 193.El 194.It Ic help 195Print an overview about commands and arguments. 196.It Ic ls Op Pa path 197Print a directory listing of 198.Pa path , 199containing inode number, filename and file type. 200.Pa path 201can contain a device specification. 202.It Ic halt 203Reboot the system. 204.El 205.Ss Model-specific notes 206Note for X68030+MC68030 systems: 207Nothing special to be attended to; you can boot 208.Nx 209just like as 210other operating systems such as Human68k and OS-9. 211.Pp 212Note for X68030/040turbo(68040 accelerator by BEEPs) systems: 213.Nx 214can boot under 040 mode. 215It can also boot under 030 mode if you have MC68030 on the board. 216.Pp 217Note for X68000/Xellent30(68030 accelerator by TSR)+MC68030 systems: 218In order to boot 219.Nx , 220you must choose 030 mode by using 221.Pa CH30.SYS , 222which must reside in the battery-backuped SRAM. 223.Pp 224Note for X68000/Jupiter-X(68040/060 accelerator by FTZ-net) systems: 225The system must be in 040/060 processor mode. 226.Sh FILES 227.Bl -tag -width /usr/mdec/xxboot_ufs -compact 228.It Pa /netbsd 229system code 230.It Pa /netbsd.gz 231gzip-compressed system code 232.It Pa /usr/mdec/xxboot_ufs 233boot block (read by installboot), xx is disktype 234.It Pa /usr/mdec/boot 235source of /boot (can be just copied to the root directory) 236.It Pa /boot 237main part of the boot program 238.El 239.Sh SEE ALSO 240.Xr reboot 2 , 241.Xr disklabel 8 , 242.Xr halt 8 , 243.Xr reboot 8 , 244.Xr shutdown 8 245.\" installboot(8) must be written 246