From 8f8820e88a33687be3766077a52aef83a35959d6 Mon Sep 17 00:00:00 2001 From: Dru Lavigne Date: Tue, 22 Apr 2014 15:49:54 +0000 Subject: [PATCH] Move init section into Boot Process as the Last Stage. Format boot options as a table. Expand on single-user mode section. More commits to come. Sponsored by: iXsystems --- .../books/handbook/boot/chapter.xml | 303 +++++++++--------- 1 file changed, 147 insertions(+), 156 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/boot/chapter.xml b/en_US.ISO8859-1/books/handbook/boot/chapter.xml index 07fc935c68..196935c0b0 100644 --- a/en_US.ISO8859-1/books/handbook/boot/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/boot/chapter.xml @@ -345,7 +345,7 @@ boot: specified options or kernel name. Providing a kernel name on the command-line is only applicable after an unload has been issued. - Otherwise the previously-loaded kernel will be + Otherwise, the previously-loaded kernel will be used. @@ -432,25 +432,16 @@ boot: - - - Loader Examples - - Here are some practical examples of loader usage: - - - - To boot the usual kernel in single-user + Here are some practical examples of + loader usage. To boot the usual kernel in single-user modesingle-user mode: boot -s - - - To unload the usual kernel and modules, and then - load the previous or another kernel: + To unload the usual kernel and modules and then + load the previous or another, specified kernel: unload load kernel.old @@ -463,94 +454,183 @@ boot: system upgrade or before configuring a custom kernel. - Use the following to load the usual modules with another kernel: unload set kernel="kernel.old" -boot-conf - +boot-conf - To load an automated kernel configuration script: load -t userconfig_script /boot/kernel.conf - - - - - - Kernel Interaction During Boot kernel boot interaction + - Once the kernel is loaded by either the default loader or - by boot2, which bypasses the loader, it examines any boot - flags and adjusts its behavior as necessary. + + Last Stage + + + &man.init.8; + + Once the kernel is loaded by either loader or + by boot2, which bypasses + loader, it examines any boot + flags and adjusts its behavior as necessary. lists the commonly used boot flags. + Refer to &man.boot.8; for more information on the other + boot flags. kernel bootflags - Here are the more common boot flags: + + Kernel Interaction During Boot - - - + + + + Option + Description + + - - During kernel initialization, ask for the device - to mount as the root file system. - - + + + + During kernel initialization, ask for the device + to mount as the root file system. + - - + + + Boot the root file system from a CDROM. + - - Boot from CDROM. - - + + + Boot into single-user mode. + - - + + + Be more verbose during kernel startup. + + + +
- - Run UserConfig, the boot-time kernel - configurator. - - + Once the kernel has finished booting, it passes control to + the user process &man.init.8;, which is located at + /sbin/init, or the program path specified + in the init_path variable in + loader. This is the last stage of the boot + process. - - + The boot sequence makes sure that the file systems available + on the system are consistent. If a UFS file + system is not, and fsck + cannot fix the inconsistencies, + init drops the system into single-user mode so that the + system administrator can resolve the problem directly. Otherwise, + the system boots into multi-user mode. - - Boot into single-user mode. - - + + Single-User Mode - - + single-user mode + console - - Be more verbose during kernel startup. - - - + A user can specify this mode by + booting with , or by + setting the boot_ single variable in + loader. It can also be reached by + running shutdown now from + multi-user mode. Single-user mode begins with this message: - - Refer to &man.boot.8; for more information on the other - boot flags. - + Enter full pathname of shell or RETURN for /bin/sh: + + If the user presses Enter, the system + will enter the default Bourne shell. To specify a different + shell, input the full path to the shell. + + Single-user mode is usually used to repair a system that will not + boot due to an inconsistent file system or an error in a boot + configuration file. It can also be used to reset the + root password when + it is unknown. These actions are possible as the single-user + mode prompt gives full, local access to the system and its + configuration files. There is no networking in this mode. + + While single-user mode is useful for repairing a system, + it poses a security risk unless the system is in a physically + secure location. By default, any user who can gain physical + access to a system will have full control of that system after + booting into single-user mode. + + If the system console is changed to + insecure in /etc/ttys, + the system will first prompt for the root password before + initiating single-user mode. This adds a measure of security + while removing the ability to reset the root password when it is + unknown. + + + Configuring an Insecure Console in + <filename>/etc/ttys</filename> + + # name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off insecure + + + 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. + + + + Multi-User Mode + + multi-user mode + + If init finds the file systems to be in order, or + once the user has finished their commands in single-user mode + and has typed exit to leave single-user mode, + the system enters + multi-user mode, in which it starts the resource configuration + of the system. + + rc files + + The resource configuration system reads in configuration + defaults from /etc/defaults/rc.conf and + system-specific details from + /etc/rc.conf. It 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 &man.rc.8; and examine the scripts located in + /etc/rc.d. +
-