Merge branch 'vendor/GREP'
[dragonfly.git] / sys / boot / common / help.common
1 ################################################################################
2 # Thelp DDisplay command help
3
4         help [topic [subtopic]]
5         help index
6         ?
7
8         The help command displays help on commands and their usage.
9
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.
13
14         Some commands may not be available in `help'.  Use the `?' command
15         to list most available commands.
16
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/:
20
21                 cd
22                 cd kernel.XXX
23                 loadall
24                 boot -v
25
26         If needed, disable the ACPI driver with:
27
28                 lunset acpi_load
29                 set hint.acpi.0.disabled=1
30
31         If needed, disable the AHCI driver with:
32
33                 lunset ahci_load
34                 set hint.ahci.0.disabled=1
35
36         If needed, disable the EHCI driver with:
37
38                 lunset ehci_load
39                 set hint.ehci.0.disabled=1
40
41         For more information on ACPI, AHCI and EHCI use `help' on these topics.
42
43 ################################################################################
44 # T<variable>=<value> DAssign value to variable
45
46         <variable>=<value>
47
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.
55
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.
61
62         <value> can be a string or a string expressions containing literal
63         text and kernel environment variables, like `$VAR' or `${VAR}'.  E.g.:
64
65                 VAR="Current device is $currdev"
66
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.
70
71 ################################################################################
72 # TAHCI DControl AHCI module behaviour
73
74         $ahci_load
75
76         The AHCI driver provides support for SATA controllers conforming to
77         the Advanced Host Controller Interface specification.
78
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.
82
83         If the ahci_load variable is set, the AHCI module will be loaded.
84         The AHCI driver can be disabled with:
85
86                 lunset ahci_load
87                 set hint.ahci.0.disabled=1
88
89         A link speed of 1.5Gb/s can be enforced with:
90
91                 set hint.ahci.force150=1
92
93         To refrain from attempting to send some higher level ATA commands
94         which some devices might not properly implement use:
95
96                 set hint.ahci.nofeatures=1
97
98         See ahci.4 man page (on booted system) for full description.
99
100 ################################################################################
101 # Tautoboot DBoot after a delay
102
103         autoboot [<delay> [<prompt>]]
104
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.
108
109 ################################################################################
110 # Tboot DBoot immediately
111
112         boot [-<flag> ...] [<kernelname>]
113
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:
118
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'
131
132         <flag>s can also be set via kernel_options variable.
133         See also boot.8 man page (on booted system) for <flag> values.
134
135 ################################################################################
136 # Techo DEcho arguments
137
138         echo [-n] [<message>]
139
140         Emits <message>, with no trailing newline if -n is specified.
141
142         Kernel environment variables are substituted by prefixing them with
143         `$', like `$VAR'; another variant is `${VAR}'.  E.g.:
144
145                 echo Current device is $currdev
146
147         will print the current device.
148
149 ################################################################################
150 # TEHCI DControl EHCI module behaviour
151
152         $ehci_load
153
154         The EHCI driver provides support for the USB Enhanched Host Controller
155         Interface, which is used by USB 2.0 controllers.
156
157         The EHCI kernel module is by default loaded automatically.
158
159         If the ehci_load variable is set, the EHCI module will be loaded.
160         The EHCI driver can be disabled with:
161
162                 lunset ehci_load
163                 set hint.ehci.0.disabled=1
164
165         See ehci.4 man page (on booted system) for full description.
166
167 ################################################################################
168 # Tload DLoad a kernel or module
169
170         load [-t <type>] <file> [<argument> ...]
171
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.
174
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.
177
178         Any arguments passed after the name of the file to be loaded will be
179         passed as arguments to that file.
180
181 ################################################################################
182 # Tls DList files
183
184         ls [-l] [<path>]
185
186         Displays a listing of files in the directory <path>, or the root
187         directory of the current device if <path> is not specified.
188
189         The -l argument displays file sizes as well; the process of obtaining
190         file sizes on some media may be very slow.
191
192 ################################################################################
193 # Tlsdev DList all devices
194
195         lsdev [-v]
196
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.
201
202 ################################################################################
203 # Tlsmod DList modules
204
205         lsmod [-v]
206
207         List loaded modules.  If -v is specified, print more details.
208
209 ################################################################################
210 # Tmore DPage files
211
212         more <file> ...
213
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.
217
218 ################################################################################
219 # Tpnpscan DScan for PnP devices
220
221         pnpscan [-v]
222
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.
226
227         If the -v argument is specified, details on the devices found will
228         be printed.
229
230 ################################################################################
231 # Tset DSet a kernel environment variable
232
233         set <kenv_variable>
234         set <kenv_variable>=<value>
235
236         The set command is used to set kernel environment variables.
237
238         See also `<variable>=<value>' command for distinction on local and
239         kernel environment variables.
240
241 ################################################################################
242 # Tset Sautoboot_delay DSet the default autoboot / menu delay
243
244         set autoboot_delay=<value>
245
246         Sets the default delay in seconds for the `autoboot' and `menu'
247         commands to wait before booting.  The default value is 10 seconds.
248
249 ################################################################################
250 # Tset Sbootfile DSet the default boot file set
251
252         set bootfile=<file>[;<file>...]
253
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".
258
259 ################################################################################
260 # Tset Sboot_askname DPrompt for root device
261
262         set boot_askname
263
264         Instructs the kernel to prompt the user for the name of the root device
265         when the kernel is booted.
266
267 ################################################################################
268 # Tset Sboot_cdrom DBoot from CDROM
269
270         set boot_cdrom
271
272         Instructs the kernel to boot from CDROM when the kernel is booted.
273
274 ################################################################################
275 # Tset Sboot_ddb DDrop to the kernel debugger (DDB)
276
277         set boot_ddb
278
279         Instructs the kernel to start in the DDB debugger, rather than
280         proceeding to initialise when booted.
281
282 ################################################################################
283 # Tset Sboot_gdb DSelect gdb-remote mode
284
285         set boot_gdb
286
287         Selects gdb-remote mode for the kernel debugger by default.
288
289 ################################################################################
290 # Tset Sboot_single DStart system in single-user mode
291
292         set boot_single
293
294         Prevents the kernel from initiating a multi-user startup, single-user
295         mode will be entered when the kernel has finished device probes.
296
297 ################################################################################
298 # Tset Sboot_serial DUse serial console after boot
299
300         set boot_serial
301
302         Use serial console after boot.  See also `set console' command.
303
304 ################################################################################
305 # Tset Sboot_verbose DVerbose boot messages
306
307         set boot_verbose
308
309         Setting this variable causes extra debugging information to be printed
310         by the kernel especially during the boot phase.
311
312 ################################################################################
313 # Tset Sboot_vidcons DUse video console after boot
314
315         set boot_vidcons
316
317         Use video console after boot.  See also `set console' command.
318
319 ################################################################################
320 # Tset Skernel_options DKernel options
321
322         set kernel_options
323
324         Set kernel boot flags.  E.g.:
325
326                 set kernel_options="-v -a"
327
328         See also boot command; kernel_options sets default <flags>.
329
330 ################################################################################
331 # Tset Sconsole DSet the current console
332
333         set console[=<value>]
334
335         Sets the current console.  <value> include `vidconsole', `comconsole'
336         and `nullconsole'.  If <value> is omitted, a list of valid consoles
337         will be displayed.
338
339 ################################################################################
340 # Tset Sdefault_kernel DSet default kernel directory
341
342         set default_kernel=<path>
343
344         Selects the default kernel directory for `menu' command.  Default value
345         is "kernel".
346
347 ################################################################################
348 # Tset Scurrdev DSet the current device
349
350         set currdev=<device>
351
352         Selects the default device.  See `lsdev' for available devices.
353
354 ################################################################################
355 # Tset Sinit_chroot DSet directory that init(8) will chroot() to
356
357         set init_chroot=<path>
358
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
361         system.
362
363 ################################################################################
364 # Tset Sinit_path DSet the list of init(8) candidates
365
366         set init_path=<path>[:<path>...]
367
368         Sets the list of binaries which the kernel will try to run as initial
369         process.
370
371 ################################################################################
372 # Tset Smodule_path DSet the module search path
373
374         set module_path=<path>[;<path>...]
375
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
379         ";modules".
380
381 ################################################################################
382 # Tset Sprompt DSet the command prompt
383
384         set prompt=<value>
385
386         The command prompt is displayed when the loader is waiting for input.
387         Variable substitution is performed on the prompt.  The default value
388         is "OK".
389
390 ################################################################################
391 # Tset Srootdev DSet the root filesystem
392
393         set rootdev=<path>
394
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
397         $rootdev explicitly.
398
399         See also vfs.root.mountfrom variable, under `set tunables' help item.
400
401 ################################################################################
402 # Tset Stunables DSet kernel tunable values
403
404         Various kernel tunable parameters can be overridden by specifying new
405         values in the environment.
406
407         set hw.ioapic_enable=<value>
408
409                 Set to 0 to disable use of I/O APIC.  Default value is 1.
410
411         set hw.irq.X.dest=<value>
412
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.
415
416         set hw.pci.allow_unsupported_io_range=<value>
417
418                 Allow the PCI Bridge to pass through an unsupported
419                 memory range assigned by the BIOS.
420
421                 Value is 0 (default) or non-zero to enable.
422
423         set hw.pci.enable_io_modes=<value>
424
425                 Enable PCI resources which are left off by some BIOSes
426                 or are not enabled correctly by the device driver.
427
428                 Value is 1 (default), but this may cause problems with
429                 some peripherals.  Set to 0 to disable.
430
431         set hw.physmem=<value>                  MAXMEM
432
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.
438
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).
442
443         set hw.syscons.sc_no_suspend_vtswitch=<value>
444
445                 Disable VT switching on suspend.
446
447                 Value is 0 (default) or non-zero to enable.
448
449         set hw.usb.hack_defer_exploration=<value>
450
451                 The USB keyboard will sometimes not attach properly unless
452                 you set this variable to 0.
453
454         set kern.emergency_intr_enable=<value>
455
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.
461
462         set kern.emergency_intr_freq=<value>
463
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.
469
470         set kern.ipc.nmbclusters=<value>        NMBCLUSTERS
471
472                 Set the number of mbuf clusters to be allocated.  The value
473                 cannot be set below the default determined when the kernel
474                 was compiled.
475
476         set kern.user_scheduler=<value>
477
478                 Set the default userland scheduler.  <value> can be "bsd4"
479                 or "dfly" (default).
480
481         set kern.vm.kmem.size=<value>
482
483                 Sets the size of kernel memory (bytes).  This overrides
484                 the value determined when the kernel was compiled.
485
486         set machdep.disable_mtrrs=1
487
488                 Disable the use of i686 MTRRs (i386 only)
489
490         set net.inet.tcp.tcbhashsize=<value>    TCBHASHSIZE
491
492                 Overrides the compile-time set value of TCBHASHSIZE or
493                 the preset default of 512.  Must be a power of 2.
494
495         set vfs.root.mountfrom=<value>
496
497                 Specify root file system.  <value> is a semicolon separated
498                 list of file systems.  File system format is file system type
499                 and disk store, separated by colon.
500
501                 This variable needs to be set when using boot-only partition,
502                 which is typically mounted on root file system as /boot.
503
504                 One file system example:
505
506                         "hammer:da8se1a"
507
508                 One file system HAMMER2 redundant copies examples:
509
510                         "hammer2:da8s1a:da9s1a"
511
512                 Several file systems, boot list, example:
513
514                         "ufs:da0s1a;hammer2:ad1s1d"
515
516                 Each file system in the list will be tried in the order
517                 specified until the mount succeeds.  If all fail, the
518                 `mountroot>' prompt is displayed for manual entry.
519
520                 You may not specify devtab labels here but you can specify
521                 paths available to devfs such as:
522
523                         "hammer:serno/L41JYE0G.s1d"
524
525         set vfs.root.realroot=<value>
526
527                 Specify root file system and extra options for initrd.
528
529                 Format of <value> is below, TYPE is `local' or `crypt',
530                 arg's depend on TYPE:
531
532                         "TYPE:arg1:arg2:...:argN"
533
534                 Examples of <value>:
535
536                 Use UFS file system on lvm(8) volume group `vg00' logical
537                 volume `lv0' as real root:
538
539                         "local:ufs:/dev/vg00/lv0"
540
541                 Use UFS file system on encrypted volume `secvolume', managed by
542                 cryptsetup(8), on device `/dev/ad0s0a' as real root:
543
544                         "crypt:ufs:/dev/ad0s0a:secvolume"
545
546                 See mkinitrd.8 man page (on booted system) for full description.
547
548 ################################################################################
549 # Tshow DShow values of kernel environment variable
550
551         show [<kenv_variable>]
552
553         Displays the value of <kenv_variable>, or all kernel environment
554         variables if not specified.
555
556         See also `<variable>=<value>' command for distinction on local and
557         kernel environment variables.
558
559 ################################################################################
560 # Tinclude DExecute script file
561
562         include <file> ...
563
564         The entire contents of <file> are read into memory before executing
565         commands, so it is safe to source a file from removable media.
566
567 ################################################################################
568 # Toptinclude DExecute script file; ignore exit status
569
570         optinclude <file> ...
571
572         The entire contents of <file> are read into memory before executing
573         commands, so it is safe to source a file from removable media.
574         Return success and execute all commands even if some commands fail.
575
576 ################################################################################
577 # Tcd DChange directory
578
579         cd [<directory>]
580
581         Change working directory to <directory>.  Default is $base.
582
583 ################################################################################
584 # Toptcd DChange directory; ignore exit status
585
586         optcd [<directory>]
587
588         Change working directory to <directory>.  Default is $base.
589         Return success even if changing directory fails.
590
591 ################################################################################
592 # Tpwd DPrint working directory
593
594         pwd
595
596         Show working directory.
597
598 ################################################################################
599 # Tlocal DList local variables
600
601         local [<local_variable> ...]
602
603         Display the value of given local variables, or all variables if not
604         specified.
605
606         See also `<variable>=<value>' command for distinction on local and
607         kernel environment variables.
608
609 ################################################################################
610 # Tlunset DUnset local variable
611
612         lunset <local_variable>
613
614         Unset local variable: discard value and remove variable.
615
616         See also `<variable>=<value>' command for distinction on local and
617         kernel environment variables.
618
619 ################################################################################
620 # Tlunsetif DUnset local variable if kenv variable true
621
622         lunsetif <local_variable> <kenv_variable>
623
624         Unset local variable <local_variable> if kernel environment variable
625         <kenv_variable> is true, i.e. set to 1 or YES.
626
627         See also `<variable>=<value>' command for distinction on local and
628         kernel environment variables.
629
630 ################################################################################
631 # Tloadall DLoad kernel + modules
632
633         loadall
634
635         Load kernel and all modules specified by MODULE_load variables.
636
637 ################################################################################
638 # Tifexists DConditional file/dir present
639
640         ifexists <path>
641
642         Conditional <path> exists, i.e. file/dir present.
643
644 ################################################################################
645 # Tifset DConditional kenv variable present
646
647         ifset <kenv_variable>
648
649         Conditional kernel environment variable <kenv_variable> exists.
650
651 ################################################################################
652 # Telseifexists DConditional file/dir present
653
654         elseifexists <path>
655
656         Conditional <path> exists, i.e. file/dir present.
657
658 ################################################################################
659 # Telse DConditional if/else/endif
660
661         else
662
663         Conditional if/else/endif.
664
665 ################################################################################
666 # Tendif DConditional if/else/endif
667
668         endif
669
670         Conditional if/else/endif.
671
672 ################################################################################
673 # Tmenuclear DClear all menus
674
675         menuclear
676
677         Clear all menu bullets.
678
679 ################################################################################
680 # Tmenuitem DAdd menu bullet
681
682         menuitem <key> <description text>
683
684         Start new menu bullet, when running menu system bullet is choosen by
685         pressing <key>.  E.g.:
686
687                 menuitem a "Boot Backup kernel kernel.alt"
688
689 ################################################################################
690 # Tmenuadd DAdd script line for menu bullet
691
692         menuadd <command line>
693
694         Add script line for current menu bullet.  E.g.:
695
696                 menuadd lunsetif acpi_load hint.acpi.0.disabled
697
698 ################################################################################
699 # Tmenu DRun menu system
700
701         menu
702
703         Run menu system.
704
705 ################################################################################
706 # Tread DRead input from terminal to kenv variable
707
708         read [-p <prompt>] [-t <value>] [<kenv_variable>]
709
710         The read command reads a line of input from the terminal.
711
712         If -p is specified, <prompt> is printed before reading input.  No
713         newline is emitted after the prompt.
714
715         If -t is specified, it will return nothing if no input has been
716         received after <value> seconds.  Any keypress will cancel the timeout.
717
718         If <kenv_variable> is supplied, the kernel environment variable is set
719         to the value read, less any terminating newline.
720
721 ################################################################################
722 # Tunload DRemove all modules from memory
723
724         unload
725
726         This command removes any kernel and all loaded modules from memory.
727
728 ################################################################################
729 # Tunset DUnset a kernel environment variable
730
731         unset <kenv_variable>
732
733         If allowed, the named kernel environment variable's value is discarded
734         and the variable is removed.
735
736         See also `<variable>=<value>' command for distinction on local and
737         kernel environment variables.
738
739 ################################################################################