BOOT(8) | System Manager's Manual (x86) | BOOT(8) |
boot
—
>> NetBSD BIOS Boot, revision 3.0 >> (user@buildhost, builddate) >> Memory: 637/15360 k Press return to boot now, any other key for boot menu booting hd0a:netbsd - starting in 5
After a countdown, the system image listed will be loaded. In the
example above, it will be
“hd0a:netbsd
” which is the file
/netbsd on partition
“a
” of the
NetBSD MBR partition of the first hard disk known to
the BIOS (which is an IDE or similar device — see the
BUGS section).
Pressing a key within the time limit, or before the boot program starts, will enter interactive mode. When using a short or 0 timeout, it is often useful to interrupt the boot by holding down a shift key, as some BIOSes and BIOS extensions will drain the keystroke buffer at various points during POST.
If present, the file /boot.cfg will be used to configure the behaviour of the boot loader including setting the timeout, choosing a console device, altering the banner text and displaying a menu allowing boot commands to be easily chosen. See boot.cfg(5).
If the first stage boot succeeds, the banner will be shown and the error messages should be self-explanatory.
boot
[device:
][filename]
[-1234abcdmqsvxz
]To boot from an alternate disk, the full name of the device
should be given at the prompt. device is of the
form NAME=
partition_label
when booting from a gpt(8)
partitioned disk. Otherwise, the syntax is
xd[N[x]]
where xd is the device from which to boot,
N is the unit number, and x
is the partition letter.
In the latter case, the following list of supported devices may vary from installation to installation:
dev
command using he
NAME=
partition_label
syntax.The default filename is netbsd; if the boot loader fails to successfully open that image, it then tries netbsd.gz (expected to be a kernel image compressed by gzip), followed by onetbsd, onetbsd.gz, netbsd.old, and finally netbsd.old.gz. Alternate system images can be loaded by just specifying the name of the image.
Options are:
-1
RB_MD1
in
boothowto. In
NetBSD/x86, this disables multiprocessor boot;
the kernel will boot in uniprocessor mode.-2
RB_MD2
in
boothowto. In
NetBSD/x86, this disables ACPI.-3
RB_MD3
in
boothowto. In
NetBSD/amd64, this disables SVS.-4
RB_MD4
in
boothowto. In
NetBSD/x86, this has no effect.-a
RB_ASKNAME
flag in
boothowto. This causes the kernel to prompt for
the root file system device, the system crash dump device, and the
path to init(8).-b
RB_HALT
flag in
boothowto. This causes subsequent reboot
attempts to halt instead of rebooting.-c
RB_USERCONF
flag in
boothowto. This causes the kernel to enter the
userconf(4) device
configuration manager as soon as possible during the boot.
userconf(4) allows
devices to be enabled or disabled, and allows device locators (such as
hardware addresses or bus numbers) to be modified before the kernel
attempts to attach the devices.-d
RB_KDB
flag in
boothowto. Requests the kernel to enter debug
mode, in which it waits for a connection from a kernel debugger; see
ddb(4).-m
RB_MINIROOT
flag in
boothowto. Informs the kernel that a mini-root
file system is present in memory.-q
AB_QUIET
flag in
boothowto. Boot the system in quiet mode.-s
RB_SINGLE
flag in
boothowto. Boot the system in single-user
mode.-v
AB_VERBOSE
flag in
boothowto. Boot the system in verbose mode.-x
AB_DEBUG
flag in
boothowto. Boot the system with debug messages
enabled.-z
AB_SILENT
flag in
boothowto. Boot the system in silent mode.consdev
dev[,
speed]pc
,
com0
, com1
,
com2
, com3
,
com0kbd
, com1kbd
,
com2kbd
, com3kbd
, or
auto
. See
Console Selection
Policy in
x86/boot_console(8).
A speed for the serial port is optional
and defaults to 9600. If a value of zero is specified, then the current
baud rate (set by the BIOS) will be used. Setting the
speed with the pc
device
is not possible.
dev
[device]boot
.devpath
efivar
fs
filegop
[mode_index]help
load
module [arguments]load
command include
loading a memory disk image before booting a kernel, or loading a Xen DOM0
kernel before booting the Xen hypervisor. See
boot.cfg(5) for
examples.
In addition to the boot
options
specified above, the Xen DOM0 kernel accepts
(arguments being separated with spaces):
bootdev
=dev
(or root
=dev)NAME=
partition_label for
gpt(8) partitioned
disks. It can also be a unit name
(‘wd0
’), or an interface name
(‘bge0
’,
‘wm0
’, ...) for cases where the
root file system has to be loaded from network (see the
BUGS section in
x86/pxeboot(8)).console
=devconsdev
command. See
Console Selection
Policy in
x86/boot_console(8).ip
=
my_ip:
serv_ip:
gw_ip:
mask:
host:
ifacexennet0
”
or “eth0
”)nfsroot
=address:
rootpathpciback.hide
=pcidevs:
device.
function
notation), each ID being surrounded with brackets. PCI domain IDs are
currently ignored. See
pciback(4).ls
[path]memmap
menu
modules
{on
|
off
|
enabled
|
disabled
}enabled
’,
‘on
’ will enable module loading for
boot
and multiboot
,
whereas ‘disabled
’,
‘off
’ will turn off the
feature.mode
fstypemultiboot
kernel [arguments]boot
command.
The multiboot protocol may be used in the following cases:
load
command, and the Xen hypervisor must be
booted using the multiboot
command. Options
for the DOM0 kernel (such as “-s” for single user mode)
must be passed as options to the load
command.
Options for the hypervisor (such as
“dom0_mem=256M
” to reserve 256MB
of memory for DOM0) must be passed as options to the
multiboot
command. See
boot.cfg(5) for
examples on how to boot NetBSD/Xen.options MULTIBOOT
(see
x86/multiboot(8))
may be booted with either the boot
or
multiboot
command, passing the same
arguments in either case.multiboot
command. See the foreign operating
system's documentation for the available
arguments.pkboot
KASLR
option set, for Kernel Address Space Layout
Randomizaton.quit
reloc
[default |
none |
address]SELFRELOC
option, so that can relocate itself at
the right address, otherwise a crash occurs at boot time.
rndseed
filerndctl
-S
’ shortly before the previous shutdown. See the
random_seed and random_file
variables in rc.conf(5),
and the /etc/rc.d/random_seed script, for a way to
manage the seed file. Using the same seed file on more then one host, or
for more than one boot on the same host, will reduce the quality of random
numbers and may impact system security.splash
filetext
[mode_index]50x19
means 80
columns and
25
lines). With an argument, select a text
mode.userconf
commandversion
[full]vesa
{modenum |
on
|
off
|
enabled
|
disabled
|
list
}0x100
’,
‘800x600
’,
‘800x600x32
’. The values
‘enabled
’,
‘on
’ put the display into the
default mode, and ‘disabled
’,
‘off
’ returns the display into
standard vga mode. The value ‘list
’
lists all supported modes.In an emergency, the bootstrap methods described in the NetBSD installation notes for the x86 architectures can be used to boot from floppy or other media, or over the network.
BTINFO_ROOTDEVICE
fromsd0a).
’ This will
be automatically substituted by a
dk(4) wedge if one is
discovered.
If the bootloader passes a wedge name as
“wedge:
” or
“NAME=
” followed by the name. The
kernel will search for a
dk(4) device with that
name.
BTINFO_BOOTWEDGE
determined by bootblockAn additional partition number is provided if the bootloader
also passed a BTINFO_BOOTDISK
record. This (or
partition ‘a
’) will be used by the
kernel as a fallback if there is no matching wedge.
BTINFO_BOOTDISK
determined by bootblockboot -d netbsd.test
is ignored, and the default kernel is booted.
Hard disks are always accessed by BIOS functions. Unit numbers are BIOS device numbers which might differ from numbering in the NetBSD kernel or physical parameters (e.g., SCSI slave numbers). There isn't any distinction between “sd” and “wd” devices at the bootloader level. This is less a bug of the bootloader code than a shortcoming of the PC architecture. The default disk device's name printed in the starting message is derived from the “type” field of the NetBSD disklabel (if it is a hard disk).
UEFI implementations are supposed to support either x86/mbr(8) or gpt(8) partitioning, but some do not handle the latter. UEFI booting from a gpt(8) partitioned disk is still possible in this case, by adding an overlapping EFI partition in the protective x86/mbr(8) block. This can be achieved using the following commands (you must adapt the hard disk and EFI partition start end size to fit your setup):
dd if=/dev/rwd0d bs=512 count=1 of=mbr fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc
The resulting x86/mbr(8) partition table will look like this:
0: GPT Protective MBR (sysid 238) start 1, size 2097151 (1024 MB, Cyls 0-130/138/8) PBR is not bootable: Bad magic number (0x0000) 1: Primary DOS with 16 bit FAT <32M (sysid 4) start 34, size 32768 (16 MB, Cyls 0/0/35-2/10/42), Active 2: <UNUSED> 3: <UNUSED>
July 15, 2020 | NetBSD 9.4 |