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