aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2012-10-13 16:14:09 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2012-10-13 16:14:09 +0000
commit12574f2c42069a8d63ebc3ae63b9db084536163a (patch)
tree480847ff8087b2242b9147e16526e9e59a154c3f /chapter07
parent5cef3143bf3c152b39cf3a38ea0b08f00b0596a9 (diff)
Add boot/shutdown script customization instructions
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10016 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07')
-rw-r--r--chapter07/site.xml67
1 files changed, 67 insertions, 0 deletions
diff --git a/chapter07/site.xml b/chapter07/site.xml
index 47b327eee..dcb2c5532 100644
--- a/chapter07/site.xml
+++ b/chapter07/site.xml
@@ -32,5 +32,72 @@
<!-- Use role to fix a pdf generation problem -->
<screen role="auto">&site;</screen>
+ <sect2>
+ <title>Customizing the Boot and Shutdown Scripts</title>
+
+ <para>The LFS boot scripts boot and shut down a system in a fairly
+ efficient manner, but there are a few tweaks that you can make in the
+ rc.site file to improve speed even more and to adjust messages accoring
+ to your preferences. To do this, adjust the settings in
+ the <filename>/etc/sysconfig/rc.site</filename> file above.</para>
+
+ <itemizedlist>
+
+ <listitem><para>During the boot script <filename>udev</filename>, there is
+ a call to <command>udev settle</command> that requires some time to
+ complete. This time may or may not be required depending on devices present
+ in the system. If you only have simple partitions and a single ethernet
+ card, the boot process will probably not need to wait for this command. To
+ skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem>
+
+ <listitem><para>The boot script <filename>udev_retry</filename> also runs
+ <command>udev settle</command> by default. This command is only needed by
+ default if the <filename class='directory'>/var</filename> directory is
+ separately mounted. This is because the clock needs the file
+ <filename>/var/lib/hwclock/adjtime</filename>. Other customizations may
+ also need to wait for udev to complete, but in many installations it is not
+ needed. Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
+ </para></listitem>
+
+ <listitem><para>By default, the file system checks are silent. This can
+ appear to be a delay during the bootup process. To turn on the
+ <command>fsck</command> output, set the variable VERBOSE_FSCK=y.
+ </para></listitem>
+
+ <listitem><para>When rebooting, you may want to skip the filesystem check,
+ <command>fsck</command>, completely. To do this, either create the file
+ <filename>/fastboot</filename> or reboot the system with the command
+ <command>/sbin/shutdown -f -r now</command>. On the other hand, you can
+ force all file systems to be checked by creating
+ <filename>/forcefsck</filename> or running <command>shutdown</command> with
+ the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>.
+ </para>
+
+ <para>Setting the variable FASTBOOT=y will disable <command>fsck</command>
+ during the boot process until it is removed. This is not recommended
+ on a permanent basis.</para></listitem>
+
+ <listitem><para>Normally, all files in the <filename
+ class='directory'>/tmp</filename> directory are deleted at boot time.
+ Depending on the number of files or directories present, this can cause a
+ noticible delay in the boot process. To skip removing these files set the
+ variable SKIPTMPCLEAN=y.</para></listitem>
+
+ <listitem><para>During shutdown, the <command>init</command> program sends
+ a TERM signal to each program it has started (e.g. agetty), waits for a set
+ time (default 3 seconds), and sends each process a KILL signal and waits
+ again. This process is repeated in the <command>sendsignals</command>
+ script for any processes that are not shut down by their own scripts. The
+ delay for <command>init</command> can be set by passing a parameter. For
+ example to remove the delay in <command>init</command>, pass the -t0
+ parameter when shutting down or rebooting (e.g. <command>/sbin/shutdown
+ -t0 -r now</command>). The delay for the <command>sendsignals</command>
+ script can be skipped by setting the parameter
+ KILLDELAY=0.</para></listitem>
+
+ </itemizedlist>
+
+ </sect2>
+
</sect1>