OPTIONS(4)

๐Ÿ“ฆ
version 11.0 ยท 2 versions
, in nixpkgs unstable

๐ŸŒธ OPTIONS(4) โ€” the kernel config options glow-up ๐ŸŒธ

ok so this is from the Kernel Interfaces Manual, and it's literally the cheat sheet for all the miscellaneous kernel configuration options you can drop into a kernel config file. bestie, if you wanna know how to actually configure and build kernels, go read config(1) and config(5) โ€” this page is about the options themselves. ๐Ÿ’…


โœจ NAME โœจ

options โ€” Miscellaneous kernel configuration options ๐ŸŽ€

โœจ SYNOPSIS โœจ

cinclude ...
config ...
[no] file-system ...
ident ...
include ...
[no] makeoptions ...
maxusers ...
[no] options ...
[no] pseudo-device ...

โœจ DESCRIPTION โœจ

So this manual page describes a bunch of miscellaneous kernel configuration options that you can specify in a kernel config file. See config(1) and config(5) for the deets on how to configure and build kernels, ok? ๐Ÿซถ

The no form removes a previously specified option. that's it, that's the whole vibe โ€” it's the undo button, periodt.

๐Ÿ’ซ Keywords ๐Ÿ’ซ

These are the keywords that are recognized in a kernel configuration file โ€” your whole vocabulary, basically:

  • cinclude "filename" โ€” conditionally includes another kernel configuration file whose name is filename, which may be double-quoted and may be an explicit path or relative to the kernel source directory. and if it fails to open the named file? it's ignored. no drama. ๐Ÿ™ˆ
  • config exec_name root on rootdev [type fstype] [dumps on dumpdev] โ€” defines a configuration whose kernel executable is named exec_name, normally netbsd (yes, with the curly quotes energy: โ€œnetbsdโ€), with its root file system of type fstype on the device rootdev, and optionally specifying the location of kernel core dumps on the device dumpdev. dev or dumpdev and fstype may be specified as ?, which is a wild card โ€” very "whatever, figure it out" of them โœจ. the root fstype and dumpdev are optional and assumed to be wild carded if they're not specified.
  • device_instance at attachment [locators value [...]] [flags value] โ€” define an instance of the device driver device_instance that attaches to the bus or device named attachment. an attachment may require extra info on where the device can be found, such as an address, channel, function, offset, and/or slot, referred to as locators, whose value often may be a wild card, ?. some device drivers have one or more flags that can be adjusted to affect the way they operate. lowkey very customizable, we love to see it ๐Ÿ’œ
  • file-system fs_name [, fs_name [...]] โ€” include support for the file-system fs_name. multiple? yes bestie, comma-separate them.
  • ident "string" โ€” sets the kernel identification string to string.
  • include "filename" โ€” functions the same as cinclude, except failure to open filename produces a fatal error. so like, same but with consequences ๐Ÿ’€
  • makeoptions name=value โ€” defines a make(1) macro name with the value value in the kernel Makefile.
  • maxusers integer โ€” set the maxusers variable in the kernel.
  • no keyword name [arguments [...]] โ€” for the config(1) keywords file-system, makeoptions, options, and pseudo-device, no removes the file-system, makeoption, options, or pseudo-device, name. this is useful when a kernel configuration file includes another one which has undesired options. ikyk what a lifesaver this is ๐Ÿ˜ญ

for example, a local configuration file that wanted the kitchen sink, but not COMPAT_09 or bridging, might be:

include "arch/i386/conf/GENERIC"
no options COMPAT_09
no pseudo-device bridge
  • options option_name [, option_name=value [...]] โ€” specifies (or sets) the option, or comma-separated list of options, option_name. some options expect to be assigned a value, which may be an integer, a double-quoted word, a bare word, or an empty string (""). note that those are eventually handled by the C compiler, so the rules of that language apply. not me reminding you that C doesn't care about your feelings ๐Ÿงš
Note: Options that are not defined by device definition files are passed to the compile process as -D flags to the C compiler.
  • pseudo-device name [N] โ€” includes support for the pseudo-device name. some pseudo-devices can have multiple or N instances. iconic. ๐Ÿ‘‘

๐ŸŒˆ Compatibility Options ๐ŸŒˆ

heads up bestie: compatibility options for older NetBSD releases include support for newer releases as well. this means that typically only one of these is necessary, with the COMPAT_09 option enabling all NetBSD compatibility. this does not include the COMPAT_43 or COMPAT_44 options โ€” those two are doing their own thing, main character energy fr.

  • options COMPAT_09 โ€” enable binary compatibility with NetBSD 0.9. this enables support for 16-bit user, group, and process IDs (following revisions support 32-bit identifiers). it also allows the use of the deprecated getdomainname(3), setdomainname(3), and uname(3) syscalls. this option also allows using numeric file system identifiers rather than strings. post NetBSD 0.9 versions use string identifiers. so ancient, so historic ๐Ÿ›๏ธ
  • options COMPAT_10 โ€” enable binary compatibility with NetBSD 1.0. this option allows the use of the file system name of โ€œufsโ€ as an alias for โ€œffsโ€. the name โ€œffsโ€ should be used post 1.0 in /etc/fstab and other files. it also adds old syscalls for the AT&T System V UNIX shared memory interface. this was changed post 1.0 to work on 64-bit architectures. this option also enables โ€œsgttyโ€ compatibility, without which programs using the old interface produce an โ€œinappropriate ioctlโ€ error, and /dev/io only works when this option is set in the kernel, see io(4) on ports that support it. ๐Ÿ’…
  • options COMPAT_11 โ€” enable binary compatibility with NetBSD 1.1. this allows binaries running on the i386 port to gain direct access to the io ports by opening /dev/io read/write. this functionality was replaced by i386_iopl(2) post 1.1. on the Atari port, the location of the disk label was moved after 1.1. when the COMPAT_11 option is set, the kernel will read (pre) 1.1 style disk labels as a last resort. when a disk label is re-written, the old style label will be replaced with a post 1.1 style label. this also enables the EXEC_ELF_NOTELESS option.
  • options COMPAT_12 โ€” enable binary compatibility with NetBSD 1.2. this allows the use of old syscalls for reboot() and swapon(). the syscall numbers were changed post 1.2 to add functionality to the reboot(2) syscall, and the new swapctl(2) interface was introduced. this also enables the EXEC_ELF_NOTELESS option.
  • options COMPAT_13 โ€” enable binary compatibility with NetBSD 1.3. this allows the use of old syscalls for sigaltstack(), and also enables the old swapctl(2) command SWAP_STATS (now called SWAP_OSTATS), which does not include the se_path member of struct swapent. ๐Ÿฆ‹
  • options COMPAT_14 โ€” enable binary compatibility with NetBSD 1.4. this allows some old ioctl(2) on wscons(4) to be performed, and allows the NFSSVC_BIOD mode of the nfssvc(2) system call to be used for compatibility with the deprecated nfsiod program. deprecated, bestie! deprecated! ๐Ÿ’€
  • options COMPAT_15 โ€” enable binary compatibility with NetBSD 1.5. since there were no API changes from NetBSD 1.5 and NetBSD 1.6, this option does nothing. literally a decorative option. we stan a do-nothing queen ๐ŸŒธ
  • options COMPAT_16 โ€” enable binary compatibility with NetBSD 1.6. this allows the use of old signal trampoline code which has been deprecated with the addition of siginfo(2).
  • options COMPAT_20 โ€” enable binary compatibility with NetBSD 2.0. this allows the use of old syscalls for statfs(), fstatfs(), getfsstat() and fhstatfs(), which have been deprecated with the addition of the statvfs(2), fstatvfs(2), getvfsstat(2) and fhstatvfs(2) system calls.
  • options COMPAT_30 โ€” enable binary compatibility with NetBSD 3.0. see compat_30(8) for details about the changes made after the NetBSD 3.0 release. ๐ŸŽ€
  • options COMPAT_40 โ€” enable binary compatibility with NetBSD 4.0. this allows the use of old ptrace(2) calls for the SH3 platform. it also enables the old mount(2) system call that did not include the data length parameter. the power_event_t structure's pev_switch is filled in.
  • options COMPAT_43 โ€” enables compatibility with 4.3BSD. this adds an old syscall for lseek(2). it also adds the ioctls for TIOCGETP and TIOCSETP. the return values for getpid(2), getgid(2), and getuid(2) syscalls are modified as well, to return the parent's PID and UID as well as the current process's. it also enables the deprecated NTTYDISC terminal line discipline. it also provides backwards compatibility with โ€œoldโ€ SIOC[GS]IF{ADDR,DSTADDR,BRDADDR,NETMASK} interface ioctls, including binary compatibility with code written before the introduction of the sa_len field in sockaddrs. it also enables support for some older pre 4.4BSD socket calls. this one ate and left no crumbs ๐Ÿ”ฅ
  • options COMPAT_50 โ€” enable binary compatibility with NetBSD 5.0. this enables support for the old time_t and dev_t types as 32 bit, and all the associated kernel interface changes. it also enables old gpio(4) and rnd(4) interfaces.
  • options COMPAT_60 โ€” enable binary compatibility with NetBSD 6.0. this provides old ccd(4) interfaces, enables support for old cpuctl(8) microcode interfaces, and support for the old ptmget structure.
  • options COMPAT_70 โ€” enable binary compatibility with NetBSD 7.0. this provides support for old route(4) interfaces.
  • options COMPAT_80 โ€” enable binary compatibility with NetBSD 8.0. short and sweet โœจ
  • options COMPAT_90 โ€” enable binary compatibility with NetBSD 9.0. also short and sweet โœจ
  • options COMPAT_BSDPTY โ€” this option is currently on by default and enables the pty multiplexer ptm(4) and ptmx(4) to find and use ptys named /dev/ptyXX (master) and /dev/ttyXX (slave). eventually this option will become optional as ptyfs based pseudo-ttys become the default, see mount_ptyfs(8). so like, enjoy it while it's default ๐Ÿซถ
  • options COMPAT_LINUX โ€” on those architectures that support it, this enables binary compatibility with Linux ELF and a.out(5) applications built for the same architecture. this currently includes the alpha, arm, i386, m68k, mips, powerpc and x86_64 ports. multi-arch slay ๐Ÿ’…
  • options COMPAT_LINUX32 โ€” on those 64 bit architectures that support it, this enables binary compatibility with 32 bit Linux binaries. for now this is limited to running i386 ELF Linux binaries on amd64. ngl, niche but valid.
  • options COMPAT_SUNOS โ€” on those architectures that support it, this enables binary compatibility with SunOS 4.1 applications built for the same architecture. this currently includes the sparc, sparc64 and most or all m68k ports. note that the sparc64 requires the COMPAT_NETBSD32 option for 64-bit kernels, in addition to this option. two options, one vibe ๐ŸŒˆ
  • options COMPAT_ULTRIX โ€” on those architectures that support it, this enables binary compatibility with ULTRIX applications built for the same architecture. this currently is limited to the pmax. the functionality of this option is unknown. literally nobody knows what it does and I think that's iconic ๐Ÿ˜ญ
  • options COMPAT_FREEBSD โ€” on those architectures that support it, this enables binary compatibility with FreeBSD applications built for the same architecture. at the moment this is limited to the i386 port.
  • options COMPAT_NOMID โ€” enable compatibility with a.out(5) executables that lack a machine ID. this includes NetBSD 0.8's ZMAGIC format, and 386BSD and BSDI's QMAGIC, NMAGIC, and OMAGIC a.out(5) formats. the whole magic alphabet, bestie ๐Ÿ”ฎ
  • options COMPAT_NETBSD32 โ€” on those architectures that support it, this enables binary compatibility with 32-bit applications built for the same architecture. this is currently limited to the amd64 and sparc64 ports, and only applicable for 64-bit kernels. 64-bit kernel, 32-bit app, no cap ๐Ÿงš

ok that's the first chunk โ€” more parts coming, don't go anywhere bestie ๐Ÿ’–

  • options COMPAT_AOUT_M68K โ€” okay so this one is for m68k archs that already made the glow-up to ELF ๐Ÿฆ‹ It turns on binary compat so your shiny NetBSD/m68k ELF kernel can still run old NetBSD/m68k a.out(5) executables. Why does this even need to exist? Because the m68k ABI alignment situation between a.out and ELF is a whole mess that causes structure padding differences (the โœจdramaโœจ). Heads up tho: right now only some system calls that use struct stat get adjusted, and some binaries that use sysctl(3) to grab network details just won't work properly ๐Ÿ˜ญ Not everything slays yet.
  • *options EMUL_NATIVEROOT=string* โ€” you know how emulated binaries look up files in an emulation root (like /emul/linux) before looking in the real root? This makes native binaries do the same thing with an "emulation" directory too ๐Ÿ’… And it's actually so useful for testing an amd64 kernel on top of an i386 system before you fully migrate โ€” you unpack the amd64 distribution in, say, /emul/netbsd64, set that as EMUL_NATIVEROOT, and boom: native amd64 binaries run while your root file system is still full of i386 binaries ๐ŸŽ€ > โš ๏ธ fr fr beware of /dev incompatibilities between i386 and amd64 if you do this.
  • options EXEC_ELF_NOTELESS โ€” runs unidentified ELF binaries as NetBSD binaries. Might be needed for very old NetBSD ELF binaries on some archs, because those vintage babies didn't contain an appropriate .note.netbsd.ident section, so the kernel literally can't identify them as NetBSD binaries otherwise ๐Ÿ™ˆ > โš ๏ธ Beware โ€” with this option on, the kernel would run any unknown ELF binaries as if they were NetBSD binaries. It's giving "no vibes check, no problem," which is lowkey terrifying ngl.

๐Ÿ› Debugging Options ๐Ÿ›

  • options DDB โ€” compiles in a kernel debugger for diagnosing kernel problems. See ddb(4) for the deets. > NOTE: not available on all architectures ๐Ÿ˜”
  • *options DDB_FROMCONSOLE=integer* โ€” if you set this to non-zero, DDB can be entered by sending a break on a serial console or by a special key sequence on a graphics console. A value of "0" ignores console breaks or key sequences. If not explicitly specified, the default value is "1". Note that this sets the value of the ddb.fromconsole sysctl(3) variable, which may be changed at run time โ€” see sysctl(8) for details โœจ
  • *options DDB_HISTORY_SIZE=integer* โ€” if this is non-zero, enable history editing in the kernel debugger and set the size of the history to this value. Bestie gets her up-arrow history, it's what she deserves ๐Ÿซถ
  • options DDB_ONPANIC โ€” the default if not specified is "1" โ€” just enter into DDB. If set to "0" the kernel will attempt to print out a stack trace and reboot the system. If set to "-1" then neither a stack trace is printed or DDB entered โ€” it is as if DDB were not compiled into the kernel ๐Ÿ’€ Note that this sets the value of the ddb.onpanic sysctl(3) variable which may be changed at run time โ€” see sysctl(8) for details.
  • *options DDB_COMMANDONENTER=string* โ€” this option specify commands which will be executed on each entry to DDB. It sets the default value of the ddb.commandonenter sysctl(3) variable, which may be changed at run time ๐Ÿ”ฅ
  • *options DDB_BREAK_CHAR=integer* โ€” this option overrides using break to enter the kernel debugger on the serial console. The value given is the ASCII value to be used instead. This is currently only supported by the com driver ๐Ÿ‘‘
  • *options CNMAGIC=string* โ€” this option overrides the cnmagic(9) string used to enter the kernel debugger ๐ŸŽ€
  • options DDB_VERBOSE_HELP โ€” this option adds more verbose descriptions to the help command. More words = more help, we love an explainer queen ๐Ÿ’…
  • *options DDB_PANICSTACKFRAMES=integer* โ€” number of stack frames to display on panic. Useful to avoid scrolling away the interesting frames on a glass tty ๐Ÿ™ˆ Default value is 65535 (all frames), useful value around 10.
  • options KGDB โ€” compiles in a remote kernel debugger stub for diagnosing kernel problems using the โ€œremote targetโ€ feature of gdb. See gdb(1) for details. > NOTE: not available on all architectures ๐Ÿ˜ญ
  • options KGDB_DEV โ€” device number (as a dev_t) of kgdb device.
  • options KGDB_DEVADDR โ€” memory address of kgdb device.
  • options KGDB_DEVMODE โ€” permissions of kgdb device.
  • options KGDB_DEVNAME โ€” device name of kgdb device.
  • options KGDB_DEVRATE โ€” baud rate of kgdb device. The whole KGDB squad is here and they're all serving their one specific purpose ๐Ÿงš
  • makeoptions DEBUG="-g" โ€” the -g flag causes netbsd.gdb to be built in addition to netbsd. netbsd.gdb is useful for debugging kernel crash dumps with gdb. See gdb(1) for details โญ
  • options DEBUG โ€” turns on miscellaneous kernel debugging. Since options are turned into preprocessor defines (see above), options DEBUG is equivalent to doing a #define DEBUG throughout the kernel. Much of the kernel has #ifdef DEBUG conditionalized debugging code. Note that many parts of the kernel (typically device drivers) include their own #ifdef XXX_DEBUG conditionals instead. This option also turns on certain other options, which may decrease system performance ๐Ÿ˜ฌ > Systems with this option are not suitable for regular use, and are intended only for debugging or looking for bugs. It's a lab coat, not an everyday fit.
  • options DIAGNOSTIC โ€” adds code to the kernel that does internal consistency checks. This code will cause the kernel to panic if corruption of internal data structures is detected ๐Ÿ’€ Historically, the performance degradation is sufficiently small that it is reasonable for systems with options DIAGNOSTIC to be in production use, with the real consideration not being performance but instead a preference for more panics versus continued operation with undetected problems. Iconic tradeoff honestly.
  • options LOCKDEBUG โ€” adds code to the kernel to detect incorrect use of locking primitives (mutex, rwlock). This code will cause the kernel to check for dead lock conditions. It will also check for memory being freed to not contain initialised lock primitives. Functions for use in ddb(4) to check lock chains etc. are also enabled. > These checks are very expensive and can decrease performance on multi-processor machines by a factor of three ๐Ÿ”ฅ๐Ÿ˜ญ Worth it when you're hunting bugs tho.
  • options KDTRACE_HOOKS โ€” adds hooks for the DTrace tracing facility, which allows users to analyze many aspects of system and application behavior. See dtrace(1) for details ๐Ÿ‘‘
  • options KSTACK_CHECK_MAGIC โ€” check kernel stack usage and panic if stack overflow is detected. This check is performance sensitive because it scans stack on each context switch ๐ŸŒธ
  • options KTRACE โ€” add hooks for the system call tracing facility, which allows users to watch the system call invocation behavior of processes. See ktrace(1) for details. Literally watching every move, main character surveillance energy ๐Ÿ’…
  • *options MSGBUFSIZE=integer* โ€” this option sets the size of the kernel message buffer in bytes. This buffer holds the kernel output of printf() when not (yet) read by syslogd(8). This is particularly useful when the system has crashed and you wish to lookup the kernel output from just before the crash ๐Ÿ˜ญ Also, since the autoconfig output becomes more and more verbose, it sometimes happens that the message buffer overflows before syslogd(8) was able to read it. Note that not all systems are capable of obtaining a variable sized message buffer. There are also some systems on which memory contents are not preserved across reboots ๐Ÿซ 
  • options KERNHIST โ€” enables the kernel history logs, which create in-memory traces of various kernel activities. These logs can be displayed by using show kernhist from DDB. See the kernel source file sys/kern/kern_history.c and the kernhist(9) manual for details โœจ
  • options KERNHIST_PRINT โ€” prints the kernel history logs on the system console as entries are added. Note that the output is extremely voluminous, so this option is really only useful for debugging the very earliest parts of kernel initialization ๐Ÿ’€
  • options UVMHIST โ€” like KERNHIST, it enables the UVM history logs. These logs can be displayed by using show kernhist from DDB. See the kernel source file sys/uvm/uvm_stat.c for details ๐ŸŒˆ
  • options UVMHIST_PRINT โ€” like UVMHIST, it prints the UVM history logs on the system console as entries are added. Note that the output is extremely voluminous, so this option is really only useful for debugging the very earliest parts of kernel initialization ๐Ÿ˜ญ
  • options UVMHIST_MAPHIST_SIZE โ€” set the size of the โ€œmaphistโ€ kernel history. The default is 100. This option depends upon the UVMHIST option ๐ŸŽ€
  • options UVMHIST_PDHIST_SIZE โ€” set the size of the โ€œpdhistโ€ kernel history. The default is 100. This option depends upon the UVMHIST option.
  • options BIOHIST โ€” like KERNHIST, it enables the BIO history logs. These logs can be displayed by using show kernhist from DDB, and can help in debugging problems with Buffered I/O operations. See the kernel source file sys/kern/vfs_vio.c for details ๐Ÿ’œ
  • options BIOHIST_PRINT โ€” like BIOHIST, it prints the BIO history logs on the system console as entries are added. Note that the output is extremely voluminous, so this option is really only useful for debugging the very earliest parts of kernel initialization ๐Ÿ™ˆ
  • options BIOHIST_SIZE โ€” set the size of the โ€œbiohistโ€ kernel history. The default is 500. This option depends upon the BIOHIST option.

๐Ÿ“ File Systems ๐Ÿ“

  • file-system FFS โ€” includes code implementing the Berkeley Fast File System (FFS). Most machines need this if they are not running diskless ๐Ÿ‘‘
  • file-system EXT2FS โ€” includes code implementing the Second Extended File System (ext2), revision 0 and revision 1 with the filetype, sparse_super and large_file options. This is the most commonly used file system on the Linux operating system, and is provided here for compatibility ๐Ÿซถ Some of the specific features of ext2 like the "behavior on errors" are not implemented. See mount_ext2fs(8) for details.
  • file-system LFS โ€” [EXPERIMENTAL] Include the Log-structured File System (LFS). See mount_lfs(8) and newfs_lfs(8) for details โœจ
  • file-system MFS โ€” include the Memory File System (MFS). This file system stores files in swappable memory, and produces notable performance improvements when it is used as the file store for /tmp and similar file systems. See mount_mfs(8) for details ๐Ÿ’–
  • file-system NFS โ€” include the client side of the Network File System (NFS) remote file sharing protocol. Although the bulk of the code implementing NFS is kernel based, several user level daemons are needed for it to work. See mount_nfs(8) for details ๐ŸŒธ
  • file-system CD9660 โ€” includes code for the ISO 9660 + Rock Ridge file system, which is the standard file system on many CD-ROM discs. Useful primarily if you have a CD-ROM drive. See mount_cd9660(8) for details ๐Ÿ’ฟ
  • file-system MSDOSFS โ€” includes the MS-DOS FAT file system, which is reportedly still used by unfortunate people who have not heard about NetBSD ๐Ÿ˜ญ Also implements the Windows 95 extensions to the same, which permit the use of longer, mixed case file names. See mount_msdos(8) and fsck_msdos(8) for details ๐ŸŽ€
  • file-system NTFS โ€” [EXPERIMENTAL] Includes code for the Microsoft Windows NT file system. See mount_ntfs(8) for details ๐Ÿฆ‹
  • file-system FDESC โ€” pulls in the code for a file system, conventionally mounted on /dev/fd, that lets you reach into the per-process file descriptor space through special files living in that file system. Peep mount_fdesc(8) for the deets. Heads up though: this whole thing is redundant and lowkey unnecessary on most NetBSD systems, because the fd(4) pseudo-device driver already does the exact same job. On most NetBSD systems, instances of fd(4) are mknoded under /dev/fd/ and on /dev/stdin, /dev/stdout, and /dev/stderr. So likeโ€ฆ it's giving "we have that at home" ๐Ÿ’…
  • file-system KERNFS โ€” includes the code that lets you mount a special file system (normally mounted on /kern) where you'll find files representing all sorts of kernel variables and parameters. mount_kernfs(8) has the lore โœจ
  • file-system NULLFS โ€” the loopback file system, bestie! This one lets portions of the file hierarchy be re-mounted in other places. Fr fr though, the code really exists to be an example of a stackable file system layer โ€” it's the demo model, the blueprint, the main character of stackable layers. mount_null(8) for details ๐Ÿฆ‹
  • file-system OVERLAY โ€” code for a file system filter. This lets the overlay file system intercept all access to an underlying file system. It's intended to serve as an example of a stacking file system that has a need to interpose itself between an underlying file system and all other access. Not me, just standing here, between you and everything. mount_overlay(8) for the details ๐ŸŽ€
  • file-system PROCFS โ€” a special file system (conventionally mounted on /proc) where the process space becomes visible in the file system. Among other things, the memory spaces of processes running on the system are visible as files, and you can send signals to processes by writing to ctl files in the procfs namespace. Obsessed. See mount_procfs(8) ๐ŸŒธ
  • file-system UDF โ€” code for the UDF file system, commonly found on CD and DVD media but also on USB sticks and harddiscs for interchange and backup. It supports read and write access for all formats on discs and on rewritable and recordable CD/DVD/BD media. Fair warning: it has a somewhat limited write support for UDF 2.50 as it can't expand the metadata partion. Not a drill, that's a real limitation ๐Ÿ’€ See mount_udf(8) and fsck_udf(8) for details.
  • file-system UMAPFS โ€” a loopback file system where user and group IDs may be remapped โ€” which is genuinely useful when you're mounting alien file systems with different UIDs and GIDs than the local system. mount_umap(8) has the details ๐Ÿซถ
  • file-system UNION โ€” [EXPERIMENTAL] ๐Ÿงช includes the code for the union file system, which permits directories to be mounted on top of each other in such a way that both file systems remain visible โ€” this permits tricks like allowing writing (and the deleting of files) on a read-only file system like a CD-ROM by mounting a local writable file system on top of the read-only one. Iconic behavior honestly. See mount_union(8) for details ๐Ÿ‘‘
  • file-system CODA โ€” [EXPERIMENTAL] ๐Ÿงช includes the code for the Coda file system. Coda is a distributed file system like NFS and AFS. It's freely available, like NFS, but it functions much like AFS in being a โ€œstatefulโ€ file system. Both Coda and AFS cache files on your local machine to improve performance. Then Coda goes a step further than AFS by letting you access the cached files when there is no available network, viz. disconnected laptops and network outages. In Coda, both the client and server are outside the kernel which makes them easier to experiment with. Coda is available for several UNIX and non-UNIX platforms. See http://www.coda.cs.cmu.edu for more details.
NOTE: you also need to enable the pseudo-device, vcoda, for the Coda file system to work. Don't forget, or you'll be sad ๐Ÿ˜ญ
  • file-system PTYFS โ€” a special file system (normally mounted on /dev/pts) where pseudo-terminal slave devices become visible in the file system. mount_ptyfs(8) for the deets ๐Ÿ’œ
  • file-system TMPFS โ€” the efficient memory file system, normally used over /tmp. Literally so fast. See mount_tmpfs(8) โญ
  • file-system PUFFS โ€” kernel support for the pass-to-userspace framework file system. It can be used to implement file system functionality in userspace. puffs(3) for more details. This enables for example sshfs: mount_psshfs(8). Userspace file systems?? We love to see it ๐ŸŒˆ

๐ŸŽ€ File System Options ๐ŸŽ€

  • options DISKLABEL_EI โ€” enables โ€œEndian-Independentโ€ disklabel(5) support. This allows a system to recognize a disklabel written in the other byte order. As for writing: when a label already exists, its byte order is preserved. Otherwise, a new label is written in the native byte order. To specify the byte order explicitly, the -F option of disklabel(8) should be used with the -B option in order to avoid using ioctl(2), which results in the default behavior explained above. At the moment this option is restricted to the following ports: amd64, bebox, emips, epoc32, evbarm, i386, ibmnws, landisk, mvmeppc, prep, rs6000, sandpoint, xen, and zaurus; also to machines of the evbmips and evbppc ports that support Master Boot Record (MBR). So check your port before you get your hopes up ๐Ÿฆ‹
  • options MAGICLINKS โ€” enables the expansion of special strings (beginning with โ€œ@โ€) when traversing symbolic links. See symlink(7) for a list of supported strings. Note that this option only controls the enabling of this feature by the kernel at boot-up โ€” the feature can still be manipulated with the sysctl(8) command regardless of the setting of this option. So it's not the final boss, iykyk โœจ
  • options NFSSERVER โ€” includes the server side of the NFS (Network File System) remote file sharing protocol. Although the bulk of the code implementing NFS is kernel based, several user level daemons are needed for it to work. See mountd(8) and nfsd(8) for details ๐Ÿซถ
  • options NVNODE=integer โ€” this option sets the size of the cache used by the name-to-inode translation routines, (a.k.a. the namei() cache, though called by many other names in the kernel source). By default, this cache has (NPROC + NTEXT + 100) entries (NPROC set as 20 + 16 * MAXUSERS and NTEXT as 80 + NPROC / 8). A reasonable way to derive a value of NVNODE, should you notice a large number of namei cache misses with a tool such as systat(1), is to examine your system's current computed value with sysctl(8), (which calls this parameter "kern.maxvnodes") and to increase this value until either the namei cache hit rate improves or it is determined that your system does not benefit substantially from an increase in the size of the namei cache. Basically: measure first, then vibe ๐Ÿ“
  • options NAMECACHE_ENTER_REVERSE โ€” causes the namei cache to always enter a reverse mapping (vnode -> name) as well as a normal one. Normally, this is already done for directory vnodes, to speed up the getcwd operation. This option will cause longer hash chains in the reverse cache, and thus slow down getcwd somewhat. However, it does make vnode -> path translations possible in some cases. For now, only useful if strict /proc/#/maps emulation for Linux binaries is required. Trade-offs, bestie, trade-offs ๐Ÿ’€

๐ŸŒธ Options for FFS/UFS File Systems ๐ŸŒธ

  • options APPLE_UFS โ€” enable support for UFS file systems created on Mac OS X ๐ŸŽ (yes, that Mac OS X)
  • options FFS_EI โ€” enable โ€œEndian-Independentโ€ FFS support. This allows a system to mount an FFS file system created for another architecture, at a small performance cost for all FFS file systems. See also newfs(8), fsck_ffs(8), dumpfs(8) for file system byte order status and manipulation. Small tax, big convenience โœจ
  • options FFS_NO_SNAPSHOT โ€” disable support for the creation of file system internal snapshot of FFS file systems. Maybe useful for install media kernels, small memory systems and embedded systems which don't require the snapshot support. It's giving "we simply don't need that here" ๐Ÿ™ˆ
  • options QUOTA โ€” enables kernel support for traditional quotas in FFS. Traditional quotas store the quota information in external files and require quotacheck(8) and quotaon(8) at boot time. Traditional quotas are limited to 32-bit sizes and are at this point considered a legacy feature. Legacy! You've been warned ๐Ÿ’…
  • options QUOTA2 โ€” enables kernel support for in-volume quotas in FFS. The quota information is file system metadata maintained by fsck(8) and/or WAPBL journaling. MFS volumes can also use QUOTA2 quotas; see mount_mfs(8) for more information. The upgrade era, we love her ๐Ÿ‘‘
  • options UFS_DIRHASH โ€” increase lookup performance by maintaining in-core hash tables for large directories. Faster lookups, no cap โšก
  • options UFS_EXTATTR โ€” enable extended attribute support for UFS1 file systems ๐ŸŽ€
  • options WAPBL โ€” enable โ€œWrite Ahead Physical Block Logging file system journalingโ€. This provides rapid file system consistency checking after a system outage. It also provides better general use performance over regular FFS. See also wapbl(4). Honestly? Iconic. Recovery queen behavior ๐Ÿ”ฅ

๐Ÿฆ‹ Options for the LFS File System ๐Ÿฆ‹

  • options LFS_EI โ€” enable โ€œEndian-Independentโ€ LFS support. This allows (at a small performance cost) mounting an LFS file system created for another architecture. Same deal as FFS, different letters ๐ŸŒˆ
  • options LFS_DIRHASH โ€” increase lookup performance by maintaining in-core hash tables for large directories. Big directory energy, handled ๐Ÿ’œ

๐Ÿ’– Options for the NFS File System ๐Ÿ’–

  • options NFS_BOOT_BOOTP โ€” enable use of the BOOTP protocol (RFCs 951 and 1048) to get configuration information if NFS is used to mount the root file system. See diskless(8) for details ๐Ÿซถ
  • options NFS_BOOT_BOOTSTATIC โ€” enable use of static values defined as โ€œNFS_BOOTSTATIC_MYIPโ€, โ€œNFS_BOOTSTATIC_GWIPโ€, โ€œNFS_BOOTSTATIC_SERVADDRโ€, and โ€œNFS_BOOTSTATIC_SERVERโ€ in kernel options to get configuration information if NFS is used to mount the root file system. Set it yourself, no protocol needed ๐Ÿ’…
  • options NFS_BOOT_DHCP โ€” same as โ€œNFS_BOOT_BOOTPโ€, but use the DHCP extensions to the BOOTP protocol (RFC 1541). A glow-up of the classic โœจ
  • options NFS_BOOT_BOOTP_REQFILE โ€” specifies the string sent in the bp_file field of the BOOTP/DHCP request packet. Very specific, very deliberate ๐ŸŽฏ
  • options NFS_BOOT_BOOTPARAM โ€” enable use of the BOOTPARAM protocol, consisting of RARP and BOOTPARAM RPC, to get configuration information if NFS is used to mount the root file system. See diskless(8) for details ๐ŸŒธ
  • options NFS_BOOT_RWSIZE=value โ€” set the initial NFS read and write sizes for diskless-boot requests. The normal default is 8Kbytes. This option provides a way to lower the value (e.g., to 1024 bytes) as a workaround for buggy network interface cards or boot PROMs. Once booted, the read and write request sizes can be increased by remounting the file system. See mount_nfs(8) for details. Workaround era ๐Ÿ˜ญ
  • options NFS_V2_ONLY โ€” reduce the size of the NFS client code by omitting code that's only required for NFSv3 and NQNFS support, leaving only that code required to use NFSv2 servers. Smaller kernel, fewer features, that's the deal ๐Ÿ“
  • options NFS_BOOT_UDP โ€” use NFS over UDP instead of the default TCP, for mounting root. TCP is the default, don't forget โญ

โญ Buffer queue strategy options โญ

The following options enable alternative buffer queue strategies. (Yes, that's really it โ€” the list is coming, hold on ๐Ÿ’€)

  • options BUFQ_READPRIO โ€” bestie, this one flips the whole disk I/O queue strategy. In the default setup, outstanding disk requests get sorted by sector number and yeeted to the disk, and nobody cares whether it's a read or a write. This option though? It gives reads priority over writes. So requests might go out out of sector order, which means more seeks and lower overall throughput โ€” but under heavy disk I/O load, interactive responsiveness can genuinely improve, because processes blocking on disk reads get serviced sooner (file writes usually don't make apps block, iykyk). The actual performance effect varies so much depending on the hardware, drive firmware, file system configuration, workload, and whatever trade-off you're going for. Systems using drive write-cache (most modern IDE disks, by default) are unlikely to benefit and may well suffer โ€” those disks acknowledge writes super fast and optimize them internally based on physical layout. Giving those disks as many requests to work with as possible (the standard strategy) will typically give the best results, especially if the drive has a big cache; the drive will silently complete writes from cache while it seeks for reads. Disks that support a large number of concurrent tagged requests (SCSI disks and many hardware RAID controllers) expose this internal scheduling with tagged responses, and don't block for reads โ€” those disks might not see a noticeable difference either way. BUT: if IDE disks are run with write-cache disabled for safety, writes aren't acknowledged until actually completed, and only one request can be outstanding; a large number of small writes in one locality can keep the disk busy, starving reads elsewhere on the disk. Those systems are likely to see the most benefit from this option. Finally, the performance interaction of this option with ffs soft dependencies can be subtle, since that mechanism can drastically alter the workload for file system metadata writes. ๐Ÿ’…
  • options BUFQ_PRIOCSCAN โ€” enables another buffer queue strategy for disk I/O: per-priority cyclical scan. Slay.
  • options NEW_BUFQ_STRATEGY โ€” literally just a synonym of BUFQ_READPRIO. Same vibe, different name. โœจ

๐ŸŽ€ Miscellaneous Options ๐ŸŽ€

  • options CPU_UCODE โ€” supports cpu microcode loading via cpuctl(8).
  • options MEMORY_DISK_DYNAMIC โ€” makes the md(4) RAM disk size dynamically sized. Heads up though: it is incompatible with mdsetimage(8). ๐Ÿ’€
  • options MEMORY_DISK_HOOKS โ€” lets some machine dependent functions get called when the md(4) RAM disk driver is configured. Which can result in automatically loading a RAM disk from floppy on open (among other things). Cute, right?
  • options MEMORY_DISK_IS_ROOT โ€” forces the md(4) RAM disk to be the root device. This can only be overridden when the kernel is booted in the 'ask-for-root' mode.
  • options MEMORY_DISK_ROOT_SIZE=integer โ€” allocates the given number of 512 byte blocks as memory for the md(4) RAM disk, to be populated with mdsetimage(8).
  • options MEMORY_DISK_SERVER=0 โ€” do not include the interface to a userland memory disk server process. Per default, this option is set to 1, including the support code. Useful for install media kernels. ๐Ÿงš
  • options MEMORY_DISK_RBFLAGS=value โ€” sets the reboot(2) flags used when booting with a memory disk as root file system. Possible values include RB_AUTOBOOT (boot in the usual fashion โ€” that's the default value) and RB_SINGLE (boot in single-user mode).
  • options MODULAR โ€” enables the framework for kernel modules (see module(7)).
  • options MODULAR_DEFAULT_AUTOLOAD โ€” enables autoloading of kernel modules by default. This sets the default value of the kern.module.autoload sysctl(3) variable, which may be changed at run time.
  • options MODULAR_DEFAULT_VERBOSE โ€” enables verbose debug messages of kernel modules by default. This sets the default value of the kern.module.verbose sysctl(3) variable, which may be changed at run time.
  • options VND_COMPRESSION โ€” enables the vnd(4) driver to also handle compressed images. See vndcompress(1), vnd(4) and vnconfig(8) for more info. ๐Ÿซถ
  • options SELFRELOC โ€” makes the kernel able to self relocate at bootstrap, so it can run whatever its load address is. Intended to be used with the reloc bootstrap command documented in x86/boot(8), to workaround UEFI bugs โ€” and it's only available on amd64.
  • options SPLDEBUG โ€” helps the kernel programmer find bugs related to the interrupt priority level. When spllower() or splraise() changes the current CPU's interrupt priority level to or from IPL_HIGH, it records a backtrace. Read i386/return_address(9) for caveats about collecting backtraces. This feature is experimental, and it's only available on i386. See sys/kern/subr_spldebug.c.
  • options TFTPROOT โ€” downloads the root memory disk through TFTP at root mount time. This enables the use of a root RAM disk without requiring it to be embedded in the kernel using mdsetimage(8). The RAM disk name is obtained using DHCP's filename parameter. This option requires MEMORY_DISK_HOOKS and MEMORY_DISK_DYNAMIC, and it is incompatible with MEMORY_DISK_ROOT_SIZE. ๐Ÿ˜ญ
  • options HEARTBEAT โ€” turns on heartbeat checks to panic if any CPU in the system or the timecounter appears stuck.

Each CPU will periodically check in hard interrupt context that the timecounter has advanced and soft interrupts have run on the current CPU, and each CPU will also be periodically checked for progress by another CPU.

If a CPU detects no progress has been made after HEARTBEAT_MAX_PERIOD seconds, NetBSD will panic, giving the opportunity to enter ddb or get a crash dump even if the system has become totally unresponsive to keyboard input. ๐Ÿ”ฅ

This is different from a hardware watchdog timer (wdogctl(8)):

  • options HEARTBEAT is purely a software mechanism, so if hard interrupts are stuck on all CPUs, then options HEARTBEAT cannot trigger โ€” but a hardware watchdog timer can.
  • A hardware watchdog timer won't notice if a single CPU is stuck, or if the system timecounter is stuck, as long as at least one CPU is not stuck and able to run wdogctl(8) or the kernel watchdog tickle thread. In contrast, options HEARTBEAT uses hard interrupts on each CPU to cross-check soft interrupt progress on another CPU as well as the timecounter, so it can detect when a single CPU is unable to make progress when others are able. ๐Ÿ‘‘
  • options HEARTBEAT_MAX_PERIOD_DEFAULT=integer โ€” time in seconds since the last options HEARTBEAT progress check has passed before it will trigger a panic. Default: 15.

Can be changed at runtime via the kern.heartbeat.max_period sysctl(7) knob.

  • options HZ=integer โ€” on ports that support it, sets the system clock frequency (see hz(9)) to the supplied value. Handle with care, bestie. โš ๏ธ
  • options NTP โ€” turns on in-kernel precision timekeeping support used by software implementing NTP (Network Time Protocol, RFC 1305). The NTP option adds an in-kernel Phase-Locked Loop (PLL) for normal NTP operation, and a Frequency-Locked Loop (FLL) for intermittently-connected operation. ntpd(8) will employ a user-level PLL when kernel support is unavailable, but the in-kernel version has lower latency and more precision, so it typically keeps much better time. โญ

The interface to the kernel NTP support is provided by the ntp_adjtime(2) and ntp_gettime(2) system calls, which are intended for use by ntpd(8) and are enabled by the option. On systems with sub-microsecond resolution timers, or where (HZ/100000) is not an integer, the NTP option also enables extended-precision arithmetic to keep track of fractional clock ticks at NTP time-format precision.

  • options PPS_SYNC โ€” this option enables a kernel serial line discipline for receiving time phase signals from an external reference clock, like a radio clock. Some reference clocks generate a Pulse Per Second (PPS) signal in phase with their time source. The PPS line discipline receives this signal on either the data leads or the DCD control lead of a serial port. ๐ŸŒˆ

NTP uses the PPS signal to discipline the local clock oscillator to a high degree of precision (typically less than 50 microseconds in time and 0.1 ppm in accuracy). PPS can also generate a serial output pulse when the system receives a PPS interrupt. This can be used to measure the system interrupt latency and thus calibrate NTP to account for it. Using PPS usually requires a gadget box to convert from TTL to RS-232 signal levels. The gadget box and PPS are described in more detail in the HTML documentation for ntpd(8) in /usr/share/doc/reference/ref8/ntp.

NetBSD currently supports this option in com(4) and zsc(4).

NOTE: Using this option will also enable options NTP.
  • options SETUIDSCRIPTS โ€” allows scripts with the setuid bit set to execute as the effective user rather than the real user, just like binary executables. ๐Ÿฆ‹
NOTE: Using this option will also enable options FDSCRIPTS
  • options FDSCRIPTS โ€” allows execution of scripts with the execute bit set, but not the read bit, by opening the file and passing the file descriptor to the shell, rather than the filename. ๐Ÿ’œ
NOTE: Execute only (non-readable) scripts will have argv[0] set to /dev/fd/*. What this option allows as far as security is concerned is the ability to safely ensure that the correct script is run by the interpreter, since it is passed as an already open file.
  • options RTC_OFFSET=integer โ€” okay so the kernel (and typically the hardware battery backed-up clock on those machines that have one) keeps time in UTC (Universal Coordinated Time, once known as GMT, or Greenwich Mean Time) and not in the time of the local time zone. The RTC_OFFSET option is used on some ports (such as the i386) to tell the kernel that the hardware clock is offset from UTC by the specified number of minutes. This is typically used when a machine boots several operating systems and one of them wants the hardware clock to run in the local time zone and not in UTC โ€” e.g. RTC_OFFSET=300 means the hardware clock is set to US Eastern Time (300 minutes behind UTC), and not UTC. (Note: RTC_OFFSET is used to initialize a kernel variable named rtc_offset, which is the source actually used to determine the clock offset, and which may be accessed via the kern.rtc_offset sysctl variable. See sysctl(8) and sysctl(3) for details. Since the kernel clock is initialized from the hardware clock very early in the boot process, it is not possible to meaningfully change rtc_offset in system initialization scripts. Changing this value currently may only be done at kernel compile time or by patching the kernel and rebooting.) ๐Ÿซ 
โš ๏ธ heads up bestie โš ๏ธ In so many cases where the hardware clock is kept in local time, it gets adjusted for Daylight Savings Time โ€” which means if you're trying to use RTC_OFFSET so NetBSD can coexist with an OS like Windows, you'd have to change RTC_OFFSET twice a year. So likeโ€ฆ this solution is imperfect. Not the slay we wanted. ๐Ÿ’€
  • options MAXUPRC=integer โ€” sets the soft RLIMIT_NPROC resource limit for process 0, aka the max number of simultaneous processes a user is allowed to run; this value gets inherited by its child processes. Default? CHILD_MAX, which is currently defined as 160. You literally are not permitted to set MAXUPRC lower than CHILD_MAX โ€” that would violate the semantics of ISO/IEC 9945-1:1990 ("POSIX.1") and we don't do that here. ๐Ÿ™…โ€โ™€๏ธ
  • options NOFILE=integer โ€” sets the soft RLIMIT_NOFILE resource limit, aka the max number of open file descriptors for each process; inherited by its child processes. It defaults to OPEN_MAX, currently defined as 128. ๐Ÿ—‚๏ธ
  • options MAXFILES=integer โ€” sets the default value of the kern.maxfiles sysctl variable, which is the max number of files that can be open in the system. โœจ
  • options DEFCORENAME=string โ€” sets the default value of the kern.defcorename sysctl variable, otherwise it's set to %n.core. Peep sysctl(8) and sysctl(3) for the deets. ๐Ÿซถ
  • options RASOPS_CLIPPING โ€” enables clipping within the rasops raster-console output system. NOTE: only available on architectures that use rasops for console output. ๐Ÿ–ฅ๏ธ
  • options RASOPS_SMALL โ€” removes optimized character writing code from the rasops raster-console output system. NOTE: only available on architectures that use rasops for console output. ๐Ÿ’…
  • options INCLUDE_CONFIG_FILE โ€” embeds the kernel config file used to define the kernel right into the kernel binary itself. The embedded data also includes any files directly included by the config file itself, e.g. GENERIC.local or std.$MACHINE. You can extract the embedded config file from the resulting kernel with config(1) -x, or by running this iconic little command:
strings netbsd | sed -n 's/^_CFG_//p' | unvis
  • options INCLUDE_JUST_CONFIG โ€” similar to the above option, but includes just the actual config file, not any of the included files. ๐ŸŽ€
  • options PIPE_SOCKETPAIR โ€” use the slower but smaller socketpair(2)-based pipe implementation instead of the default faster but bigger one. Primarily useful for installation kernels. โš–๏ธ
  • options USERCONF โ€” compiles in the in-kernel device configuration manager. See userconf(4) for the details. ๐Ÿงš
  • options SCDEBUG_DEFAULT โ€” used with the options SYSCALL_DEBUG described below to choose which types of events get displayed. ๐ŸŒˆ
    • SCDEBUG_CALLS โ€” show system call entry points.
    • SCDEBUG_RETURNS โ€” show system call exit points.
    • SCDEBUG_ALL โ€” show all system call requests, including unimplemented calls.
    • SCDEBUG_SHOWARGS โ€” show the arguments provided.
    • SCDEBUG_KERNHIST โ€” store a restricted form of the system call debug in a kernel history instead of printing it to the console. This option relies upon options KERNHIST.

The default value is (SCDEBUG_CALLS|SCDEBUG_RETURNS|SCDEBUG_SHOWARGS).

  • options SYSCALL_DEBUG โ€” useful for debugging system call issues, usually in early single user bringup. By default it writes entries to the system console for most system call events. Can be configured with the options SCDEBUG_DEFAULT option to use the options KERNHIST facility instead. ๐Ÿ”
  • options SYSCALL_STATS โ€” counts the number of times each system call number is called. The values can be read through the sysctl interface and displayed using systat(1). NOTE: not yet available on all architectures. ๐Ÿ“Š
  • options SYSCALL_TIMES โ€” counts the time spent (using cpu_counter32()) in each system call. NOTE: using this option will also enable options SYSCALL_STATS. โฑ๏ธ
  • options SYSCALL_TIMES_HASCOUNTER โ€” forces use of cpu_counter32() even if cpu_hascounter() reports false. Useful for systems where the cycle counter doesn't run at a constant rate (e.g. Soekris boxes). ๐Ÿ”ฅ
  • options XSERVER_DDB โ€” a supplement to XSERVER that adds support for entering ddb(4) while in X11. ๐Ÿ‘‘
  • options FILEASSOC โ€” support for fileassoc(9). Required for options PAX_SEGVGUARD and pseudo-device veriexec. ๐Ÿ”—
  • options FILEASSOC_NHOOKS=integer โ€” number of storage slots per file for fileassoc(9). Default is 4. ๐Ÿ—„๏ธ

๐ŸŒ Networking Options ๐ŸŒ

  • options GATEWAY โ€” enables IPFORWARDING and (on most ports) increases the size of NMBCLUSTERS. In general, GATEWAY is what you use to say "this system should act as a router," and IPFORWARDING is not invoked directly. (Note that GATEWAY has no impact on protocols other than IP.) GATEWAY also compiles IPv4 and IPv6 fast forwarding code into the kernel. ๐Ÿ›ฐ๏ธ
  • options IPFORWARDING=value โ€” if value is 1 this enables IP routing behavior. If value is 0 (the default), it disables it. The GATEWAY option sets this to 1 automatically. With this option enabled, the machine will forward IP datagrams destined for other machines between its interfaces.
Careful, bestie ๐Ÿ’€ Even without this option, the kernel will still forward some packets (such as source routed packets) โ€” removing GATEWAY and IPFORWARDING is insufficient to stop all routing through a bastion host on a firewall โ€” source routing is controlled independently.

Note that IP forwarding may be turned on and off independently of the setting of the IPFORWARDING option through the use of the net.inet.ip.forwarding sysctl variable. If net.inet.ip.forwarding is 1, IP forwarding is on. See sysctl(8) and sysctl(3) for details. ๐ŸŽš๏ธ

  • options IFA_STATS โ€” tells the kernel to maintain per-address statistics on bytes sent and received over (currently) Internet and AppleTalk addresses. Not recommended โ€” it degrades system stability. ๐Ÿ™ˆ
  • options IFQ_MAXLEN=value โ€” increases the allowed size of the network interface packet queues. The default queue size is 50 packets, and you don't normally need to increase it. ๐Ÿ“ฆ
  • options IPSELSRC โ€” includes support for source-address selection policies. See in_getifa(9). ๐ŸŽฏ
  • options MROUTING โ€” includes support for IP multicast routers. You certainly want INET with this. Multicast routing is controlled by the mrouted(8) daemon. See also option PIM. ๐ŸŒณ
  • options PIM โ€” includes support for Protocol Independent Multicast (PIM) routing. You need MROUTING and INET with this. Software using this can be found e.g. in pkgsrc/net/xorp. ๐ŸŒฟ
  • options INET โ€” includes support for the TCP/IP protocol stack. You almost certainly want this. See inet(4) for details. ๐Ÿฅ‡
  • options INET6 โ€” includes support for the IPv6 protocol stack. See inet6(4) for details. Unlike INET, INET6 enables multicast routing code as well. This option requires INET at this moment, but it should not. ๐Ÿ˜ญ
  • options ND6_DEBUG โ€” this option sets the default value of net.inet6.icmp6.nd6_debug to 1, for debugging IPv6 neighbor discovery protocol handling. See sysctl(3) for details. ๐Ÿ›
  • options IPSEC โ€” includes support for the IPsec protocol, using the implementation derived from OpenBSD, relying on opencrypto(9) to carry out cryptographic operations. See ipsec(4) for details. ๐Ÿ”
  • options IPSEC_DEBUG โ€” enables debugging code in the IPsec stack. See ipsec(4) for details.
Patent tea โ˜• The IPSEC option includes support for IPsec Network Address Translator traversal (NAT-T), as described in RFCs 3947 and 3948. This feature might be patent-encumbered in some countries. ๐Ÿ˜ฌ
  • options ALTQ โ€” enables ALTQ (Alternate Queueing). For simple rate-limiting, use tbrconfig(8) to set up the interface transmission rate. To use queueing disciplines, their appropriate kernel options should also be defined (documented below). Queueing disciplines are managed by altqd(8). See altq(9) for details. ๐Ÿšฆ
  • options ALTQ_HFSC โ€” include support for the ALTQ-implemented HFSC (Hierarchical Fair Service Curve) module. HFSC supports both link-sharing and guaranteed real-time services. HFSC employs a service curve based QoS model, and its unique feature is an ability to decouple delay and bandwidth allocation. Requires ALTQ_RED to use the RED queueing discipline on HFSC classes, or ALTQ_RIO to use the RIO queueing discipline on HFSC classes. This option assumes ALTQ. ๐Ÿ“ˆ
  • options ALTQ_PRIQ โ€” include support for ALTQ-implemented PRIQ (Priority Queueing). PRIQ implements a simple priority-based queueing discipline. A higher priority class is always served first. Requires ALTQ_RED to use the RED queueing discipline on HFSC classes, or ALTQ_RIO to use the RIO queueing discipline on HFSC classes. This option assumes ALTQ. ๐Ÿ†
  • options ALTQ_WFQ โ€” include support for ALTQ-implemented WFQ (Weighted Fair Queueing). WFQ implements a weighted-round robin scheduler for a set of queues. A weight can be assigned to each queue to give a different proportion of the link capacity. A hash function is used to map a flow to one of a set of queues. This option assumes ALTQ. โš–๏ธ
  • options ALTQ_FIFOQ โ€” include support for ALTQ-implemented FIFO queueing. FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline. This option assumes ALTQ. ๐Ÿšถโ€โ™€๏ธ
  • options ALTQ_RIO โ€” include support for ALTQ-implemented RIO (RED with In/Out). The original RIO has 2 sets of RED parameters; one for in-profile packets and the other for out-of-profile packets. At the ingress of the network, profile meters tag packets as IN or OUT based on contracted profiles for customers. Inside the network, IN packets receive preferential treatment by the RIO dropper. ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding PHB of DiffServ (RFC 2597). This option assumes ALTQ. ๐ŸŽญ
  • options ALTQ_BLUE โ€” include support for ALTQ-implemented Blue buffer management. Blue is another active buffer management mechanism. This option assumes ALTQ. ๐Ÿ’™
  • options ALTQ_FLOWVALVE โ€” include support for ALTQ-implemented Flowvalve. Flowvalve is a simple implementation of a RED penalty box that identifies and punishes misbehaving flows. This option requires ALTQ_RED and assumes ALTQ. ๐Ÿšจ
  • options ALTQ_CDNR โ€” include support for ALTQ-implemented CDNR (diffserv traffic conditioner) packet marking/manipulation. Traffic conditioners are components to meter, mark, or drop incoming packets according to some rules. As opposed to queueing disciplines, traffic conditioners handle incoming packets at an input interface. This option assumes ALTQ. ๐ŸŽจ
  • options ALTQ_NOPCC โ€” okay so this one straight-up disables using the processor cycle counter to measure time in ALTQ. Bestie, you only define this if you're on a non-Pentium i386 CPU that doesn't have TSC, or SMP (because per-CPU counters are not in sync), or power management that messes with the processor cycle counter. This option assumes ALTQ. ๐Ÿ’…
  • options ALTQ_IPSEC โ€” Include support for IPsec in IPv4 ALTQ. This option assumes ALTQ. โœจ
  • options ALTQ_JOBS โ€” Include support for ALTQ-implemented JoBS (Joint Buffer Management and Scheduling). This option assumes ALTQ.
  • options ALTQ_AFMAP โ€” Include support for an undocumented ALTQ feature that is used to map an IP flow to an ATM VC (Virtual Circuit). This option assumes ALTQ.
  • options ALTQ_LOCALQ โ€” Include support for ALTQ-implemented local queues. Ngl its practical use is undefined. Assumes ALTQ. ๐Ÿ™ˆ
  • options SUBNETSARELOCAL โ€” Sets default value for net.inet.ip.subnetsarelocal variable, which controls whether non-directly-connected subnets of connected networks are considered "local" for purposes of choosing the MSS for a TCP connection. This is mostly present for historic reasons and completely irrelevant if you enable Path MTU discovery.
  • options HOSTZEROBROADCAST โ€” Sets default value for net.inet.ip.hostzerobroadcast variable, which controls whether the zeroth host address of each connected subnet is also considered a broadcast address. Default value is "1", for compatibility with old systems; if this is set to zero on all hosts on a subnet, you should be able to fit an extra host per subnet on the ".0" address. ๐ŸŽ€
  • options MCLSHIFT=value โ€” This option is the base-2 logarithm of the size of mbuf clusters. The BSD networking stack keeps network packets in a linked list, or chain, of kernel buffer objects called mbufs. The system provides larger mbuf clusters as an optimization for large packets, instead of using long chains for large packets. The mbuf cluster size, or MCLBYTES, must be a power of two, and is computed as two raised to the power MCLSHIFT. On systems with Ethernet network adapters, MCLSHIFT is often set to 11, giving 2048-byte mbuf clusters, large enough to hold a 1500-byte Ethernet frame in a single cluster. Systems with network interfaces supporting larger frame sizes like ATM, FDDI, or HIPPI may perform better with MCLSHIFT set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes, respectively. ๐ŸŒธ
  • options NETATALK โ€” Include support for the AppleTalk protocol stack. The kernel provides provision for the Datagram Delivery Protocol (DDP), providing SOCK_DGRAM support and AppleTalk routing. This stack is used by the NETATALK package, which adds support for AppleTalk server services via user libraries and applications.
  • options BLUETOOTH โ€” Include support for the Bluetooth protocol stack. See bluetooth(4) for details. ๐Ÿฆ‹
  • options IPNOPRIVPORTS โ€” Normally, only root can bind a socket descriptor to a so-called โ€œprivilegedโ€ TCP port, that is, a port number in the range 0-1023. This option eliminates those checks from the kernel. This can be useful if there is a desire to allow daemons without privileges to bind those ports, e.g., on firewalls. The security tradeoffs in doing this are subtle. This option should only be used by experts. ๐Ÿ’€
  • options TCP_DEBUG โ€” Record the last TCP_NDEBUG TCP packets with SO_DEBUG set, and decode to the console if tcpconsdebug is set.
  • options TCP_NDEBUG โ€” Number of packets to record for TCP_DEBUG. Defaults to 100. โœจ
  • options TCP_SENDSPACE=value
  • options TCP_RECVSPACE=value

These options set the max TCP window size to other sizes than the default. The TCP window sizes can be altered via sysctl(8) as well. ๐Ÿซถ

  • options TCP_INIT_WIN=value โ€” This option sets the initial TCP window size for non-local connections, which is used when the transmission starts. The default size is 1, but if the machine should act more aggressively, the initial size can be set to some other value. The initial TCP window size can be set via sysctl(8) as well.
  • options TCP_SIGNATURE โ€” Enable MD5 TCP signatures (RFC 2385) to protect BGP sessions. ๐Ÿ”ฅ
  • options IPFILTER_LOG โ€” This option, in conjunction with pseudo-device ipfilter, enables logging of IP packets using IP-Filter.
  • options IPFILTER_LOOKUP โ€” This option enables the IP-Filter ippool(8) functionality to be enabled.
  • options IPFILTER_COMPAT โ€” This option enables older IP-Filter binaries to work.
  • options IPFILTER_DEFAULT_BLOCK โ€” This option sets the default policy of IP-Filter. If it is set, IP-Filter will block packets by default.
  • options MBUFTRACE โ€” This option can help track down mbuf leaks. When enabled, mbufs are tagged with the devices and protocols using them. This can significantly decrease network performance, particularly on MP systems. This additional information can be viewed with netstat(1):
netstat -mssv

Not all devices or protocols support this option. ๐Ÿ˜ญ


  • options SYSCTL_DISALLOW_CREATE โ€” Disallows the creation or deletion of nodes from the sysctl tree, as well as the assigning of descriptions to nodes that lack them, by any process. These operations are still available to kernel sub-systems, including loadable kernel modules.
  • options SYSCTL_DISALLOW_KWRITE โ€” Prevents processes from adding nodes to the sysctl tree that make existing kernel memory areas writable. Sections of kernel memory can still be read and new nodes that own their own data may still be writable.
  • options SYSCTL_DEBUG_SETUP โ€” Causes the SYSCTL_SETUP routines to print a brief message when they are invoked. This is merely meant as an aid in determining the order in which sections of the tree are created.
  • options SYSCTL_DEBUG_CREATE โ€” Prints a message each time sysctl_create(), the function that adds nodes to the tree, is called.
  • options SYSCTL_INCLUDE_DESCR โ€” Causes the kernel to include short, human readable descriptions for nodes in the sysctl tree. The descriptions can be retrieved programmatically (see sysctl(3)), or by the sysctl binary itself (see sysctl(8)). The descriptions are meant to give an indication of the purpose and/or effects of a given node's value, not replace the documentation for the given subsystem as a whole. ๐Ÿ‘‘

๐ŸŒˆ System V IPC Options ๐ŸŒˆ

  • options SYSVMSG โ€” Includes support for AT&T System V UNIX style message queues. See msgctl(2), msgget(2), msgrcv(2), msgsnd(2). ๐Ÿ’Œ
  • options SYSVSEM โ€” Includes support for AT&T System V UNIX style semaphores. See semctl(2), semget(2), semop(2).
  • options SEMMNI=value โ€” Sets the number of AT&T System V UNIX style semaphore identifiers. The GENERIC config file for your port will have the default.
  • options SEMMNS=value โ€” Sets the number of AT&T System V UNIX style semaphores in the system. The GENERIC config file for your port will have the default.
  • options SEMUME=value โ€” Sets the maximum number of undo entries per process for AT&T System V UNIX style semaphores. The GENERIC config file for your port will have the default.
  • options SEMMNU=value โ€” Sets the number of undo structures in the system for AT&T System V UNIX style semaphores. The GENERIC config file for your port will have the default.
  • options SYSVSHM โ€” Includes support for AT&T System V UNIX style shared memory. See shmat(2), shmctl(2), shmdt(2), shmget(2). ๐Ÿ“
  • options SHMMAXPGS=value โ€” Sets the maximum number of AT&T System V UNIX style shared memory pages that are available through the shmget(2) system call. Default value is 1024 on most ports. See /usr/include/machine/vmparam.h for the default.

  • options NMBCLUSTERS=value โ€” The number of mbuf clusters the kernel supports. Mbuf clusters are MCLBYTES in size (usually 2k). The default value is calculated from the amount of physical memory. Architectures without direct mapping also limit it based on the kmem_map size, which is used as backing store. Some archs limit the value with โ€˜NMBCLUSTERS_MAXโ€™. See /usr/include/machine/param.h for those archs. This value can be accessed via the kern.mbuf.nmbclusters sysctl variable. Increase this value if you get โ€œmclpool limit reachedโ€ messages. ๐Ÿ”ฅ
  • options NMBCLUSTERS_MAX=value โ€” The upper limit of NMBCLUSTERS. โญ
  • options NKMEMPAGES=value
  • options NKMEMPAGES_MIN=value
  • options NKMEMPAGES_MAX=value

Size of kernel VM map kmem_map, in PAGE_SIZE-sized chunks (the VM page size; this value may be read from the sysctl(8) variable hw.pagesize). This VM map is used to map the kernel malloc arena. The kernel attempts to auto-size this map based on the amount of physical memory in the system. Platform-specific code may place bounds on this computed size, which may be viewed with the sysctl(8) variable vm.nkmempages. See /usr/include/machine/param.h for the default upper and lower bounds. The related options โ€˜NKMEMPAGES_MINโ€™ and โ€˜NKMEMPAGES_MAXโ€™ allow the bounds to be overridden in the kernel configuration file. These options are provided in the event the computed value is insufficient resulting in an โ€œout of space in kmem_mapโ€ panic. ๐Ÿ˜ญ

  • options SB_MAX=value โ€” Sets the max size in bytes that a socket buffer is allowed to occupy. The default is 256k, but sometimes it needs to be increased, for example when using large TCP windows. This option can be changed via sysctl(8) as well.
  • options SOMAXKVA=value โ€” Sets the maximum size of kernel virtual memory that the socket buffers are allowed to use. The default is 16MB, but in situations where for example large TCP windows are used this value must also be increased. This option can be changed via sysctl(8) as well. ๐Ÿงš
  • options BUFCACHE=value โ€” Size of the buffer cache as a percentage of total available RAM. Ignored if BUFPAGES is also specified.
  • options NBUF=value โ€” Sets the number of buffer headers available, i.e., the number of open files that may have a buffer cache entry. Each buffer header requires MAXBSIZE (machine dependent, but usually 65536) bytes. The default value is machine dependent, but is usually equal to the value of BUFPAGES.
  • options BUFPAGES=value โ€” These options set the number of pages available for the buffer cache. Their default value is a machine dependent value, often calculated as between 5% and 10% of total available RAM. ๐ŸŽ€
  • options MAXTSIZ=bytes โ€” Sets the maximum size limit of a process' text segment. See /usr/include/machine/vmparam.h for the port-specific default.
  • options DFLDSIZ=bytes โ€” Sets the default size limit of a process' data segment, the value that will be returned as the soft limit for RLIMIT_DATA (as returned by getrlimit(2)). See /usr/include/machine/vmparam.h for the port-specific default. ๐Ÿ’–
  • options MAXDSIZ=bytes โ€” this sets the absolute max size limit of a process' data segment, aka the value that gets handed back as the hard limit for RLIMIT_DATA (as returned by getrlimit(2)). Wanna know your port's default? Peek at /usr/include/machine/vmparam.h โœจ
  • options DFLSSIZ=bytes โ€” sets the default size limit of a process' stack segment, the value returned as the soft limit for RLIMIT_STACK (as returned by getrlimit(2)). Port-specific default lives in /usr/include/machine/vmparam.h ๐Ÿ’–
  • options MAXSSIZ=bytes โ€” sets the maximum size limit of a process' stack segment, returned as the hard limit for RLIMIT_STACK (as returned by getrlimit(2)). Again: /usr/include/machine/vmparam.h for the port-specific default ๐ŸŽ€
  • options DUMP_ON_PANIC=integer โ€” defaults to one. Set it to zero and the kernel will not dump to the dump device when it panics โ€” though ngl you can still force a dump via ddb(4) with the sync command. Heads up: this sets the value of the kern.dump_on_panic sysctl(3) variable, which can be changed at run time โ€” check sysctl(8) for the deets ๐Ÿ’…
  • options VMSWAP โ€” enables paging device/file support. It's on by default, bestie, nothing to do here ๐Ÿซถ
  • options VMSWAP_DEFAULT_PLAINTEXT โ€” stores swap in plaintext instead of encrypted, which can expose secrets if the underlying nonvolatile medium gets disclosed ๐Ÿ˜ญ This one is off by default; it exists only for extremely slow machines where the perf hit of swapping early at boot outweighs the security risks. Swap encryption can still be flipped on dynamically with the vm.swap_encrypt sysctl(7) knob.
  • options PDPOLICY_CLOCKPRO โ€” use CLOCK-Pro, an alternative page replace policy ๐Ÿ‘‘

๐Ÿ”’ Security Options ๐Ÿ”’

  • options INSECURE โ€” initializes the kernel security level with -1 instead of 0. So the system always starts in secure level -1 mode, even when running multiuser โ€” unless the securelevel variable is set to a value > -1 in /etc/rc.conf. In that case the kernel security level gets raised to that value when the /etc/rc.d/securelevel script runs during system startup. See the manual page for init(8) for what that actually implies, because it's a lot ๐Ÿ˜ณ The kernel secure level may be manipulated by the superuser by altering the kern.securelevel sysctl(3) variable (and fr, the secure level may only be lowered by a call from process ID 1, i.e., init(8)). See also secmodel_securelevel(9), sysctl(8) and sysctl(3).
  • options VERIFIED_EXEC_FP_SHA256 โ€” enables support for SHA256 hashes in Veriexec โœจ
  • options VERIFIED_EXEC_FP_SHA384 โ€” enables support for SHA384 hashes in Veriexec โœจ
  • options VERIFIED_EXEC_FP_SHA512 โ€” enables support for SHA512 hashes in Veriexec โœจ
  • options PAX_MPROTECT=value โ€” enables PaX MPROTECT, the mprotect(2) restrictions from the PaX project ๐Ÿ›ก๏ธ

The value is the default value for the global knob, see sysctl(3). If 0, PaX MPROTECT is enabled only if explicitly set on programs using paxctl(8). If 1, PaX MPROTECT is enabled for all programs. Programs can be exempted using paxctl(8).

See security(7) for more details.

  • options PAX_SEGVGUARD=value โ€” enables PaX Segvguard. Requires options FILEASSOC โš ๏ธ

The value is the default value for the global knob, see sysctl(3). If 0, PaX Segvguard is enabled only if explicitly set on programs using paxctl(8). If 1, PaX Segvguard is enabled to all programs, and exemption can be done using paxctl(8).

See security(7) for more details.

  • options PAX_ASLR=value โ€” enables PaX ASLR ๐ŸŽฒ

The value is the default value for the global knob, see sysctl(3). If 0, PaX ASLR is enabled only if explicitly set on programs using paxctl(8). If 1, PaX ASLR is enabled to all programs, and exemption can be done using paxctl(8).

See security(7) for more details.

  • options USER_VA0_DISABLE_DEFAULT=value โ€” sets the initial value of the flag controlling whether user programs can map virtual address 0. The flag can be changed at runtime by sysctl(3) ๐Ÿ’ซ
  • options KASAN โ€” enables Kernel Address Sanitizer. NOTE: not available on all architectures ๐Ÿ™ˆ
  • options KASLR โ€” enables Kernel ASLR. This randomizes where the kernel image sits in memory ๐ŸŒˆ NOTE: not available on all architectures.
  • options SVS โ€” enables Separate Virtual Space. On architectures designed to function with a shared address space, this option explicitly isolates the kernel and user spaces. NOTE: not available on all architectures ๐Ÿฆ‹

๐Ÿงš amiga-specific Options ๐Ÿงš

  • options BB060STUPIDROM โ€” when the bootloader (which passes AmigaOS ROM info) claims we have a 68060 CPU without an FPU, this goes and looks into the Processor Configuration Register (PCR) to find out. You need this with Amiga ROMs up to (at least) V40.xxx (OS3.1), when you boot via the bootblocks and don't have a DraCo ๐Ÿ’€
  • options IOBZCLOCK=frequency โ€” IOBlix boards come with two different serial master clocks: older ones use 24 MHz, newer ones use 22.1184 MHz. The driver normally assumes the latter. If your board uses 24 MHz, you can recompile your kernel with options IOBZCLOCK=24000000 or patch the kernel variable iobzclock to the same value ๐Ÿ•ฐ๏ธ
  • options LIMITMEM=value โ€” if there, it limits the part of the first memory bank used by NetBSD to value megabytes. Default is unlimited ๐Ÿ“
  • options P5PPC68KBOARD โ€” adds special support for Phase5 mixed 68k+PPC boards. Currently this only affects rebooting from NetBSD and is only needed on 68040+PPC, not on 68060+PPC; without this, affected machines will hang after NetBSD has shut down and will only restart after a keyboard reset or a power cycle ๐Ÿ˜ญ

๐ŸŒธ atari-specific Options ๐ŸŒธ

  • options DISKLABEL_AHDI โ€” include support for AHDI (native Atari) disklabels ๐Ÿ’พ
  • options DISKLABEL_NBDA โ€” include support for NetBSD/atari labels. If you don't set this option, it'll be set automatically. NetBSD/atari will not work without it โš ๏ธ
  • options FALCON_SCSI โ€” include support for the 5380-SCSI configuration as found on the Falcon.
  • options RELOC_KERNEL โ€” if set, the kernel relocates itself to TT-RAM, if possible. This gives you a slightly faster system โœจ Beware that on some TT030 systems, the system will frequently dump with MMU-faults with this option enabled ๐Ÿ’€
  • options SERCONSOLE โ€” allows the modem1-port to act as the system-console. A carrier should be active on modem1 during system boot to activate the console functionality ๐Ÿ“ก
  • options TT_SCSI โ€” include support for the 5380-SCSI configuration as found on the TT030 and Hades.

๐Ÿ’œ i386-specific Options ๐Ÿ’œ

  • options CPURESET_DELAY=value โ€” specifies the time (in millisecond) to wait before doing a hardware reset in the last phase of a reboot. Gives the user a chance to actually see the error messages from the shutdown operations (like NFS unmounts, buffer cache flush, etc ...). Setting this to 0 disables the delay. Default is 2 seconds โฑ๏ธ
  • options USER_LDT โ€” includes i386-specific system calls for modifying the local descriptor table, used by Windows emulators ๐ŸชŸ
  • options PAE โ€” enables PAE (Physical Address Extension) mode. PAE permits up to 36 bits physical addressing (64GB of physical memory), and turns physical addresses into 64-bit entities in the memory management subsystem. Userland virtual address space stays at 32 bits (4GB). PAE mode is required to enable the NX/XD (No-eXecute/eXecute Disable) bit for pages, which lets you mark certain ones as not executable. Any attempt to execute code from such a page will raise an exception ๐Ÿ”ฅ
  • options REALBASEMEM=integer โ€” overrides the base memory size passed in from the boot block. (Value given in kilobytes.) Use this option only if the boot block reports the size incorrectly ๐Ÿ™ˆ (Note that some BIOSes put the extended BIOS data area at the top of base memory, and therefore report a smaller base memory size to prevent programs overwriting it. This is correct behavior, and you should not use the REALBASEMEM option to access this memory.)
  • options SPECTRE_V2_GCC_MITIGATION=1 โ€” enable GCC-specific Spectre variant 2 mitigations ๐Ÿ‘ป For 32-bit kernels this means these options:
-mindirect-branch=thunk -mindirect-branch-register

For 64-bit kernels this means these options:

-mindirect-branch=thunk-inline -mindirect-branch-register
  • options REALEXTMEM=integer โ€” overrides the extended memory size passed in from the boot block. (Value given in kilobytes. Extended memory does not include the first megabyte.) Use this option only if the boot block reports the size incorrectly ๐Ÿ“
  • options CYRIX_CACHE_WORKS โ€” relevant only to the Cyrix 486DLC CPU. This option turns on the cache in hold-flush mode. It is not turned on by default because it is known to have problems in certain motherboard implementations ๐Ÿ˜ฌ
  • options CYRIX_CACHE_REALLY_WORKS โ€” relevant only to the Cyrix 486DLC CPU. This option turns on the cache in write-back mode. It is not turned on by default because it is known to have problems in certain motherboard implementations. In order for this option to take effect, option CYRIX_CACHE_WORKS must also be specified โš ๏ธ
  • options PCIBIOS โ€” enable support for initializing the PCI bus using information from the BIOS. See pcibios(4) for details.
  • options MTRR โ€” include support for accessing MTRR registers from user-space. See i386_get_mtrr(2).
  • options BEEP_ONHALT โ€” makes the system speaker emit several beeps when it is completely safe to power down the computer after a halt(8) command ๐Ÿ”Š Requires sysbeep(4) support.
  • options BEEP_ONHALT_COUNT=times โ€” number of times to beep the speaker when options BEEP_ONHALT is enabled. Defaults to 3 ๐ŸŽต
  • options BEEP_ONHALT_PITCH=hz โ€” the tone frequency used when options BEEP_ONHALT option, in hertz. Defaults to 1500 ๐ŸŽถ
  • options BEEP_ONHALT_PERIOD=msecs โ€” the duration of each beep when options BEEP_ONHALT is enabled, in milliseconds. Defaults to 250 โฒ๏ธ
  • options MULTIBOOT โ€” makes the kernel Multiboot-compliant, letting it boot through a Multiboot-compliant boot manager such as GRUB. See multiboot(8) for more info ๐Ÿฅพ
  • options SPLASHSCREEN โ€” display a splash screen during boot ๐ŸŒˆโœจ

๐Ÿฆ‹ isa-specific Options ๐Ÿฆ‹

Options specific to isa(4) busses.

  • options PCIC_ISA_ALLOC_IOBASE=address, options PCIC_ISA_ALLOC_IOSIZE=size โ€” control the section of IO bus space used for PCMCIA bus space mapping. Ideally the probed defaults are satisfactory, however in practice that is not always the case ๐Ÿ˜… See pcmcia(4) for details.
  • options PCIC_ISA_INTR_ALLOC_MASK=mask โ€” controls the allowable interrupts that may be used for PCMCIA devices. This mask is a logical-or of power-of-2s of allowable interrupts: ๐Ÿ’…
       IRQ Val      IRQ Val      IRQ Val       IRQ Val
        0  0x0001    4  0x0010    8  0x0100    12  0x1000
        1  0x0002    5  0x0020    9  0x0200    13  0x2000
        2  0x0004    6  0x0040   10  0x0400    14  0x4000
        3  0x0008    7  0x0080   11  0x0800    15  0x8000
  • options PCKBC_CNATTACH_SELFTEST โ€” makes the kernel run a self test on the keyboard controller before it attaches it as a console. When is this a whole thing? On boxes where you boot on cold iron and pckbc just refuses to talk until you politely request a self test. Rn only the netwinder port uses this ๐Ÿ’…
  • options PCKBD_CNATTACH_MAY_FAIL โ€” set this and the PS/2 keyboard won't get forced into console duty if it can't be found during boot. Iconic behavior actually: it frees up the console keyboard slot for other keyboards, like USB ๐ŸŽ€
  • options PCKBD_LAYOUT=layout โ€” picks the default keyboard layout. Peep pckbd(4) for the deets.

๐ŸŒธ m68k-specific Options ๐ŸŒธ

  • options FPU_EMULATE โ€” pulls in support for the MC68881/MC68882 emulator.
  • options FPSP โ€” pulls in support for 68040 floating point.
  • options M68020,M68030,M68040,M68060 โ€” include support for a specific CPU. Bestie, at least one (the one you're literally using) should be specified, k?
  • options M060SP โ€” software support for the 68060. This gives you emulation of unimplemented integer instructions, plus emulation of unimplemented floating point instructions and data types, plus software support for floating point traps. It's giving overachiever fr fr.

๐Ÿ’œ powerpc-specific Options (OEA Only) ๐Ÿ’œ

  • options PMAP_MEMLIMIT=value โ€” caps the amount of memory the kernel sees at value bytes.
  • options PTEGCOUNT=value โ€” sets the size of the page table as value PTE groups. Normally, one PTEG is allocated per physical page frame.

โญ sparc-specific Options โญ

  • options AUDIO_DEBUG โ€” turns on simple event debugging for the logging of the audio(4) device.
  • options BLINK โ€” enables blinking of the LED. Blink rate is a full cycle every N seconds for N < then current load average. See getloadavg(3).
  • options COUNT_SW_LEFTOVERS โ€” counts how many times the sw SCSI device has left 3, 2, 1 and 0 in the sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover variables, all accessible from ddb(4). See sw(4).
  • options DEBUG_ALIGN โ€” adds debugging message calls when user-requested alignment fault handling happens.
  • options DEBUG_EMUL โ€” adds debugging message calls for emulated floating point and alignment fixing operations.
  • options EXTREME_DEBUG โ€” adds debugging functions you can call from ddb(4). The debug_pagetables, test_region and print_fe_map functions print info about page tables, and heads up โ€” that's for the SUN4M platforms only.
  • options EXTREME_EXTREME_DEBUG โ€” adds extra info to options EXTREME_DEBUG. The name? Unhinged. The concept? Also unhinged. Slay tho ๐Ÿ’€
  • options FPU_CONTEXT โ€” makes options COMPAT_SVR4 getcontext and setcontext include floating point registers.
  • options MAGMA_DEBUG โ€” adds debugging messages to the magma(4) device.
  • options RASTERCONS_FULLSCREEN โ€” uses the entire screen for the console. No crumbs. ๐Ÿ“
  • options RASTERCONS_SMALLFONT โ€” uses the Fixed font on the console instead of the normal font.
  • options SUN4 โ€” support sun4 class machines.
  • options SUN4C โ€” support sun4c class machines.
  • options SUN4M โ€” support sun4m class machines.
  • options SUN4_MMU3L โ€” enables support for sun4 3-level MMU machines.
  • options V9 โ€” enables SPARC V9 assembler in ddb(4).

๐Ÿฆ‹ sparc64-specific Options ๐Ÿฆ‹

  • options AUDIO_DEBUG โ€” enables simple event debugging of the logging of the audio(4) device.
  • options BLINK โ€” enables blinking of the LED. Blink rate is a full cycle every N seconds for N < then current load average. See getloadavg(3).

๐ŸŽ€ x68k-specific Options ๐ŸŽ€

  • options EXTENDED_MEMORY โ€” includes support for extended memory, e.g. TS-6BE16 and 060turbo on-board.
  • options JUPITER โ€” includes support for Jupiter-X MPU accelerator
  • options ZSCONSOLE,ZSCN_SPEED=value โ€” use the built-in serial port as the system-console. Speed is specified in bps, defaults to 9600.
  • options ITE_KERNEL_ATTR=value โ€” sets the kernel message attribute for ITE. Value, an integer, is a logical or of the following values:
    • 1 โ€” color inversed
    • 2 โ€” underlined
    • 4 โ€” bolded

๐Ÿ”ฅ x86-specific Options ๐Ÿ”ฅ

  • options NO_PCI_MSI_MSIX โ€” disables support for MSI/MSIX in the kernel. Peep pci_msi(9) for the details of MSI/MSIX support.
  • options NO_PREEMPTION โ€” disables kpreempt(9) support in the kernel.

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

config(1), gcc(1), gdb(1), ktrace(1), quota(1), vndcompress(1), gettimeofday(2), i386_get_mtrr(2), i386_iopl(2), msgctl(2), msgget(2), msgrcv(2), msgsnd(2), ntp_adjtime(2), ntp_gettime(2), reboot(2), semctl(2), semget(2), semop(2), shmat(2), shmctl(2), shmdt(2), shmget(2), sysctl(3), apm(4), ddb(4), inet(4), md(4), pcibios(4), pcmcia(4), ppp(4), userconf(4), vnd(4), wscons(4), config(5), edquota(8), init(8), mdsetimage(8), mount_cd9660(8), mount_fdesc(8), mount_kernfs(8), mount_lfs(8), mount_mfs(8), mount_msdos(8), mount_nfs(8), mount_ntfs(8), mount_null(8), mount_portal(8), mount_procfs(8), mount_udf(8), mount_umap(8), mount_union(8), mrouted(8), newfs_lfs(8), ntpd(8), quotaon(8), rpc.rquotad(8), sysctl(8), cnmagic(9), in_getifa(9), kernhist(9)

๐ŸŒˆ HISTORY ๐ŸŒˆ

The options man page first appeared in NetBSD 1.3. A true elder, we respect her ๐Ÿซถ


okay that's the whole page bestie, you made it to the end, and the vibe check passed โœจ this one's from the Debian crew, dated December 12, 2025, and it lives at OPTIONS(4) โ€” go forth and configure your kernel, ily, mwah ๐Ÿ’–

๐Ÿ“ฆ where this page comes from