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 For more information on ACPI, AHCI and EHCI use `help' on these topics.
43 ################################################################################
44 # T<variable>=<value> DAssign value to variable
48 Assign value to variable. The value is always assigned to local
49 variable <variable>. If <variable> is in the list of known kernel
50 environment (kenv) variables or is a kernel tunable, the value is also
51 assigned to the kernel environment variable of the given name.
52 If the variable name contains a `.' it is considered a kernel tunable.
53 Local variables are unset if <value> is empty. Kernel environment
54 variables will have empty value.
56 Two kinds of variables are maintained by loader(8) (this program):
57 local variables, that is for loader(8) use only, and kernel
58 environment variables, that kernel will have access to when it starts.
59 The assignment described above, will assign to a local variable and,
60 if applicable, also snoop assignment to kernel environment variable.
62 <value> can be a string or a string expressions containing literal
63 text and kernel environment variables, like `$VAR' or `${VAR}'. E.g.:
65 VAR="Current device is $currdev"
67 Escape sequences like `\n' (newline) and `\OOO' (character with number
68 given in octal) can also be used. This is actually a general facility
69 of loader(8) which can be used for arguments of all commands.
71 ################################################################################
72 # TAHCI DControl AHCI module behaviour
76 The AHCI driver provides support for SATA controllers conforming to
77 the Advanced Host Controller Interface specification.
79 The NATA driver provides support for some AHCI controllers, the AHCI
80 driver is used if both NATA and AHCI drivers provides support for a
81 controller. If AHCI driver is disabled, NATA driver will be used.
83 If the ahci_load variable is set, the AHCI module will be loaded.
84 The AHCI driver can be disabled with:
87 set hint.ahci.0.disabled=1
89 A link speed of 1.5Gb/s can be enforced with:
91 set hint.ahci.force150=1
93 To refrain from attempting to send some higher level ATA commands
94 which some devices might not properly implement use:
96 set hint.ahci.nofeatures=1
98 See ahci.4 man page (on booted system) for full description.
100 ################################################################################
101 # Tautoboot DBoot after a delay
103 autoboot [<delay> [<prompt>]]
105 Displays <prompt> or a default prompt, and counts down <delay> seconds
106 before attempting to boot. If <delay> is not specified, the default
107 value is $autoboot_delay.
109 ################################################################################
110 # Tboot DBoot immediately
112 boot [-<flag> ...] [<kernelname>]
114 Boot the system. If flags are specified, they are added to the
115 arguments for the kernel. If <kernelname> is specified, and a kernel
116 has not already been loaded, it will be booted instead of the default
117 kernel. <flag> values include:
119 -a Same as `set boot_askname'
120 -C Same as `set boot_cdrom'
121 -c Same as `set boot_userconfig'
122 -d Same as `set boot_ddb'
123 -g Same as `set boot_gdb'
124 -h Same as `set boot_serial'
125 -m Mute the system console
126 -p Pause after each attached device during device probing phase
127 -r Use statically configured device for root file system
128 -s Same as `set boot_single'
129 -V Same as `set boot_vidcons'
130 -v Same as `set boot_verbose'
132 <flag>s can also be set via kernel_options variable.
133 See also boot.8 man page (on booted system) for <flag> values.
135 ################################################################################
136 # Techo DEcho arguments
138 echo [-n] [<message>]
140 Emits <message>, with no trailing newline if -n is specified.
142 Kernel environment variables are substituted by prefixing them with
143 `$', like `$VAR'; another variant is `${VAR}'. E.g.:
145 echo Current device is $currdev
147 will print the current device.
149 ################################################################################
150 # TEHCI DControl EHCI module behaviour
154 The EHCI driver provides support for the USB Enhanched Host Controller
155 Interface, which is used by USB 2.0 controllers.
157 The EHCI kernel module is by default loaded automatically.
159 If the ehci_load variable is set, the EHCI module will be loaded.
160 The EHCI driver can be disabled with:
163 set hint.ehci.0.disabled=1
165 See ehci.4 man page (on booted system) for full description.
167 ################################################################################
168 # Tload DLoad a kernel or module
170 load [-t <type>] <file> [<argument> ...]
172 Loads the module contained in <file> into memory. If no other modules
173 are loaded, <file> must be a kernel or the command will fail.
175 If -t is specified, the module is loaded as raw data of <type>, for
176 later use by the kernel or other modules. <type> may be any string.
178 Any arguments passed after the name of the file to be loaded will be
179 passed as arguments to that file.
181 ################################################################################
186 Displays a listing of files in the directory <path>, or the root
187 directory of the current device if <path> is not specified.
189 The -l argument displays file sizes as well; the process of obtaining
190 file sizes on some media may be very slow.
192 ################################################################################
193 # Tlsdev DList all devices
197 List all devices. Disk slices and partitions from which it may be
198 possible to load modules are marked with '*'.
199 If -v is specified, print more details, like size and position of
200 disk slices and partitions.
202 ################################################################################
203 # Tlsmod DList modules
207 List loaded modules. If -v is specified, print more details.
209 ################################################################################
214 Show contents of text files. When displaying the contents of more,
215 than one file, if the user elects to quit displaying a file, the
216 remaining files will not be shown.
218 ################################################################################
219 # Tpnpscan DScan for PnP devices
223 Scan for Plug-and-Play devices. This command is normally automatically
224 run as part of the boot process, in order to dynamically load modules
225 required for system operation.
227 If the -v argument is specified, details on the devices found will
230 ################################################################################
231 # Tset DSet a kernel environment variable
234 set <kenv_variable>=<value>
236 The set command is used to set kernel environment variables.
238 See also `<variable>=<value>' command for distinction on local and
239 kernel environment variables.
241 ################################################################################
242 # Tset Sautoboot_delay DSet the default autoboot / menu delay
244 set autoboot_delay=<value>
246 Sets the default delay in seconds for the `autoboot' and `menu'
247 commands to wait before booting. The default value is 10 seconds.
249 ################################################################################
250 # Tset Sbootfile DSet the default boot file set
252 set bootfile=<file>[;<file>...]
254 Sets the default set of kernel boot filename(s). It may be overridden
255 by setting the bootfile variable to a semicolon-separated list of
256 filenames, each of which will be searched for in the $module_path
257 directories. The default value is "kernel".
259 ################################################################################
260 # Tset Sboot_askname DPrompt for root device
264 Instructs the kernel to prompt the user for the name of the root device
265 when the kernel is booted.
267 ################################################################################
268 # Tset Sboot_cdrom DBoot from CDROM
272 Instructs the kernel to boot from CDROM when the kernel is booted.
274 ################################################################################
275 # Tset Sboot_ddb DDrop to the kernel debugger (DDB)
279 Instructs the kernel to start in the DDB debugger, rather than
280 proceeding to initialise when booted.
282 ################################################################################
283 # Tset Sboot_gdb DSelect gdb-remote mode
287 Selects gdb-remote mode for the kernel debugger by default.
289 ################################################################################
290 # Tset Sboot_single DStart system in single-user mode
294 Prevents the kernel from initiating a multi-user startup, single-user
295 mode will be entered when the kernel has finished device probes.
297 ################################################################################
298 # Tset Sboot_serial DUse serial console after boot
302 Use serial console after boot. See also `set console' command.
304 ################################################################################
305 # Tset Sboot_verbose DVerbose boot messages
309 Setting this variable causes extra debugging information to be printed
310 by the kernel especially during the boot phase.
312 ################################################################################
313 # Tset Sboot_vidcons DUse video console after boot
317 Use video console after boot. See also `set console' command.
319 ################################################################################
320 # Tset Skernel_options DKernel options
324 Set kernel boot flags. E.g.:
326 set kernel_options="-v -a"
328 See also boot command; kernel_options sets default <flags>.
330 ################################################################################
331 # Tset Sconsole DSet the current console
333 set console[=<value>]
335 Sets the current console. <value> include `vidconsole', `comconsole'
336 and `nullconsole'. If <value> is omitted, a list of valid consoles
339 ################################################################################
340 # Tset Sdefault_kernel DSet default kernel directory
342 set default_kernel=<path>
344 Selects the default kernel directory for `menu' command. Default value
347 ################################################################################
348 # Tset Scurrdev DSet the current device
352 Selects the default device. See `lsdev' for available devices.
354 ################################################################################
355 # Tset Sinit_chroot DSet directory that init(8) will chroot() to
357 set init_chroot=<path>
359 If set, init(8) will chroot() to <path> on startup. By setting this
360 variable DragonFly can be run from a subdirectory of the root file
363 ################################################################################
364 # Tset Sinit_path DSet the list of init(8) candidates
366 set init_path=<path>[:<path>...]
368 Sets the list of binaries which the kernel will try to run as initial
371 ################################################################################
372 # Tset Smodule_path DSet the module search path
374 set module_path=<path>[;<path>...]
376 Sets the list of directories which will be searched in for modules
377 named in a load command or implicitly required by a dependency. An
378 empty <path> specifies the current directory. The default value is
381 ################################################################################
382 # Tset Sprompt DSet the command prompt
386 The command prompt is displayed when the loader is waiting for input.
387 Variable substitution is performed on the prompt. The default value
390 ################################################################################
391 # Tset Srootdev DSet the root filesystem
395 By default the value of $currdev is used to set the root filesystem
396 when the kernel is booted. This can be overridden by setting
399 See also vfs.root.mountfrom variable, under `set tunables' help item.
401 ################################################################################
402 # Tset Stunables DSet kernel tunable values
404 Various kernel tunable parameters can be overridden by specifying new
405 values in the environment.
407 set hw.ioapic_enable=<value>
409 Set to 0 to disable use of I/O APIC. Default value is 1.
411 set hw.irq.X.dest=<value>
413 Set irqX's destination to the given CPUID, which starts from 0.
414 This variable should not be used if I/O APIC use is disabled.
416 set hw.pci.allow_unsupported_io_range=<value>
418 Allow the PCI Bridge to pass through an unsupported
419 memory range assigned by the BIOS.
421 Value is 0 (default) or non-zero to enable.
423 set hw.pci.enable_io_modes=<value>
425 Enable PCI resources which are left off by some BIOSes
426 or are not enabled correctly by the device driver.
428 Value is 1 (default), but this may cause problems with
429 some peripherals. Set to 0 to disable.
431 set hw.physmem=<value> MAXMEM
433 Limits the amount of physical memory space available to
434 the system to <value> bytes. <value> may have a `k', `M' or
435 `G' suffix to indicate kilobytes, megabytes and gigabytes
436 respectively. Note that the current i386 architecture
437 limits this value to 4GB.
439 On systems where memory cannot be accurately probed,
440 this option provides a hint as to the actual size of
441 system memory (which will be tested before use).
443 set hw.syscons.sc_no_suspend_vtswitch=<value>
445 Disable VT switching on suspend.
447 Value is 0 (default) or non-zero to enable.
449 set hw.usb.hack_defer_exploration=<value>
451 The USB keyboard will sometimes not attach properly unless
452 you set this variable to 0.
454 set kern.emergency_intr_enable=<value>
456 Setting this to 1 enables emergency interrupt polling. All
457 interrupt handlers are executed periodically. This mode is
458 very expensive and should only be used to get a system
459 accessible when interrupt routing is otherwise broken. It
460 is primarily used by kernel developers to debug new systems.
462 set kern.emergency_intr_freq=<value>
464 Set the polling rate for the emergency interrupt polling
465 code. The default is 10 (hz) to dissuade causual use. If
466 you are doing real work with emergency interrupt polling
467 mode enabled, it is recommended that you use a frequency
468 between 100hz and 300hz.
470 set kern.ipc.nmbclusters=<value> NMBCLUSTERS
472 Set the number of mbuf clusters to be allocated. The value
473 cannot be set below the default determined when the kernel
476 set kern.vm.kmem.size=<value>
478 Sets the size of kernel memory (bytes). This overrides
479 the value determined when the kernel was compiled.
481 set machdep.disable_mtrrs=1
483 Disable the use of i686 MTRRs (i386 only)
485 set net.inet.tcp.tcbhashsize=<value> TCBHASHSIZE
487 Overrides the compile-time set value of TCBHASHSIZE or
488 the preset default of 512. Must be a power of 2.
490 set vfs.root.mountfrom=<value>
492 Specify root file system. <value> is a semicolon separated
493 list of file systems. File system format is file system type
494 and disk store, separated by colon.
496 This variable needs to be set when using boot-only partition,
497 which is typically mounted on root file system as /boot.
499 One file system example:
503 One file system HAMMER multi volume examples:
505 "hammer:da8s1a:da9s1a"
507 Several file systems, boot list, example:
509 "ufs:da0s1a;hammer:ad1s1d"
511 Each file system in the list will be tried in the order
512 specified until the mount succeeds. If all fail, the
513 `mountroot>' prompt is displayed for manual entry.
515 You may not specify devtab labels here but you can specify
516 paths available to devfs such as:
518 "hammer:serno/L41JYE0G.s1d"
520 set vfs.root.realroot=<value>
522 Specify root file system and extra options for initrd.
524 Format of <value> is below, TYPE is `local' or `crypt',
525 arg's depend on TYPE:
527 "TYPE:arg1:arg2:...:argN"
531 Use UFS file system on lvm(8) volume group `vg00' logical
532 volume `lv0' as real root:
534 "local:ufs:/dev/vg00/lv0"
536 Use UFS file system on encrypted volume `secvolume', managed by
537 cryptsetup(8), on device `/dev/ad0s0a' as real root:
539 "crypt:ufs:/dev/ad0s0a:secvolume"
541 See mkinitrd.8 man page (on booted system) for full description.
543 ################################################################################
544 # Tshow DShow values of kernel environment variable
546 show [<kenv_variable>]
548 Displays the value of <kenv_variable>, or all kernel environment
549 variables if not specified.
551 See also `<variable>=<value>' command for distinction on local and
552 kernel environment variables.
554 ################################################################################
555 # Tinclude DExecute script file
559 The entire contents of <file> are read into memory before executing
560 commands, so it is safe to source a file from removable media.
562 ################################################################################
563 # Toptinclude DExecute script file; ignore exit status
565 optinclude <file> ...
567 The entire contents of <file> are read into memory before executing
568 commands, so it is safe to source a file from removable media.
569 Return success and execute all commands even if some commands fail.
571 ################################################################################
572 # Tcd DChange directory
576 Change working directory to <directory>. Default is $base.
578 ################################################################################
579 # Toptcd DChange directory; ignore exit status
583 Change working directory to <directory>. Default is $base.
584 Return success even if changing directory fails.
586 ################################################################################
587 # Tpwd DPrint working directory
591 Show working directory.
593 ################################################################################
594 # Tlocal DList local variables
596 local [<local_variable> ...]
598 Display the value of given local variables, or all variables if not
601 See also `<variable>=<value>' command for distinction on local and
602 kernel environment variables.
604 ################################################################################
605 # Tlunset DUnset local variable
607 lunset <local_variable>
609 Unset local variable: discard value and remove variable.
611 See also `<variable>=<value>' command for distinction on local and
612 kernel environment variables.
614 ################################################################################
615 # Tlunsetif DUnset local variable if kenv variable true
617 lunsetif <local_variable> <kenv_variable>
619 Unset local variable <local_variable> if kernel environment variable
620 <kenv_variable> is true, i.e. set to 1 or YES.
622 See also `<variable>=<value>' command for distinction on local and
623 kernel environment variables.
625 ################################################################################
626 # Tloadall DLoad kernel + modules
630 Load kernel and all modules specified by MODULE_load variables.
632 ################################################################################
633 # Tifexists DConditional file/dir present
637 Conditional <path> exists, i.e. file/dir present.
639 ################################################################################
640 # Tifset DConditional kenv variable present
642 ifset <kenv_variable>
644 Conditional kernel environment variable <kenv_variable> exists.
646 ################################################################################
647 # Telseifexists DConditional file/dir present
651 Conditional <path> exists, i.e. file/dir present.
653 ################################################################################
654 # Telse DConditional if/else/endif
658 Conditional if/else/endif.
660 ################################################################################
661 # Tendif DConditional if/else/endif
665 Conditional if/else/endif.
667 ################################################################################
668 # Tmenuclear DClear all menus
672 Clear all menu bullets.
674 ################################################################################
675 # Tmenuitem DAdd menu bullet
677 menuitem <key> <description text>
679 Start new menu bullet, when running menu system bullet is choosen by
680 pressing <key>. E.g.:
682 menuitem a "Boot Backup kernel kernel.alt"
684 ################################################################################
685 # Tmenuadd DAdd script line for menu bullet
687 menuadd <command line>
689 Add script line for current menu bullet. E.g.:
691 menuadd lunsetif acpi_load hint.acpi.0.disabled
693 ################################################################################
694 # Tmenu DRun menu system
700 ################################################################################
701 # Tread DRead input from terminal to kenv variable
703 read [-p <prompt>] [-t <value>] [<kenv_variable>]
705 The read command reads a line of input from the terminal.
707 If -p is specified, <prompt> is printed before reading input. No
708 newline is emitted after the prompt.
710 If -t is specified, it will return nothing if no input has been
711 received after <value> seconds. Any keypress will cancel the timeout.
713 If <kenv_variable> is supplied, the kernel environment variable is set
714 to the value read, less any terminating newline.
716 ################################################################################
717 # Tunload DRemove all modules from memory
721 This command removes any kernel and all loaded modules from memory.
723 ################################################################################
724 # Tunset DUnset a kernel environment variable
726 unset <kenv_variable>
728 If allowed, the named kernel environment variable's value is discarded
729 and the variable is removed.
731 See also `<variable>=<value>' command for distinction on local and
732 kernel environment variables.
734 ################################################################################