From owner-svn-doc-all@FreeBSD.ORG Tue Apr 22 15:49:55 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BA445FA; Tue, 22 Apr 2014 15:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E1DD16C1; Tue, 22 Apr 2014 15:49:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MFnsMX099451; Tue, 22 Apr 2014 15:49:54 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MFnsjQ099449; Tue, 22 Apr 2014 15:49:54 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201404221549.s3MFnsjQ099449@svn.freebsd.org> From: Dru Lavigne Date: Tue, 22 Apr 2014 15:49:54 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44626 - head/en_US.ISO8859-1/books/handbook/boot X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 15:49:55 -0000 Author: dru Date: Tue Apr 22 15:49:54 2014 New Revision: 44626 URL: http://svnweb.freebsd.org/changeset/doc/44626 Log: 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 Modified: head/en_US.ISO8859-1/books/handbook/boot/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/boot/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/boot/chapter.xml Tue Apr 22 05:23:35 2014 (r44625) +++ head/en_US.ISO8859-1/books/handbook/boot/chapter.xml Tue Apr 22 15:49:54 2014 (r44626) @@ -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: + + 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. - - Refer to &man.boot.8; for more information on the other - boot flags. - + 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. +
-