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