Once the kernel has finished booting, it passes control to
the user process init(8), which is located at
/sbin/init
, or the program path specified
in the init_path
variable in
loader
.
The automatic reboot sequence makes sure that the file systems available on the system are consistent. If they are not, and fsck(8) cannot fix the inconsistencies of a UFS file system, init(8) drops the system into single-user mode (Section 13.6.2, “Single-User Mode”) so that the system administrator can resolve the problem directly.
This mode can be reached through the automatic reboot
sequence (Section 13.6.1, “Automatic Reboot Sequence”), the user booting
with -s
, or by setting the boot_
single
variable in loader(8).
It can also be reached by calling shutdown(8) from
multi-user mode (Section 13.6.3, “Multi-User Mode”) without
including -r
or -h
.
If the system console
is set to
insecure
in /etc/ttys
,
the system will prompt for the root
password before initiating single-user mode.
/etc/ttys
An insecure
console means that
physical security to the console is considered to be
insecure, so only someone who knows the
root
password may use single-user mode.
Thus, to add this measure of security, choose
insecure
, instead of the default of
secure
.
If init(8) finds the file systems to be in order, or once the user has finished their commands in single-user mode (Section 13.6.2, “Single-User Mode”), the system enters multi-user mode, in which it starts the resource configuration of the system.
The resource configuration system reads in
configuration defaults from
/etc/defaults/rc.conf
, and
system-specific details from
/etc/rc.conf
, and then proceeds to
mount the system file systems listed in
/etc/fstab
. It starts up networking
services, miscellaneous system daemons, then the startup
scripts of locally installed packages.
To learn more about the resource configuration system, refer to rc(8) and examine the scripts themselves.
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.