Merge branch 'vendor/GCC50'
[dragonfly.git] / sys / boot / common / loader.8
1 .\"
2 .\" Copyright (c) 1999 Daniel C. Sobral
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/sys/boot/common/loader.8,v 1.57 2003/06/29 20:57:55 brueffer Exp $
27 .\"
28 .Dd November 12, 2014
29 .Dt LOADER 8
30 .Os
31 .Sh NAME
32 .Nm loader
33 .Nd kernel bootstrapping final stage
34 .Sh DESCRIPTION
35 The program called
36 .Nm
37 is the final stage of
38 .Dx Ns 's
39 kernel bootstrapping process.
40 It is implemented as a
41 .Tn BTX
42 client and is linked statically to
43 .Xr libstand 3
44 and located in the
45 .Pa /boot
46 or
47 .Pa /
48 directory.
49 .Pp
50 If a
51 .Pa /boot
52 directory exist on the boot file system, then
53 .Dq /boot/
54 is prepended to all relative file names used by
55 .Nm .
56 This makes it possible to locate all files used by
57 .Nm
58 in either
59 .Pa /
60 or
61 .Pa /boot
62 directory on the boot file system.
63 If boot and root are the same file system, then files used by
64 .Nm
65 are located in
66 .Pa /boot .
67 If boot and root are different file systems, then files used by
68 .Nm
69 are located in
70 .Pa /
71 on the boot file system, which is mounted as
72 .Pa /boot
73 on the root file system when the kernel is running.
74 .Pp
75 During initialization,
76 .Nm
77 will probe for a console and set the
78 .Va console
79 variable, or set it to serial console
80 .Pq Dq comconsole
81 if the previous boot stage used that.
82 Then, devices are probed,
83 .Va currdev
84 and
85 .Va loaddev
86 are set, and
87 .Va LINES
88 is set to 24.
89 After that,
90 .Pa dloader.rc
91 is processed if available, and, failing that,
92 .Pa boot.conf
93 is read for historical reasons.
94 These files are processed through the
95 .Ic include
96 command, which reads all of them into memory before processing them,
97 making disk changes possible.
98 .Pp
99 At this point, if an
100 .Ic autoboot
101 has not been tried, and if
102 .Va autoboot_delay
103 is not set to
104 .Dq NO
105 (not case sensitive), then an
106 .Ic autoboot
107 will be tried.
108 If the system gets past this point,
109 .Va prompt
110 will be set and
111 .Nm
112 will engage interactive mode.
113 .Sh BUILTIN COMMANDS
114 In
115 .Nm ,
116 builtin commands take parameters from the command line.
117 .Pp
118 The builtin commands available are:
119 .Pp
120 .Bl -tag -width indent -compact
121 .It Ar variable Ns = Ns Ar value
122 Assign
123 .Ar value
124 to
125 .Ar variable .
126 The value is always assigned to a local variable
127 .Ar variable .
128 If
129 .Ar variable
130 is in the list of known kernel environment variables or is a kernel tunable,
131 the value is also assigned to the kernel environment variable of the
132 given name.
133 If the variable name contains a
134 .Ql .\&
135 it is considered a kernel tunable.
136 Local variables are unset if
137 .Ar value
138 is empty.
139 Kernel environment variable will have empty value.
140 .Pp
141 In other words, the assignment above will set a local variable and
142 if applicable, also assign
143 .Ar value
144 to the kernel environment variable, even if
145 .Ar value
146 is empty.
147 See also
148 .Sx KERNEL ENVIRONMENT VARIABLES AND LOCAL VARIABLES .
149 .Pp
150 .Ar Value
151 can be a string or a string expression containing literal text and
152 kernel environment variables, like
153 .Dq $VAR
154 or
155 .Dq ${VAR} .
156 Escape sequences like
157 .Ql \en
158 (newline),
159 .Ql \et
160 (TAB) and
161 .Ql \eOOO
162 (character with number given in octal)
163 can also be used.
164 This is actually a general facility of
165 .Nm
166 which can be used for arguments of all commands.
167 .Pp
168 .It Ic autoboot Op Ar delay Op Ar prompt
169 Proceeds to bootstrap the system after a number of seconds, if not
170 interrupted by the user.
171 Displays a countdown prompt
172 warning the user the system is about to be booted,
173 unless interrupted by a key press.
174 The kernel will be loaded first if necessary.
175 Defaults to 10 seconds.
176 .Pp
177 .It Ic bcachestat
178 Displays statistics about disk cache usage.
179 For depuration only.
180 .Pp
181 .It Ic boot Oo Fl Ns Ar flag ... Oc Op Ar kernelname
182 Immediately proceeds to bootstrap the system, loading the kernel
183 if necessary.
184 Any flags or arguments are passed to the kernel, but they
185 must precede the kernel name, if a kernel name is provided.
186 Flags are described in
187 .Xr boot 8 .
188 See also
189 .Va boot_*
190 and
191 .Va kernel_options
192 variables.
193 .Pp
194 .It Ic cd Op Ar directory
195 Change working directory to
196 .Ar directory .
197 Default is $base.
198 .Pp
199 .It Ic echo Oo Fl n Oc Op Ar message
200 Displays text on the screen.
201 A new line will be printed unless
202 .Fl n
203 is specified.
204 See description of assignment
205 .Pq Ar variable Ns = Ns Ar value
206 .Ar value
207 for use of kernel environment variables and escape sequences in
208 .Ar message .
209 .Pp
210 .It Ic else
211 Conditional if/else/endif.
212 .Pp
213 .It Ic elseifexists Ar path
214 Conditional
215 .Ar path
216 exists, i.e.\& file/dir present.
217 .Pp
218 .It Ic endif
219 Conditional if/else/endif.
220 .Pp
221 .It Ic heap
222 Displays memory usage statistics.
223 For debugging purposes only.
224 .Pp
225 .It Ic help Op Ar topic Op Ar subtopic
226 Shows help messages read from
227 .Pa loader.help .
228 The special
229 .Ar topic
230 .Cm index
231 will list all topics available.
232 .Pp
233 .It Ic ifexists Ar path
234 Conditional
235 .Ar path
236 exists, i.e.\& file/dir present.
237 .Pp
238 .It Ic ifset Ar kenv_variable
239 Conditional kernel environment variable
240 .Ar kenv_variable
241 exists.
242 .Pp
243 .It Ic include Ar
244 Process script files.
245 Each file, in turn, is completely read into memory,
246 and then each of its lines is passed to the command line interpreter.
247 If any error is returned by the interpreter, the include
248 command aborts immediately, without reading any other files, and
249 returns an error itself.
250 .Pp
251 .It Ic load Oo Fl t Ar type Oc Ar file Op Ar argument ...
252 Loads a kernel, kernel loadable module (kld), or file of opaque
253 contents tagged as being of the type
254 .Ar type .
255 Kernel and modules can be either in a.out or
256 .Tn ELF
257 format.
258 Any arguments passed after the name of the file to be loaded
259 will be passed as arguments to that file.
260 .Pp
261 .It Ic loadall
262 Load the kernel and all modules specified by MODULE_load variables.
263 .Pp
264 .It Ic local Op Ar local_variable ...
265 Displays the specified variable's value, or all local variables and their
266 values if
267 .Ar local_variable
268 is not specified.
269 .Pp
270 .It Ic ls Oo Fl l Oc Op Ar path
271 Displays a listing of files in the directory
272 .Ar path ,
273 or the current directory if
274 .Ar path
275 is not specified.
276 If
277 .Fl l
278 is specified, file sizes will be shown too.
279 .Pp
280 .It Ic lsdev Op Fl v
281 Lists all devices.
282 A
283 .Sq *
284 prefix indicates a disk slice or partition from which it may be
285 possible to load modules.
286 If
287 .Fl v
288 is specified, more details,
289 like disk slice or partition size and position, are printed.
290 .Pp
291 .It Ic lsmod Op Fl v
292 Displays loaded modules.
293 If
294 .Fl v
295 is specified, more details are shown.
296 .Pp
297 .It Ic lunset Ar local_variable
298 Unset a local variable.
299 Discards the value and removes the variable.
300 .Pp
301 .It Ic lunsetif Ar local_variable kenv_variable
302 Unset local variable
303 .Ar local_variable
304 if kernel environment variable
305 .Ar kenv_variable
306 is true, i.e.\& set to 1 or
307 .Ql YES .
308 .Pp
309 .It Ic menu
310 Run menu system.
311 .Pp
312 .It Ic menuadd Ar command_line
313 Add script line for the current menu item.
314 .Pp
315 .It Ic menuclear
316 Clear all menu items.
317 .Pp
318 .It Ic menuitem Ar key description
319 Start a new menu item.
320 When running the menu system, a line with
321 .Ar key
322 and
323 .Ar description
324 is displayed, and an item is chosen by pressing
325 .Ar key .
326 .Pp
327 .It Ic more Ar
328 Display the files specified, with a pause at each
329 .Va LINES
330 displayed.
331 .Pp
332 .It Ic optcd Op Ar directory
333 Change the working directory to
334 .Ar directory .
335 Default is $base.
336 Ignore errors.
337 This command is like
338 .Ic cd ,
339 but ignores errors when changing the directory.
340 .Pp
341 .It Ic optinclude Ar
342 Process script files.
343 Ignore errors.
344 This command is like
345 .Ic include ,
346 but ignores errors while executing commands in included files.
347 .Pp
348 .It Ic pnpscan Op Fl v
349 Scans for Plug-and-Play devices.
350 This is not functional at present.
351 .Pp
352 .It Ic pwd
353 Prints the working directory.
354 .Pp
355 .It Ic read Oo Fl p Ar prompt Oc Oo Fl t Ar seconds Oc Op Ar kenv_variable
356 Reads a line of input from the terminal,
357 storing it in kernel environment variable
358 .Ar kenv_variable
359 if specified.
360 A prompt may be displayed through the
361 .Fl p
362 flag.
363 A timeout can be specified with
364 .Fl t ,
365 though it will be canceled at the first key pressed.
366 .Pp
367 .It Ic reboot
368 Immediately reboots the system.
369 .Pp
370 .It Ic set Ar kenv_variable
371 .It Ic set Ar kenv_variable Ns = Ns Ar value
372 Set kernel environment variable
373 .Ar kenv_variable
374 to the given value,
375 if no
376 .Ar value
377 is given, the empty string is the value.
378 .Pp
379 .It Ic show Op Ar kenv_variable
380 Displays the specified kernel environment variable's value,
381 or all variables and their values if
382 .Ar kenv_variable
383 is not specified.
384 .Pp
385 .It Ic unload
386 Removes all modules from memory.
387 .Pp
388 .It Ic unset Ar kenv_variable
389 Removes
390 .Ar kenv_variable
391 from the kernel environment.
392 .Pp
393 .It Ic \&?
394 Lists most available commands with a short help text for each.
395 .El
396 .Ss KERNEL ENVIRONMENT VARIABLES AND LOCAL VARIABLES
397 The
398 .Nm
399 actually has two different kinds of variables.
400 These are
401 kernel environment variables,
402 which are visible to the kernel when it is started,
403 and a separate space of local variables used by
404 .Nm ,
405 which are not available to the kernel.
406 .Pp
407 Both local variable and kernel environment variable
408 of the same name are changed by assignment
409 .Pq Ar variable Ns = Ns Ar value .
410 .Pp
411 Kernel environment variables can be set and unset through the
412 .Ic set
413 and
414 .Ic unset
415 builtins, and can have their values examined through the
416 .Ic show
417 and
418 .Ic ifset
419 builtins.
420 Variables in command arguments or
421 .Ar value
422 in assignments
423 .Dq ( $VAR
424 and
425 .Dq ${VAR} )
426 refers to kernel environment variables.
427 .Pp
428 Local variables can be unset with
429 .Ic lunset
430 and
431 .Ic lunsetif
432 builtin, and can have their values examined through the
433 .Ic local
434 builtin.
435 .Pp
436 Notice that these environment variables are not inherited by any shell
437 after the system has been booted, but can be examined by
438 .Xr kenv 1 .
439 .Pp
440 Note that a variable can have two instances with differnet values:
441 both a local variable instance and a kernel environment variable instance
442 can exist for the same name and with different values.
443 This can cause confusion and is seldom done on purpose.
444 .Pp
445 A few variables are set automatically by
446 .Nm .
447 Others can affect the behavior of either
448 .Nm
449 or the kernel at boot.
450 Some options may require a value,
451 while others define behavior just by being set.
452 Both types of variables are described below.
453 .Bl -tag -width indent
454 .It Va acpi_load
455 Used for handling automatic loading of the
456 .Xr acpi 4
457 module.
458 To disable automatic loading of the ACPI module use:
459 .Pp
460 .Dl lunset acpi_load
461 .Dl set hint.acpi.0.disabled=1
462 .It Va autoboot_delay
463 Number of seconds
464 .Ic autoboot
465 and
466 .Ic menu
467 will wait before booting.
468 Default value is 10 seconds.
469 .Pp
470 If set to
471 .Dq NO ,
472 no
473 .Ic autoboot
474 will be automatically attempted after processing
475 .Pa dloader.rc ,
476 though explicit
477 .Ic autoboot Ns 's
478 will be processed normally, defaulting to 10 seconds delay.
479 .It Va boot_askname
480 Instructs the kernel to prompt the user for the name of the root device
481 when the kernel is booted.
482 .It Va boot_ddb
483 Instructs the kernel to start in the DDB debugger, rather than
484 proceeding to initialize when booted.
485 .It Va boot_gdb
486 Selects gdb-remote mode for the kernel debugger by default.
487 .It Va boot_single
488 Prevents the kernel from initiating a multi-user startup; instead single-user
489 mode will be entered when the kernel has finished device probing.
490 .It Va boot_userconfig
491 Requests that the kernel's interactive device configuration program
492 be run when the kernel is booted.
493 .It Va boot_verbose
494 Setting this variable causes extra debugging information to be printed
495 by the kernel during and after the boot phase.
496 .It Va bootfile
497 List of semicolon-separated search path for bootable kernels.
498 The default is
499 .Dq Li kernel .
500 .It Va console
501 Defines the current console.
502 .It Va currdev
503 Selects the default device.
504 Syntax for devices is odd.
505 .It Va default_kernel
506 Selects default kernel loaded by
507 .Ic menu
508 command.
509 Defaults to
510 .Pa kernel .
511 .It Va dumpdev
512 The name of a device where the kernel can save a crash dump in case
513 of a panic.
514 This automatically sets the
515 .Va kern.dumpdev
516 .Xr sysctl 3
517 .Tn MIB
518 variable.
519 .It Va ehci_load
520 Used for handling automatic loading of the
521 .Xr ehci 4
522 module.
523 To disable automatic loading of the EHCI module use:
524 .Pp
525 .Dl lunset ehci_load
526 .Dl set hint.ehci.0.disabled=1
527 .It Va xhci_load
528 Used for handling automatic loading of the
529 .Xr xhci 4
530 module.
531 To disable automatic loading of the XHCI module use:
532 .Pp
533 .Dl lunset xhci_load
534 .Dl set hint.xhci.0.disabled=1
535 .It Va init_chroot
536 Directory
537 .Xr init 8
538 will
539 .Fn chroot
540 to on startup.
541 By setting this variable
542 .Dx
543 can be run from a subdirectory of the root file system.
544 .It Va init_path
545 Sets the list of binaries which the kernel will try to run as the initial
546 process.
547 The first matching binary is used.
548 The default list is
549 .Dq Li /sbin/init:/sbin/oinit:/sbin/init.bak .
550 .It Va kernel_options
551 Set kernel boot flags.
552 See also
553 .Ic boot
554 command.
555 .It Va LINES
556 Define the number of lines on the screen, to be used by the pager.
557 .It Va module_path
558 Sets the list of directories which will be searched for modules named in a
559 .Nm load
560 command or implicitly required by a dependency.
561 The default value for this variable is
562 .Dq Li ;modules ,
563 which first searches the current working directory and then
564 .Pa modules .
565 .It Va num_ide_disks
566 Sets the number of IDE disks as a workaround for some problems in
567 finding the root disk at boot.
568 This has been deprecated in favor of
569 .Va root_disk_unit .
570 .It Va prompt
571 Value of
572 .Nm Ns 's
573 prompt.
574 Defaults to
575 .Dq Li OK .
576 Kernel environment variables can be used in
577 .Va prompt
578 by including
579 .Dq Li ${VAR} .
580 E.g. (note that
581 .Ql $
582 must be escaped with
583 .Ql \e
584 to be included in
585 .Va prompt ) :
586 .Pp
587 .Dl "set prompt=\*q\e${currdev} OK\*q"
588 .It Va root_disk_unit
589 If the code which detects the disk unit number for the root disk is
590 confused, e.g.\& by a mix of
591 .Tn SCSI
592 and
593 .Tn IDE
594 disks, or
595 .Tn IDE
596 disks with
597 gaps in the sequence (e.g.\& no primary slave), the unit number can
598 be forced by setting this variable.
599 .Pp
600 See also
601 .Va vfs.root.mountfrom
602 variable.
603 .It Va rootdev
604 By default the value of
605 .Va currdev
606 is used to set the root file system
607 when the kernel is booted.
608 This can be overridden by setting
609 .Va rootdev
610 explicitly.
611 .Pp
612 See also
613 .Va vfs.root.mountfrom
614 variable.
615 .El
616 .Pp
617 Other variables are used to override kernel tunable parameters.
618 The following
619 .Nm
620 tunables are available:
621 .Bl -tag -width indent
622 .It Va hw.ioapic_enable
623 Control use of
624 .Tn I/O APIC .
625 Set to 1 to enable, 0 to disable.
626 Default is 1.
627 .It Va hw.irq.X.dest
628 Set irqX's destination to the given
629 .Tn CPUID ,
630 which starts from 0.
631 If the specified value is larger than the last
632 .Tn CPUID ,
633 then the first
634 .Tn CPUID
635 will be used.
636 This variable should not be used if
637 .Tn I/O APIC
638 use is disabled.
639 .It Va hw.physmem
640 Limit the amount of physical memory the system will use.
641 By default the size is in bytes, but the
642 .Cm k , K , m , M , g
643 and
644 .Cm G
645 suffixes
646 are also accepted and indicate kilobytes, megabytes and gigabytes
647 respectively.
648 An invalid suffix will result in the variable being ignored by the
649 kernel.
650 .It Va hw.usb.hack_defer_exploration
651 The USB keyboard will sometimes not attach properly unless you set this
652 variable to 0.
653 .It Va kern.emergency_intr_enable
654 Setting this to 1 enables emergency interrupt polling.
655 All interrupt handlers are executed periodically.
656 This mode is very expensive and should
657 only be used to get a system accessible when interrupt routing is
658 otherwise broken.
659 It is primarily used by kernel developers to debug new systems.
660 .It Va kern.emergency_intr_freq
661 Set the polling rate for the emergency interrupt polling code.
662 The default is 10 (hz) to dissuade casual use.
663 If you are doing real work
664 with emergency interrupt polling mode enabled, it is recommended
665 that you use a frequency between 100hz and 300hz.
666 .It Va kern.maxusers
667 Set the size of a number of statically allocated system tables; see
668 .Xr tuning 7
669 for a description of how to select an appropriate value for this tunable.
670 When set, this tunable replaces the value declared in the kernel
671 compile-time configuration file.
672 .It Va kern.ipc.nmbclusters
673 Set the number of mbuf clusters to be allocated.
674 The value cannot be set below the default
675 determined when the kernel was compiled.
676 Modifies
677 .Va NMBCLUSTERS .
678 .It Va kern.mmxopt
679 Toggles the mmx optimizations for the bcopy/copyin/copyout routines
680 .It Va kern.user_scheduler
681 Default userland scheduler (usched).
682 If set, values can be
683 .Dq bsd4
684 or
685 .Dq dfly .
686 Default is
687 .Dq dfly .
688 .It Va kern.vm.kmem.size
689 Sets the size of kernel memory (bytes).
690 This overrides the value determined when the kernel was compiled.
691 .It Va kern.maxswzone
692 Limits the amount of
693 .Tn KVM
694 to be used to hold swap
695 meta information, which directly governs the
696 maximum amount of swap the system can support.
697 This value is specified in bytes of KVA space
698 and defaults to around 70MBytes.
699 Care should be taken
700 to not reduce this value such that the actual
701 amount of configured swap exceeds \(12 the
702 kernel-supported swap.
703 The default 70MB allows
704 the kernel to support a maximum of (approximately)
705 14GB of configured swap.
706 Only mess around with
707 this parameter if you need to greatly extend the
708 .Tn KVM
709 reservation for other resources such as the
710 buffer cache or
711 .Va NMBCLUSTERS .
712 Modifies
713 .Va VM_SWZONE_SIZE_MAX .
714 .It Va kern.maxbcache
715 Limits the amount of KVM reserved for use by the
716 buffer cache, specified in bytes.
717 The default maximum is 200MB on 32-bit and
718 unspecified on 64-bit.
719 This parameter is used to
720 prevent the buffer cache from eating too much
721 .Tn KVM
722 in large-memory machine configurations.
723 Only mess around with this parameter if you need to
724 greatly extend the
725 .Tn KVM
726 reservation for other resources
727 such as the swap zone or
728 .Va NMBCLUSTERS .
729 Note that
730 the NBUF parameter will override this limit.
731 Modifies
732 .Va VM_BCACHE_SIZE_MAX .
733 .It Va machdep.disable_mtrrs
734 Disable the use of
735 .Sy i686
736 .Tn MTRRs
737 (x86 only).
738 .It Va net.inet.tcp.tcbhashsize
739 Overrides the compile-time set value of
740 .Va TCBHASHSIZE
741 or the preset default of 512.
742 Must be a power of 2.
743 .It Va vfs.root.wakedelay
744 Specify an additional delay (default is 2 seconds if unspecified)
745 before trying to mount root.
746 .It Va vfs.root.mountfrom
747 Specify root file system.
748 A semicolon separated list of file systems to try
749 as the kernel root file system.
750 File system format is file system type and disk store,
751 separated by colon.
752 This variable needs to be set when using a boot-only partition, which is
753 typically mounted on root file system as
754 .Pa /boot .
755 .Pp
756 One file system example:
757 .Dl hammer:da8s1a
758 .Pp
759 One file system
760 .Nm HAMMER2
761 multi volume example:
762 .Dl hammer2:da8s1a:da9s1a
763 .Pp
764 Several file systems, boot list, example:
765 .Dl ufs:da0s1a;hammer2:ad1s1d
766 .Pp
767 Each file system in the list will be tried in the order specified
768 until the mount succeeds.
769 If all fail, the
770 .Ql mountroot>
771 prompt is displayed for manual entry.
772 .Pp
773 You may not specify devtab labels here but you can specify paths available to
774 .Xr devfs 5
775 such as:
776 .Dl hammer:serno/L41JYE0G.s1d
777 .It Va vfs.root.realroot
778 Root file system and extra options for
779 .Nm initrd .
780 See
781 .Xr mkinitrd 8 .
782 .El
783 .Sh FILES
784 .Bl -tag -width /boot/defaults/dloader.menu -compact
785 .It Pa /boot/boot.conf
786 .Nm
787 bootstrapping script.
788 Deprecated
789 .It Pa /boot/defaults/dloader.menu
790 .Nm
791 menu setup commands -- do not change this file
792 .It Pa /boot/defaults/loader.conf
793 .Nm
794 configuration file, see
795 .Xr loader.conf 5
796 -- do not change this file
797 .It Pa /boot/dloader.menu
798 .Nm
799 menu setup commands
800 .It Pa /boot/dloader.rc
801 .Nm
802 bootstrapping script
803 .It Pa /boot/loader
804 .Nm
805 itself
806 .It Pa /boot/loader.conf
807 .It Pa /boot/loader.conf.local
808 .Nm
809 configuration files, see
810 .Xr loader.conf 5
811 .It Pa /boot/loader.help
812 help messages, used by the
813 .Ic help
814 command
815 .El
816 .Sh EXAMPLES
817 Boot in single user mode:
818 .Pp
819 .Dl loadall
820 .Dl boot -s
821 .Pp
822 Load kernel's user configuration file.
823 Notice that a kernel must be loaded before any other
824 .Ic load
825 command is attempted.
826 .Bd -literal -offset indent
827 load kernel
828 load -t userconfig_script kernel.conf
829 .Ed
830 .Pp
831 Load the kernel, a splash screen, and then autoboot in five seconds.
832 .Bd -literal -offset indent
833 load kernel
834 load splash_bmp
835 load -t splash_image_data chuckrulez.bmp
836 autoboot 5
837 .Ed
838 .Pp
839 Set the disk unit of the root device to 2, and then boot.
840 This would be needed in a system with two IDE disks,
841 with the second IDE disk hardwired to
842 .Pa ad2
843 instead of
844 .Pa ad1 .
845 .Bd -literal -offset indent
846 set root_disk_unit=2
847 boot kernel
848 .Ed
849 .Sh SEE ALSO
850 .Xr kenv 1 ,
851 .Xr libstand 3 ,
852 .Xr acpi 4 ,
853 .Xr ehci 4 ,
854 .Xr xhci 4 ,
855 .Xr loader.conf 5 ,
856 .Xr tuning 7 ,
857 .Xr boot 8 ,
858 .Xr btxld 8 ,
859 .Xr cryptsetup 8 ,
860 .Xr lvm 8 ,
861 .Xr pxeboot 8 ,
862 .Xr pxeboot_tftp 8 ,
863 .Xr sysctl 8
864 .Sh HISTORY
865 The
866 .Nm
867 first appeared in
868 .Fx 3.1 .
869 .Nm dloader
870 was introduced and
871 .Tn FORTH
872 removed in
873 .Dx 2.7 .
874 .Sh AUTHORS
875 .An -nosplit
876 The
877 .Nm
878 was written by
879 .An Michael Smith Aq Mt msmith@FreeBSD.org .
880 .Pp
881 .Nm dloader
882 was written by
883 .An Matthew Dillon Aq Mt dillon@backplane.com .
884 .Sh BUGS
885 A variable can have two instances: local & kernel environment,
886 this can cause confusion.