Manual browser: boothowto(9)
|BOOTHOWTO(9)||Kernel Developer's Manual||BOOTHOWTO(9)|
NAMEboothowto, BOOT_FLAG — flags passed to kernel during boot or shutdown
extern int boothowto;
#define BOOT_FLAG(arg, retval) ...
DESCRIPTIONThe boothowto variable contains flags passed to the kernel by the boot loader (see boot(8)), or the reboot(2) system call. The value is interpreted as a bit mask, with bits defined by the “RB_*” and “AB_*” symbols in <sys/reboot.h>. The value is made available via the sysctl(7) variable kern.boothowto.
The BOOT_FLAG macro defined in <sys/boot_flag.h> is used by many boot loaders to convert command line options into boothowto flags. Note that not all boot loaders use this macro, and some boot loaders may have incompatible options.
Where possible, flags set by the reboot(2) system call will be passed to the new kernel after a reboot; the extent to which this is possible is machine dependent.
In the following tables, each flag is listed with its symbolic name, the corresponding numeric value defined in <sys/reboot.h>, and the option letter (if any) understood by the BOOT_FLAG macro.
Flags that affect booting or shutting downThe following flags affect actions taken during system boot or shutdown.
||The default if no other flags are set. Causes the system to boot in the normal way.|
This flag causes various parts of the system to prompt:
||-s||Boot in single-user mode. If this flag is set, the kernel passes the -s option to init(8).|
If this flag is set, then some parts of the shutdown process will be less graceful than usual:
||-b||If this flag is set, then reboot(2) will cause the system to halt instead of rebooting. This flag may be set at boot time, and cannot be cleared by reboot(2).|
||This flag is obsolete. It was previously used to cause the kernel to prompt for the name of the init(8) program, but that function is now controlled by the RB_ASKNAME flag.|
||-d||Gives control to a kernel debugger early in the boot sequence. See ddb(4), “options KGDB” in options(4), and ipkdb(9).|
||This flag is deprecated. It previously caused the kernel to mount the root file system in read-only mode, but now that is the default, and this flag has no effect.|
||Causes the kernel to dump memory to the dump device during shutdown. See savecore(8), cpu_reboot(9), and dumpsys(9).|
||-m||This flag informs the kernel that a mini-root file system is present in memory. See md(4), and mdsetimage(8).|
||This flag indicates that a boot string is present. The string may be provided by reboot(2) and will be passed to the boot loader if possible.|
||This flag is used in conjunction with RB_HALT. If this flag is set, then then system will be powered down if possible. If powerdown is not supported, then the system will halt.|
||-c||This flag causes the kernel to invoke the userconf(4) device configuration manager early in the boot sequence.|
Flags that affect verbosityThe following flags affect the verbosity of messages printed by the kernel. These flags are used by several functions described in kprintf(9) to control whether output is sent to the console, the system log, both, or neither. The use of flags that increase verbosity simultaneously with the use of flags that decrease verbosity, is not well defined.
||The default, if none of the other AB_* flags is set, is that ordinary kernel messages are sent both to the console and to the system log.|
||-q||Boot quietly. Ordinary kernel messages are sent to the system log, but not to the console. Messages printed with aprint_naive(9) are sent to the console, but not to the system log.|
||-v||Boot verbosely. Some messages will be printed that would otherwise not be printed. Both ordinary kernel messages, and messages printed with aprint_verbose(9), will be sent both to the console and to the system log. If this flag is not set, then messages printed with aprint_verbose(9) will be sent only to the system log.|
||-z||Boot silently. Most kernel messages will be sent only to the system log, not to the console. The aprint_*() functions display a spinning symbol on the console.|
||-x||Boot with debug messages.|
Machine-dependent flagsThe following flags have machine-dependent meanings.
||-1||Some ports use this flag to disable multiprocessor mode, making them use only a single CPU. The zaurus port uses this flag to enable the serial console.|
||-2||The i386 and amd64 ports use this flag to disable acpi(4).|
||-3||This flag is currently not used by any ports.|
||-4||This flag is currently not used by any ports.|
SEE ALSOreboot(2), ddb(4), userconf(4), sysctl(7), boot(8), crash(8), init(8), reboot(8), savecore(8), sync(8), cpu_reboot(9), kprintf(9)
HISTORYThe boothowto variable appeared in 4.0BSD. The BOOT_FLAG macro appeared in NetBSD 1.6.
The RB_DFLTROOT option is now obsolete.
|September 11, 2009||NetBSD 7.0|