BOOT(8) | System Manager's Manual (amiga) | BOOT(8)

# NAME

`boot` —
system bootstrapping procedures

# DESCRIPTION

## Power fail and crash recovery

When the NetBSD kernel is booted normally (using one of the two methods discussed below), it initializes itself and proceeds to boot the system. An automatic consistency check of the file systems takes place, and unless this fails, the system comes up to multi-user operations. The proper way to shut the system down is with the shutdown(8) command.

If the system crashes, it will enter the kernel debugger, ddb(4), if it is configured in the kernel. If the debugger is not present, or the debugger is exited, the system will attempt a dump to the configured dump device (which will be automatically recovered with savecore(8) during the next boot cycle). After the dump is complete (successful or not), the system will attempt a reboot.

## Booting NetBSD using the bootloader

When a bootable NetBSD partition is created by means of HDTOOLBOX or another RDB editing program and a bootblock has been copied there by amiga/installboot(8) and the boot priority of the NetBSD partition is either the highest or the NetBSD partition is selected by means of the boot menu, the Amiga ROM will automatically start the NetBSD bootloader. By default it will, after a short timeout, load the kernel image /netbsd and attempt to boot it into multi-user mode. This behaviour can be changed by typing in an alternate command sequence. The command line looks like:
kernel-path [`-abkpqsvACDS`] [`-c` model] [`-m` memsize] [`-n` memsegments] [`-I` mask]

kernel-path
  This gives you the opportunity to boot another kernel, say: /netbsd.old. The default is /netbsd.
`-a`
  Autoboot into multi-user mode (default).
`-b`
  Prompt for the root file system device, the system crash dump device, and the path to init(8).
`-c` model
  force machine model. Use 32000+(Qlogic chip revision) for the DraCo.
`-k`
  Reserve the first 4M of fastmem.
`-m` memsize
  Force fastmem size to be memsize kBytes.
`-n`
  maximum number of segments of memory to use, encoded as follows: 0 (default): 1 segment, 1: 2 segments, 2: 3 or more segments.
`-p`
  Select kernel load segment by priority instead of size.
`-q`
  Boot in quiet mode.
`-s`
  Boot into single-user mode.
`-v`
  Boot in verbose mode.
`-A`
  Enable AGA display modes.
`-C`
  Use the serial port as console.
`-D`
  Enter the kernel debugger (best used with `-S`).
`-I` mask
  inhibit sync negotiation as follows: The mask is a bitmap expressed in C notation (e.g., 0xff) with 4*8bits, each bit, if set to 1, disabling sync negotiation for the corresponding target. Note that this only applies to (some of the) real SCSI busses, but not, e.g., to internal IDE. The bytes are used up from right to left by SCSI bus drivers using this convention.
`-S`
  include kernel debug symbols (for use by `-D`).

## Booting NetBSD using the loadbsd program

When you want (or have to) start NetBSD from AmigaOS, you have to use the `loadbsd` program that is supplied in the utils directory of the distribution. The loadbsd command line specification is:
`loadbsd` [`-abkpqstvACDSZ`] [`-c` model] [`-m` memsize] [`-n` memsegments] [`-I` mask] kernel-path

Description of options:

`-a`
  Autoboot into multi-user mode.
`-b`
  Prompt for the root file system device, the system crash dump device, and the path to init(8).
`-c`
  force machine model.
`-k`
  Reserve the first 4M of fastmem.
`-m`
  Force fastmem size to be memsize kBytes.
`-n`
  maximum number of segments of memory to use, encoded as follows: 0 (default): 1 segment, 1: 2 segments, 2: 3 or more segments.
`-p`
  Select kernel load segment by priority instead of size.
`-q`
  Boot in quiet mode.
`-s`
  Boot into single-user mode.
`-t`
  Test loading of the kernel but don't start NetBSD.
`-v`
  Boot in verbose mode.
`-A`
  enable AGA display modes.
`-C`
  Use the serial port as console
`-D`
  Enter the kernel debugger (best used with `-S`).
`-I` mask
  inhibit sync negotiation as follows: The mask is a bitmap expressed in hexadecimal (e.g., ff) with 4*8bits, each bit, if set to 1, disabling sync negotiation for the corresponding target. Note that this only applies to (some of the) real SCSI busses, but not, e.g., to internal IDE. The bytes are used up from right to left by SCSI bus drivers using this convention.
`-S`
  include kernel debug symbols (for use by `-D`).
`-Z`
  Force load via chip memory. Won't work if kernel is larger than the chip memory size or on the DraCo.

Note: Because the loadbsd program can only read kernels from a AmigaOS filesystem, the file /netbsd is often not the same as the actual kernel booted. This can cause some programs to fail. However, note that you can use third-party Berkeley filesystems such as bffs to access the NetBSD root partition from AmigaOS.

# FILES

/netbsd
  system kernel
/usr/mdec/bootxx_ffsv1
  RDB device primary boot block for FFSv1 (and ustarfs)
/usr/mdec/bootxx_ffsv2
  RDB device primary boot block for FFSv2
/usr/mdec/bootxx_fd
  floppy disk primary boot block
/usr/mdec/boot.amiga
  secondary bootstrap
/boot.amiga
  secondary bootstrap (installed)

# SEE ALSO

ddb(4), amiga/installboot(8), fsck_ffs(8), newfs(8), savecore(8), shutdown(8)

# BUGS

Due to code size restrictions, you can't currently use an old-style file system (created with newfs(8) -O or with NetBSD 0.9) with the boot block. You can use `loadbsd` to boot from AmigaOS, or upgrade the file system with fsck_ffs -c 2.

February 25, 2021 | NetBSD 10.1