radix: Fix the non-per-cpu radix tree usage.
[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                 unset acpi_load
29                 set hint.acpi.0.disabled=1
30
31         If needed, disable the AHCI driver with:
32
33                 unset ahci_load
34                 set hint.ahci.0.disabled=1
35
36         If needed, disable the EHCI driver with:
37
38                 unset 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 variables or is a kernel tunable, the value is also
51         assigned to the kernel environment variable of the given name.
52         Local variables are unset if <value> is empty.  Kernel environment
53         variables may have empty values.
54
55         Two kinds of variables are maintained by this program (loader(8)):
56         local variables, that is for loader(8) use only, and kernel
57         environment variables, that kernel will have access to when it starts.
58         The assignment described above, will assign to a local variable and, if
59         it is applicable, also snoop assignment to kernel environment variable.
60
61 ################################################################################
62 # TAHCI DControl AHCI module behaviour
63
64         $ahci_load
65
66         The AHCI driver provides support for SATA controllers conforming to
67         the Advanced Host Controller Interface specification.
68
69         The NATA driver provides support for some AHCI controllers, the AHCI
70         driver is used if both NATA and AHCI drivers provides support for a
71         controller.  If AHCI driver is disabled, NATA driver will be used.
72
73         If the ahci_load variable is set, the AHCI module will be loaded.
74         The AHCI driver can be disabled with:
75
76                 unset ahci_load
77                 set hint.ahci.0.disabled=1
78
79         A link speed of 1.5Gb/s can be enforced with:
80
81                 set hint.ahci.force150=1
82
83         To refrain from attempting to send some higher level ATA commands
84         which some devices might not properly implement use:
85
86                 set hint.ahci.nofeatures=1
87
88         See ahci.4 man page (on booted system) for full description.
89
90 ################################################################################
91 # Tautoboot DBoot after a delay
92
93         autoboot [<delay> [<prompt>]]
94
95         Displays <prompt> or a default prompt, and counts down <delay> seconds
96         before attempting to boot.  If <delay> is not specified, the default
97         value is $autoboot_delay.
98
99 ################################################################################
100 # Tboot DBoot immediately
101
102         boot [-<flag> ...] [<kernelname>]
103
104         Boot the system.  If flags are specified, they are added to the
105         arguments for the kernel.  If <kernelname> is specified, and a kernel
106         has not already been loaded, it will be booted instead of the default
107         kernel.  <flag> values include:
108         -a  Same as `set boot_askname'
109         -C  Same as `set boot_cdrom'
110         -c  Same as `set boot_userconfig'
111         -d  Same as `set boot_ddb'
112         -g  Same as `set boot_gdb'
113         -h  Same as `set boot_serial'
114         -m  Mute the system console
115         -p  Pause after each attached device during device probing phase
116         -r  Use statically configured device for root file system
117         -s  Same as `set boot_single'
118         -V  Same as `set boot_vidcons'
119         -v  Same as `set boot_verbose'
120
121         <flag>s can also be set via kernel_options variable.
122         See also boot.8 man page (on booted system) for <flag> values.
123
124 ################################################################################
125 # Techo DEcho arguments
126
127         echo [-n] [<message>]
128
129         Emits <message>, with no trailing newline if -n is specified.  This is
130         most useful in conjunction with scripts and the '@' line prefix.
131
132         Variables are substituted by prefixing them with $, e.g.
133
134                 echo Current device is $currdev
135
136         will print the current device.
137
138 ################################################################################
139 # TEHCI DControl EHCI module behaviour
140
141         $ehci_load
142
143         The EHCI driver provides support for the USB Enhanched Host Controller
144         Interface, which is used by USB 2.0 controllers.
145
146         If the ehci_load variable is set, the EHCI module will be loaded.
147         The EHCI driver can be disabled with:
148
149                 unset ehci_load
150                 set hint.ehci.0.disabled=1
151
152         See ehci.4 man page (on booted system) for full description.
153
154 ################################################################################
155 # Tload DLoad a kernel or module
156
157         load [-t <type>] <file> [<argument> ...]
158
159         Loads the module contained in <file> into memory.  If no other modules
160         are loaded, <file> must be a kernel or the command will fail.
161
162         If -t is specified, the module is loaded as raw data of <type>, for
163         later use by the kernel or other modules.  <type> may be any string.
164
165         Any arguments passed after the name of the file to be loaded will be
166         passed as arguments to that file.
167
168 ################################################################################
169 # Tls DList files
170
171         ls [-l] [<path>]
172
173         Displays a listing of files in the directory <path>, or the root
174         directory of the current device if <path> is not specified.
175
176         The -l argument displays file sizes as well; the process of obtaining
177         file sizes on some media may be very slow.
178
179 ################################################################################
180 # Tlsdev DList all devices
181
182         lsdev [-v]
183
184         List all devices.  Disk slices and partitions from which it may be
185         possible to load modules are marked with '*'.
186         If -v is specified, print more details, like size and position of
187         disk slices and partitions.
188
189 ################################################################################
190 # Tlsmod DList modules
191
192         lsmod [-v]
193
194         List loaded modules.  If -v is specified, print more details.
195
196 ################################################################################
197 # Tmore DPage files
198
199         more <file> ...
200
201         Show contents of text files.  When displaying the contents of more,
202         than one file, if the user elects to quit displaying a file, the
203         remaining files will not be shown.
204
205 ################################################################################
206 # Tpnpscan DScan for PnP devices
207
208         pnpscan [-v]
209
210         Scan for Plug-and-Play devices.  This command is normally automatically
211         run as part of the boot process, in order to dynamically load modules
212         required for system operation.
213
214         If the -v argument is specified, details on the devices found will
215         be printed.
216
217 ################################################################################
218 # Tset DSet a kernel environment variable
219
220         set <env_variable>
221         set <env_variable>=<value>
222
223         The set command is used to set kernel environment variables.
224
225         See also `<variable>=<value>' command for distinction on local and
226         kernel environment variables.
227
228 ################################################################################
229 # Tset Sautoboot_delay DSet the default autoboot / menu delay
230
231         set autoboot_delay=<value>
232
233         Sets the default delay in seconds for the `autoboot' and `menu'
234         commands to wait before booting.  The default value is 10 seconds.
235
236 ################################################################################
237 # Tset Sbootfile DSet the default boot file set
238
239         set bootfile=<file>[;<file>...]
240
241         Sets the default set of kernel boot filename(s).  It may be overridden
242         by setting the bootfile variable to a semicolon-separated list of
243         filenames, each of which will be searched for in the $module_path
244         directories.  The default value is "kernel".
245
246 ################################################################################
247 # Tset Sboot_askname DPrompt for root device
248
249         set boot_askname
250
251         Instructs the kernel to prompt the user for the name of the root device
252         when the kernel is booted.
253
254 ################################################################################
255 # Tset Sboot_cdrom DBoot from CDROM
256
257         set boot_cdrom
258
259         Instructs the kernel to boot from CDROM when the kernel is booted.
260
261 ################################################################################
262 # Tset Sboot_ddb DDrop to the kernel debugger (DDB)
263
264         set boot_ddb
265
266         Instructs the kernel to start in the DDB debugger, rather than
267         proceeding to initialise when booted.
268
269 ################################################################################
270 # Tset Sboot_gdb DSelect gdb-remote mode
271
272         set boot_gdb
273
274         Selects gdb-remote mode for the kernel debugger by default.
275
276 ################################################################################
277 # Tset Sboot_single DStart system in single-user mode
278
279         set boot_single
280
281         Prevents the kernel from initiating a multi-user startup, single-user
282         mode will be entered when the kernel has finished device probes.
283
284 ################################################################################
285 # Tset Sboot_serial DUse serial console after boot
286
287         set boot_serial
288
289         Use serial console after boot.  See also `set console' command.
290
291 ################################################################################
292 # Tset Sboot_verbose DVerbose boot messages
293
294         set boot_verbose
295
296         Setting this variable causes extra debugging information to be printed
297         by the kernel especially during the boot phase.
298
299 ################################################################################
300 # Tset Sboot_vidcons DUse video console after boot
301
302         set boot_vidcons
303
304         Use video console after boot.  See also `set console' command.
305
306 ################################################################################
307 # Tset Skernel_options DKernel options
308
309         set kernel_options
310
311         Set kernel boot flags.  E.g.:
312
313                 set kernel_options="-v -a"
314
315         See also boot command; kernel_options sets default <flags>.
316
317 ################################################################################
318 # Tset Sconsole DSet the current console
319
320         set console[=<value>]
321
322         Sets the current console.  <value> include `vidconsole', `comconsole'
323         and `nullconsole'.  If <value> is omitted, a list of valid consoles
324         will be displayed.
325
326 ################################################################################
327 # Tset Sdefault_kernel DSet default kernel directory
328
329         set default_kernel=<path>
330
331         Selects the default kernel directory for `menu' command.  Default value
332         is "kernel".
333
334 ################################################################################
335 # Tset Scurrdev DSet the current device
336
337         set currdev=<device>
338
339         Selects the default device.  See `lsdev' for available devices.
340
341 ################################################################################
342 # Tset Sinit_path DSet the list of init candidates
343
344         set init_path=<path>[:<path>...]
345
346         Sets the list of binaries which the kernel will try to run as initial
347         process.
348
349
350 ################################################################################
351 # Tset Smodule_path DSet the module search path
352
353         set module_path=<path>[;<path>...]
354
355         Sets the list of directories which will be searched in for modules
356         named in a load command or implicitly required by a dependency.  An
357         empty <path> specifies the current directory.  The default value is
358         ";modules".
359
360 ################################################################################
361 # Tset Sprompt DSet the command prompt
362
363         set prompt=<value>
364
365         The command prompt is displayed when the loader is waiting for input.
366         Variable substitution is performed on the prompt.  The default value
367         is "OK".
368
369 ################################################################################
370 # Tset Srootdev DSet the root filesystem
371
372         set rootdev=<path>
373
374         By default the value of $currdev is used to set the root filesystem
375         when the kernel is booted.  This can be overridden by setting
376         $rootdev explicitly.
377
378 ################################################################################
379 # Tset Stunables DSet kernel tunable values
380
381         Various kernel tunable parameters can be overridden by specifying new
382         values in the environment.
383
384         set hw.pci.allow_unsupported_io_range=<value>
385
386                 Allow the PCI Bridge to pass through an unsupported
387                 memory range assigned by the BIOS.
388
389                 value is 0 (default) or non-zero to enable.
390
391         set hw.pci.enable_io_modes=<value>
392
393                 Enable PCI resources which are left off by some BIOSes
394                 or are not enabled correctly by the device driver.
395
396                 value is 1 (default), but this may cause problems with
397                 some peripherals.  Set to 0 to disable.
398
399         set hw.physmem=<value>                  MAXMEM
400
401                 Limits the amount of physical memory space available to
402                 the system to <value> bytes.  <value> may have a `k', `M' or
403                 `G' suffix to indicate kilobytes, megabytes and gigabytes
404                 respectively.  Note that the current i386 architecture
405                 limits this value to 4GB.
406
407                 On systems where memory cannot be accurately probed,
408                 this option provides a hint as to the actual size of
409                 system memory (which will be tested before use).
410
411         set hw.syscons.sc_no_suspend_vtswitch=<value>
412
413                 Disable VT switching on suspend.
414
415                 value is 0 (default) or non-zero to enable.
416
417         set kern.emergence_intr_enable=<value>
418
419                 Setting this to 1 enables emergency interrupt polling.  All
420                 interrupt handlers are executed periodically.  This mode is
421                 very expensive and should only be used to get a system
422                 accessible when interrupt routing is otherwise broken.  It
423                 is primarily used by kernel developers to debug new systems.
424
425         set kern.emergence_intr_freq=<value>
426
427                 Set the polling rate for the emergency interrupt polling
428                 code.  The default is 10 (hz) to dissuade causual use.  If
429                 you are doing real work with emergency interrupt polling
430                 mode enabled, it is recommended that you use a frequency
431                 between 100hz and 300hz.
432
433         set kern.ipc.nmbclusters=<value>        NMBCLUSTERS
434
435                 Set the number of mbuf clusters to be allocated.  The value
436                 cannot be set below the default determined when the kernel
437                 was compiled.
438
439         set kern.vm.kmem.size=<value>
440
441                 Sets the size of kernel memory (bytes).  This overrides
442                 the value determined when the kernel was compiled.
443
444         set machdep.disable_mtrrs=1
445
446                 Disable the use of i686 MTRRs (i386 only)
447
448         set net.inet.tcp.tcbhashsize=<value>    TCBHASHSIZE
449
450                 Overrides the compile-time set value of TCBHASHSIZE or
451                 the preset default of 512.  Must be a power of 2.
452
453         set vfs.root.mountfrom=<value>
454
455                 Specify root file system.  <value> is a semicolon separated
456                 list of file systems.  File system format is file system type
457                 and disk store, separated by colon.  This variable needs to be
458                 set when using boot-only partition, which is typically mounted
459                 on root file system as /boot.
460
461                 One file system example:
462                         hammer:da8se1a
463
464                 One file system HAMMER multi volume examples:
465                         hammer:da8s1a:da9s1a
466
467                 Several file systems, boot list, example:
468                         ufs:da0s1a;hammer:ad1s1d
469
470                 Each file system in the list will be tried in the order
471                 specified until the mount succeeds.  If all fail, the
472                 `mountroot>' prompt is displayed for manual entry.
473
474                 You may not specify devtab labels here but you can specify
475                 paths available to devfs such as:
476                         hammer:serno/L41JYE0G.s1d
477
478 ################################################################################
479 # Tshow DShow values of kernel environment variable
480
481         show [<env_variable>]
482
483         Displays the value of <env_variable>, or all kernel environment
484         variables if not specified.
485
486         See also `<variable>=<value>' command for distinction on local and
487         kernel environment variables.
488
489 ################################################################################
490 # Tinclude DExecute script file
491
492         include <file> ...
493
494         The entire contents of <file> are read into memory before executing
495         commands, so it is safe to source a file from removable media.
496
497 ################################################################################
498 # Toptinclude DExecute script file; ignore exit status
499
500         optinclude <file> ...
501
502         The entire contents of <file> are read into memory before executing
503         commands, so it is safe to source a file from removable media.
504         Return success and execute all commands even if some commands fail.
505
506 ################################################################################
507 # Tcd DChange directory
508
509         cd [<directory>]
510
511         Change working directory to <directory>.  Default is $base.
512
513 ################################################################################
514 # Toptcd DChange directory; ignore exit status
515
516         optcd [<directory>]
517
518         Change working directory to <directory>.  Default is $base.
519         Return success even if changing directory fails.
520
521 ################################################################################
522 # Tpwd DPrint working directory
523
524         pwd
525
526         Show working directory.
527
528 ################################################################################
529 # Tlocal DList local variables
530
531         local [<local_variable> ...]
532
533         Display the value of given local variables, or all variables if not
534         specified.
535
536         See also `<variable>=<value>' command for distinction on local and
537         kernel environment variables.
538
539 ################################################################################
540 # Tlunset DUnset local variable
541
542         lunset <local_variable>
543
544         Unset local variable: discard value and remove variable.
545
546         See also `<variable>=<value>' command for distinction on local and
547         kernel environment variables.
548
549 ################################################################################
550 # Tlunsetif DUnset local variables if envvar true
551
552         lunsetif <local_variable> <env_variable>
553
554         Unset <local_variable> if <env_variable> is true, i.e. set to 1 or YES.
555
556         See also `<variable>=<value>' command for distinction on local and
557         kernel environment variables.
558
559 ################################################################################
560 # Tloadall DLoad kernel + modules
561
562         loadall
563
564         Load kernel and all modules specified by MODULE_load variables.
565
566 ################################################################################
567 # Tifexists DConditional file/dir present
568
569         ifexists <path>
570
571         Conditional <path> exists, i.e. file/dir present.
572
573 ################################################################################
574 # Tifset DConditional kenv variable present
575
576         ifset <env_variable>
577
578         Conditional <env_variable> exists.
579
580 ################################################################################
581 # Telseifexists DConditional file/dir present
582
583         elseifexists <path>
584
585         Conditional <path> exists, i.e. file/dir present.
586
587 ################################################################################
588 # Telse DConditional if/else/endif
589
590         else
591
592         Conditional if/else/endif.
593
594 ################################################################################
595 # Tendif DConditional if/else/endif
596
597         endif
598
599         Conditional if/else/endif.
600
601 ################################################################################
602 # Tmenuclear DClear all menus
603
604         menuclear
605
606         Clear all menu bullets.
607
608 ################################################################################
609 # Tmenuitem DAdd menu bullet
610
611         menuitem <key> <description text>
612
613         Start new menu bullet, when running menu system bullet is choosen by
614         pressing <key>.  E.g.:
615
616                 menuitem a "Boot Backup kernel kernel.alt"
617
618 ################################################################################
619 # Tmenuadd DAdd script line for menu bullet
620
621         menuadd <command line>
622
623         Add script line for current menu bullet.  E.g.:
624
625                 menuadd lunsetif acpi_load hint.acpi.0.disabled
626
627 ################################################################################
628 # Tmenu DRun menu system
629
630         menu
631
632         Run menu system.
633
634 ################################################################################
635 # Tread DRead input from the terminal
636
637         read [-t <value>] [-p <prompt>] [<env_variable>]
638
639         The read command reads a line of input from the terminal.  If the
640         -t argument is specified, it will return nothing if no input has been
641         received after <value> seconds.  (Any keypress will cancel the
642         timeout).
643
644         If -p is specified, <prompt> is printed before reading input.  No
645         newline is emitted after the prompt.
646
647         If a variable name is supplied, the variable is set to the value read,
648         less any terminating newline.
649
650 ################################################################################
651 # Tunload DRemove all modules from memory
652
653         unload
654
655         This command removes any kernel and all loaded modules from memory.
656
657 ################################################################################
658 # Tunset DUnset a kernel environment variable
659
660         unset <env_variable>
661
662         If allowed, the named kernel environment variable's value is discarded
663         and the variable is removed.
664
665         See also `<variable>=<value>' command for distinction on local and
666         kernel environment variables.
667
668 ################################################################################