1 ################################################################################
2 # Thelp DDisplay command help
4 help [topic [subtopic]]
8 The help command displays help on commands and their usage.
10 In command help, a term enclosed with <...> indicates a value as
11 described by the term. A term enclosed with [...] is optional,
12 and may not be required by all forms of the command.
14 Some commands may not be available in `help'. Use the `?' command
15 to list most available commands.
17 To boot another kernel than the default in kernel/, change directory
18 to the kernel directory, and execute `loadall' and `boot' commands.
19 E.g. to do a verbose boot of kernel in kernel.XXX/:
26 If needed, disable the ACPI driver with:
29 set hint.acpi.0.disabled=1
31 If needed, disable the AHCI driver with:
34 set hint.ahci.0.disabled=1
36 If needed, disable the EHCI driver with:
39 set hint.ehci.0.disabled=1
41 If needed, disable the XHCI driver with:
44 set hint.xhci.0.disabled=1
46 For more information on ACPI, AHCI, EHCI and XHCI use `help' on these topics.
48 ################################################################################
49 # T<variable>=<value> DAssign value to variable
53 Assign value to variable. The value is always assigned to local
54 variable <variable>. If <variable> is in the list of known kernel
55 environment (kenv) variables or is a kernel tunable, the value is also
56 assigned to the kernel environment variable of the given name.
57 If the variable name contains a `.' it is considered a kernel tunable.
58 Local variables are unset if <value> is empty. Kernel environment
59 variables will have empty value.
61 Two kinds of variables are maintained by loader(8) (this program):
62 local variables, that is for loader(8) use only, and kernel
63 environment variables, that kernel will have access to when it starts.
64 The assignment described above, will assign to a local variable and,
65 if applicable, also snoop assignment to kernel environment variable.
67 <value> can be a string or a string expressions containing literal
68 text and kernel environment variables, like `$VAR' or `${VAR}'. E.g.:
70 VAR="Current device is $currdev"
72 Escape sequences like `\n' (newline) and `\OOO' (character with number
73 given in octal) can also be used. This is actually a general facility
74 of loader(8) which can be used for arguments of all commands.
76 ################################################################################
77 # TAHCI DControl AHCI module behaviour
81 The AHCI driver provides support for SATA controllers conforming to
82 the Advanced Host Controller Interface specification.
84 The NATA driver provides support for some AHCI controllers, the AHCI
85 driver is used if both NATA and AHCI drivers provides support for a
86 controller. If AHCI driver is disabled, NATA driver will be used.
88 If the ahci_load variable is set, the AHCI module will be loaded.
89 The AHCI driver can be disabled with:
92 set hint.ahci.0.disabled=1
94 A link speed of 1.5Gb/s can be enforced with:
96 set hint.ahci.force150=1
98 To refrain from attempting to send some higher level ATA commands
99 which some devices might not properly implement use:
101 set hint.ahci.nofeatures=1
103 See ahci.4 man page (on booted system) for full description.
105 ################################################################################
106 # Tautoboot DBoot after a delay
108 autoboot [<delay> [<prompt>]]
110 Displays <prompt> or a default prompt, and counts down <delay> seconds
111 before attempting to boot. If <delay> is not specified, the default
112 value is $autoboot_delay.
114 ################################################################################
115 # Tboot DBoot immediately
117 boot [-<flag> ...] [<kernelname>]
119 Boot the system. If flags are specified, they are added to the
120 arguments for the kernel. If <kernelname> is specified, and a kernel
121 has not already been loaded, it will be booted instead of the default
122 kernel. <flag> values include:
124 -a Same as `set boot_askname'
125 -C Same as `set boot_cdrom'
126 -c Same as `set boot_userconfig'
127 -d Same as `set boot_ddb'
128 -g Same as `set boot_gdb'
129 -h Same as `set boot_serial'
130 -m Mute the system console
131 -p Pause after each attached device during device probing phase
132 -r Use statically configured device for root file system
133 -s Same as `set boot_single'
134 -V Same as `set boot_vidcons'
135 -v Same as `set boot_verbose'
137 <flag>s can also be set via kernel_options variable.
138 See also boot.8 man page (on booted system) for <flag> values.
140 ################################################################################
141 # Techo DEcho arguments
143 echo [-n] [<message>]
145 Emits <message>, with no trailing newline if -n is specified.
147 Kernel environment variables are substituted by prefixing them with
148 `$', like `$VAR'; another variant is `${VAR}'. E.g.:
150 echo Current device is $currdev
152 will print the current device.
154 ################################################################################
155 # TEHCI DControl EHCI module behaviour
159 The EHCI driver provides support for the USB Enhanched Host Controller
160 Interface, which is used by USB 2.0 controllers.
162 The EHCI kernel module is by default loaded automatically.
164 If the ehci_load variable is set, the EHCI module will be loaded.
165 The EHCI driver can be disabled with:
168 set hint.ehci.0.disabled=1
170 See ehci.4 man page (on booted system) for full description.
172 ################################################################################
173 # TXHCI DControl XHCI module behaviour
177 The XHCI driver provides support for the USB Enhanched Host Controller
178 Interface, which is used by USB 2.0 controllers.
180 The XHCI kernel module is by default loaded automatically.
182 If the xhci_load variable is set, the XHCI module will be loaded.
183 The XHCI driver can be disabled with:
186 set hint.xhci.0.disabled=1
188 See xhci.4 man page (on booted system) for full description.
190 ################################################################################
191 # Tload DLoad a kernel or module
193 load [-t <type>] <file> [<argument> ...]
195 Loads the module contained in <file> into memory. If no other modules
196 are loaded, <file> must be a kernel or the command will fail.
198 If -t is specified, the module is loaded as raw data of <type>, for
199 later use by the kernel or other modules. <type> may be any string.
201 Any arguments passed after the name of the file to be loaded will be
202 passed as arguments to that file.
204 ################################################################################
209 Displays a listing of files in the directory <path>, or the root
210 directory of the current device if <path> is not specified.
212 The -l argument displays file sizes as well; the process of obtaining
213 file sizes on some media may be very slow.
215 ################################################################################
216 # Tlsdev DList all devices
220 List all devices. Disk slices and partitions from which it may be
221 possible to load modules are marked with '*'.
222 If -v is specified, print more details, like size and position of
223 disk slices and partitions.
225 ################################################################################
226 # Tlsmod DList modules
230 List loaded modules. If -v is specified, print more details.
232 ################################################################################
237 Show contents of text files. When displaying the contents of more,
238 than one file, if the user elects to quit displaying a file, the
239 remaining files will not be shown.
241 ################################################################################
242 # Tpnpscan DScan for PnP devices
246 Scan for Plug-and-Play devices. This command is normally automatically
247 run as part of the boot process, in order to dynamically load modules
248 required for system operation.
250 If the -v argument is specified, details on the devices found will
253 ################################################################################
254 # Tset DSet a kernel environment variable
257 set <kenv_variable>=<value>
259 The set command is used to set kernel environment variables.
261 See also `<variable>=<value>' command for distinction on local and
262 kernel environment variables.
264 ################################################################################
265 # Tset Sautoboot_delay DSet the default autoboot / menu delay
267 set autoboot_delay=<value>
269 Sets the default delay in seconds for the `autoboot' and `menu'
270 commands to wait before booting. The default value is 10 seconds.
272 ################################################################################
273 # Tset Sbootfile DSet the default boot file set
275 set bootfile=<file>[;<file>...]
277 Sets the default set of kernel boot filename(s). It may be overridden
278 by setting the bootfile variable to a semicolon-separated list of
279 filenames, each of which will be searched for in the $module_path
280 directories. The default value is "kernel".
282 ################################################################################
283 # Tset Sboot_askname DPrompt for root device
287 Instructs the kernel to prompt the user for the name of the root device
288 when the kernel is booted.
290 ################################################################################
291 # Tset Sboot_cdrom DBoot from CDROM
295 Instructs the kernel to boot from CDROM when the kernel is booted.
297 ################################################################################
298 # Tset Sboot_ddb DDrop to the kernel debugger (DDB)
302 Instructs the kernel to start in the DDB debugger, rather than
303 proceeding to initialise when booted.
305 ################################################################################
306 # Tset Sboot_gdb DSelect gdb-remote mode
310 Selects gdb-remote mode for the kernel debugger by default.
312 ################################################################################
313 # Tset Sboot_single DStart system in single-user mode
317 Prevents the kernel from initiating a multi-user startup, single-user
318 mode will be entered when the kernel has finished device probes.
320 ################################################################################
321 # Tset Sboot_serial DUse serial console after boot
325 Use serial console after boot. See also `set console' command.
327 ################################################################################
328 # Tset Sboot_verbose DVerbose boot messages
332 Setting this variable causes extra debugging information to be printed
333 by the kernel especially during the boot phase.
335 ################################################################################
336 # Tset Sboot_vidcons DUse video console after boot
340 Use video console after boot. See also `set console' command.
342 ################################################################################
343 # Tset Skernel_options DKernel options
347 Set kernel boot flags. E.g.:
349 set kernel_options="-v -a"
351 See also boot command; kernel_options sets default <flags>.
353 ################################################################################
354 # Tset Sconsole DSet the current console
356 set console[=<value>]
358 Sets the current console. <value> include `vidconsole', `comconsole'
359 and `nullconsole'. If <value> is omitted, a list of valid consoles
362 ################################################################################
363 # Tset Sdefault_kernel DSet default kernel directory
365 set default_kernel=<path>
367 Selects the default kernel directory for `menu' command. Default value
370 ################################################################################
371 # Tset Scurrdev DSet the current device
375 Selects the default device. See `lsdev' for available devices.
377 ################################################################################
378 # Tset Sinit_chroot DSet directory that init(8) will chroot() to
380 set init_chroot=<path>
382 If set, init(8) will chroot() to <path> on startup. By setting this
383 variable DragonFly can be run from a subdirectory of the root file
386 ################################################################################
387 # Tset Sinit_path DSet the list of init(8) candidates
389 set init_path=<path>[:<path>...]
391 Sets the list of binaries which the kernel will try to run as initial
394 ################################################################################
395 # Tset Smodule_path DSet the module search path
397 set module_path=<path>[;<path>...]
399 Sets the list of directories which will be searched in for modules
400 named in a load command or implicitly required by a dependency. An
401 empty <path> specifies the current directory. The default value is
404 ################################################################################
405 # Tset Sprompt DSet the command prompt
409 The command prompt is displayed when the loader is waiting for input.
410 Variable substitution is performed on the prompt. The default value
413 ################################################################################
414 # Tset Srootdev DSet the root filesystem
418 By default the value of $currdev is used to set the root filesystem
419 when the kernel is booted. This can be overridden by setting
422 See also vfs.root.mountfrom variable, under `set tunables' help item.
424 ################################################################################
425 # Tset Stunables DSet kernel tunable values
427 Various kernel tunable parameters can be overridden by specifying new
428 values in the environment.
430 set hw.ioapic_enable=<value>
432 Set to 0 to disable use of I/O APIC. Default value is 1.
434 set hw.irq.X.dest=<value>
436 Set irqX's destination to the given CPUID, which starts from 0.
437 This variable should not be used if I/O APIC use is disabled.
439 set hw.pci.allow_unsupported_io_range=<value>
441 Allow the PCI Bridge to pass through an unsupported
442 memory range assigned by the BIOS.
444 Value is 0 (default) or non-zero to enable.
446 set hw.pci.enable_io_modes=<value>
448 Enable PCI resources which are left off by some BIOSes
449 or are not enabled correctly by the device driver.
451 Value is 1 (default), but this may cause problems with
452 some peripherals. Set to 0 to disable.
454 set hw.physmem=<value> MAXMEM
456 Limits the amount of physical memory space available to
457 the system to <value> bytes. <value> may have a `k', `M' or
458 `G' suffix to indicate kilobytes, megabytes and gigabytes
459 respectively. Note that the current i386 architecture
460 limits this value to 4GB.
462 On systems where memory cannot be accurately probed,
463 this option provides a hint as to the actual size of
464 system memory (which will be tested before use).
466 set hw.syscons.sc_no_suspend_vtswitch=<value>
468 Disable VT switching on suspend.
470 Value is 0 (default) or non-zero to enable.
472 set hw.usb.hack_defer_exploration=<value>
474 The USB keyboard will sometimes not attach properly unless
475 you set this variable to 0.
477 set kern.emergency_intr_enable=<value>
479 Setting this to 1 enables emergency interrupt polling. All
480 interrupt handlers are executed periodically. This mode is
481 very expensive and should only be used to get a system
482 accessible when interrupt routing is otherwise broken. It
483 is primarily used by kernel developers to debug new systems.
485 set kern.emergency_intr_freq=<value>
487 Set the polling rate for the emergency interrupt polling
488 code. The default is 10 (hz) to dissuade causual use. If
489 you are doing real work with emergency interrupt polling
490 mode enabled, it is recommended that you use a frequency
491 between 100hz and 300hz.
493 set kern.ipc.nmbclusters=<value> NMBCLUSTERS
495 Set the number of mbuf clusters to be allocated. The value
496 cannot be set below the default determined when the kernel
499 set kern.user_scheduler=<value>
501 Set the default userland scheduler. <value> can be "bsd4"
504 set kern.vm.kmem.size=<value>
506 Sets the size of kernel memory (bytes). This overrides
507 the value determined when the kernel was compiled.
509 set machdep.disable_mtrrs=1
511 Disable the use of i686 MTRRs (i386 only)
513 set net.inet.tcp.tcbhashsize=<value> TCBHASHSIZE
515 Overrides the compile-time set value of TCBHASHSIZE or
516 the preset default of 512. Must be a power of 2.
518 set vfs.root.mountfrom=<value>
520 Specify root file system. <value> is a semicolon separated
521 list of file systems. File system format is file system type
522 and disk store, separated by colon.
524 This variable needs to be set when using boot-only partition,
525 which is typically mounted on root file system as /boot.
527 One file system example:
531 One file system HAMMER2 redundant copies examples:
533 "hammer2:da8s1a:da9s1a"
535 Several file systems, boot list, example:
537 "ufs:da0s1a;hammer2:ad1s1d"
539 Each file system in the list will be tried in the order
540 specified until the mount succeeds. If all fail, the
541 `mountroot>' prompt is displayed for manual entry.
543 You may not specify devtab labels here but you can specify
544 paths available to devfs such as:
546 "hammer:serno/L41JYE0G.s1d"
548 set vfs.root.realroot=<value>
550 Specify root file system and extra options for initrd.
552 Format of <value> is below, TYPE is `local' or `crypt',
553 arg's depend on TYPE:
555 "TYPE:arg1:arg2:...:argN"
559 Use UFS file system on lvm(8) volume group `vg00' logical
560 volume `lv0' as real root:
562 "local:ufs:/dev/vg00/lv0"
564 Use UFS file system on encrypted volume `secvolume', managed by
565 cryptsetup(8), on device `/dev/ad0s0a' as real root:
567 "crypt:ufs:/dev/ad0s0a:secvolume"
569 See mkinitrd.8 man page (on booted system) for full description.
571 ################################################################################
572 # Tshow DShow values of kernel environment variable
574 show [<kenv_variable>]
576 Displays the value of <kenv_variable>, or all kernel environment
577 variables if not specified.
579 See also `<variable>=<value>' command for distinction on local and
580 kernel environment variables.
582 ################################################################################
583 # Tinclude DExecute script file
587 The entire contents of <file> are read into memory before executing
588 commands, so it is safe to source a file from removable media.
590 ################################################################################
591 # Toptinclude DExecute script file; ignore exit status
593 optinclude <file> ...
595 The entire contents of <file> are read into memory before executing
596 commands, so it is safe to source a file from removable media.
597 Return success and execute all commands even if some commands fail.
599 ################################################################################
600 # Tcd DChange directory
604 Change working directory to <directory>. Default is $base.
606 ################################################################################
607 # Toptcd DChange directory; ignore exit status
611 Change working directory to <directory>. Default is $base.
612 Return success even if changing directory fails.
614 ################################################################################
615 # Tpwd DPrint working directory
619 Show working directory.
621 ################################################################################
622 # Tlocal DList local variables
624 local [<local_variable> ...]
626 Display the value of given local variables, or all variables if not
629 See also `<variable>=<value>' command for distinction on local and
630 kernel environment variables.
632 ################################################################################
633 # Tlunset DUnset local variable
635 lunset <local_variable>
637 Unset local variable: discard value and remove variable.
639 See also `<variable>=<value>' command for distinction on local and
640 kernel environment variables.
642 ################################################################################
643 # Tlunsetif DUnset local variable if kenv variable true
645 lunsetif <local_variable> <kenv_variable>
647 Unset local variable <local_variable> if kernel environment variable
648 <kenv_variable> is true, i.e. set to 1 or YES.
650 See also `<variable>=<value>' command for distinction on local and
651 kernel environment variables.
653 ################################################################################
654 # Tloadall DLoad kernel + modules
658 Load kernel and all modules specified by MODULE_load variables.
660 ################################################################################
661 # Tifexists DConditional file/dir present
665 Conditional <path> exists, i.e. file/dir present.
667 ################################################################################
668 # Tifset DConditional kenv variable present
670 ifset <kenv_variable>
672 Conditional kernel environment variable <kenv_variable> exists.
674 ################################################################################
675 # Telseifexists DConditional file/dir present
679 Conditional <path> exists, i.e. file/dir present.
681 ################################################################################
682 # Telse DConditional if/else/endif
686 Conditional if/else/endif.
688 ################################################################################
689 # Tendif DConditional if/else/endif
693 Conditional if/else/endif.
695 ################################################################################
696 # Tmenuclear DClear all menus
700 Clear all menu bullets.
702 ################################################################################
703 # Tmenuitem DAdd menu bullet
705 menuitem <key> <description text>
707 Start new menu bullet, when running menu system bullet is choosen by
708 pressing <key>. E.g.:
710 menuitem a "Boot Backup kernel kernel.alt"
712 ################################################################################
713 # Tmenuadd DAdd script line for menu bullet
715 menuadd <command line>
717 Add script line for current menu bullet. E.g.:
719 menuadd lunsetif acpi_load hint.acpi.0.disabled
721 ################################################################################
722 # Tmenu DRun menu system
728 ################################################################################
729 # Tread DRead input from terminal to kenv variable
731 read [-p <prompt>] [-t <value>] [<kenv_variable>]
733 The read command reads a line of input from the terminal.
735 If -p is specified, <prompt> is printed before reading input. No
736 newline is emitted after the prompt.
738 If -t is specified, it will return nothing if no input has been
739 received after <value> seconds. Any keypress will cancel the timeout.
741 If <kenv_variable> is supplied, the kernel environment variable is set
742 to the value read, less any terminating newline.
744 ################################################################################
745 # Tunload DRemove all modules from memory
749 This command removes any kernel and all loaded modules from memory.
751 ################################################################################
752 # Tunset DUnset a kernel environment variable
754 unset <kenv_variable>
756 If allowed, the named kernel environment variable's value is discarded
757 and the variable is removed.
759 See also `<variable>=<value>' command for distinction on local and
760 kernel environment variables.
762 ################################################################################