Changeset 12574f2


Ignore:
Timestamp:
10/13/2012 04:14:09 PM (12 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
85ce884e
Parents:
5cef314
Message:

Add boot/shutdown script customization instructions

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10016 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
2 added
1 deleted
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    r5cef314 r12574f2  
     12012-10-13 Bruce Dubbs <bdubbs@linuxfromscratch.org>
     2   * Remove unneeded sleep in killproc
     3   * Add option for verbose fsck
     4   * Flatten directory structure of tarball
     5   * Remove /fastboot or /forcecheck if set
     6
    172012-09-05 Bruce Dubbs <bdubbs@linuxfromscratch.org>
    28   * Add udevadm trigger --action=change line to udev script
  • bootscripts/lfs/init.d/checkfs

    r5cef314 r12574f2  
    4747         msg="${msg} file system checks as requested.\n"
    4848         log_info_msg "${msg}"
     49         rm /fastboot
    4950         exit 0
    5051      fi
     
    7475         log_success_msg "$msg"
    7576         options="-f"
     77         rm /forcefsck
    7678      else
    7779         options=""
     
    7981
    8082      log_info_msg "Checking file systems..."
     83     
    8184      # Note: -a option used to be -p; but this fails e.g. on fsck.minix
    82       fsck ${options} -a -A -C -T >/dev/null
     85      if is_true "$VERBOSE_FSCK"; then
     86         fsck ${options} -a -A -C -T
     87      else
     88         fsck ${options} -a -A -C -T >/dev/null
     89      fi
     90
    8391      error_value=${?}
    8492
  • bootscripts/lfs/lib/services/init-functions

    r5cef314 r12574f2  
    345345                        # Check again, and fail if still running
    346346                        kill -0 "${pid}" 2> /dev/null && return 1
    347                     else
    348                         # just check one last time and if still alive, fail
    349                         sleep 1
    350                         kill -0 "${pid}" 2> /dev/null && return 1
    351347                    fi
    352348                fi
  • bootscripts/lfs/sysconfig/rc.site

    r5cef314 r12574f2  
    5151#HEADLESS=yes
    5252
    53 # Skip cleaning /tmp
    54 #SKIPTMPCLEAN=yes
     53# Speed up boot without waiting for settle in udev_retry
     54#OMIT_UDEV_RETRY_SETTLE=yes
     55
     56# Write out fsck progress if yes
     57#VERBOSE_FSCK=no
     58
     59# Speed up boot without waiting for settle in udev
     60#OMIT_UDEV_SETTLE=y
     61
     62# Speed up boot without waiting for settle in udev_retry
     63#OMIT_UDEV_RETRY_SETTLE=yes
     64
     65# Skip cleaning /tmp if yes
     66#SKIPTMPCLEAN=no
    5567
    5668# For setclock
  • chapter01/changelog.xml

    r5cef314 r12574f2  
    3838
    3939    <listitem>
     40      <para>2012-09-27</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[bdubbs] - Add boot/shutdown script customization
     44          instructions.</para>
     45        </listitem>
     46      </itemizedlist>
     47    </listitem>
     48
     49    <listitem>
    4050      <para>2012-10-02</para>
    4151      <itemizedlist>
  • chapter07/site.xml

    r5cef314 r12574f2  
    3333  <screen role="auto">&site;</screen>
    3434
     35  <sect2>
     36    <title>Customizing the Boot and Shutdown Scripts</title>
     37
     38    <para>The LFS boot scripts boot and shut down a system in a fairly
     39    efficient manner, but there are a few tweaks that you can make in the
     40    rc.site file to improve speed even more and to adjust messages accoring
     41    to your preferences. To do this, adjust the settings in
     42    the <filename>/etc/sysconfig/rc.site</filename> file above.</para>
     43
     44    <itemizedlist>
     45
     46    <listitem><para>During the boot script <filename>udev</filename>, there is
     47    a call to <command>udev settle</command> that requires some time to
     48    complete. This time may or may not be required depending on devices present
     49    in the system.  If you only have simple partitions and a single ethernet
     50    card, the boot process will probably not need to wait for this command.  To
     51    skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem>
     52
     53    <listitem><para>The boot script <filename>udev_retry</filename> also runs
     54    <command>udev settle</command> by default.  This command is only needed by
     55    default if the <filename class='directory'>/var</filename> directory is
     56    separately mounted.  This is because the clock needs the file
     57    <filename>/var/lib/hwclock/adjtime</filename>.  Other customizations may
     58    also need to wait for udev to complete, but in many installations it is not
     59    needed.  Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
     60    </para></listitem>
     61
     62    <listitem><para>By default, the file system checks are silent.  This can
     63    appear to be a delay during the bootup process.  To turn on the
     64    <command>fsck</command> output, set the variable VERBOSE_FSCK=y.
     65    </para></listitem>
     66
     67    <listitem><para>When rebooting, you may want to skip the filesystem check,
     68    <command>fsck</command>, completely.  To do this, either create the file
     69    <filename>/fastboot</filename> or reboot the system with the command
     70    <command>/sbin/shutdown -f -r now</command>.  On the other hand, you can
     71    force all file systems to be checked by creating
     72    <filename>/forcefsck</filename> or running <command>shutdown</command> with
     73    the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>. 
     74    </para>
     75   
     76    <para>Setting the variable FASTBOOT=y will disable <command>fsck</command>
     77    during the boot process until it is removed.  This is not recommended
     78    on a permanent basis.</para></listitem>
     79
     80    <listitem><para>Normally, all files in the <filename
     81    class='directory'>/tmp</filename> directory are deleted at boot time.
     82    Depending on the number of files or directories present, this can cause a
     83    noticible delay in the boot process.  To skip removing these files set the
     84    variable SKIPTMPCLEAN=y.</para></listitem>
     85
     86    <listitem><para>During shutdown, the <command>init</command> program sends
     87    a TERM signal to each program it has started (e.g. agetty), waits for a set
     88    time (default 3 seconds), and sends each process a KILL signal and waits
     89    again.  This process is repeated in the <command>sendsignals</command>
     90    script for any processes that are not shut down by their own scripts.  The
     91    delay for <command>init</command> can be set by passing a parameter.  For
     92    example to remove the delay in <command>init</command>, pass the -t0
     93    parameter when shutting down or rebooting (e.g.  <command>/sbin/shutdown
     94    -t0 -r now</command>).  The delay for the  <command>sendsignals</command>
     95    script can be skipped by setting the parameter
     96    KILLDELAY=0.</para></listitem>
     97
     98    </itemizedlist>
     99
     100  </sect2>
     101
    35102</sect1>
    36103
  • packages.ent

    r5cef314 r12574f2  
    303303<!ENTITY less-ch6-sbu "less than 0.1 SBU">
    304304
    305 <!ENTITY lfs-bootscripts-version "20120905">                 <!-- Scripts depend on this format -->
     305<!ENTITY lfs-bootscripts-version "20121013">                 <!-- Scripts depend on this format -->
    306306<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">         <!-- Updated in Makefile -->
    307307<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
  • udev-lfs/Makefile.lfs

    r5cef314 r12574f2  
    279279        @cp -v rules/*                        $(DESTDIR)/lib/udev/rules.d
    280280        @rm -v                                $(DESTDIR)/lib/udev/rules.d/99*
    281         @cp -v udev-lfs-$(VERSION)/*lfs.rules $(DESTDIR)/etc/udev/rules.d
     281        @cp -v udev-lfs-$(VERSION)/*.rules    $(DESTDIR)/etc/udev/rules.d
    282282
    283283   # Copy documentation
    284284        @cp -v man/udev.7                     $(DESTDIR)/usr/share/man/man7
    285285        @cp -v man/udevadm.8                  $(DESTDIR)/usr/share/man/man8
    286         @cp -v udev-lfs-$(VERSION)/udevd.8    $(DESTDIR)/usr/share/man/man8/udevd.8
    287         @cp -v udev-lfs-$(VERSION)/doc/*      $(DESTDIR)/usr/share/doc/udev/lfs
     286        @cp -v udev-lfs-$(VERSION)/udevd.8    $(DESTDIR)/usr/share/man/man8
     287        @cp -v udev-lfs-$(VERSION)/README     $(DESTDIR)/usr/share/doc/udev/lfs
     288        @cp -v udev-lfs-$(VERSION)/*.txt      $(DESTDIR)/usr/share/doc/udev/lfs
    288289
    289290   # Copy misc
  • udev-lfs/README

    r5cef314 r12574f2  
    3030rule_generator.functions
    3131
    32 doc                  - Documentation for LFS installed rules
    33 doc/55-lfs.txt
    34 doc/README
     3255-lfs.txt           - Documentation for LFS installed rules
    3533
    3634cfg.h                - Basic info needed for udev compilation
Note: See TracChangeset for help on using the changeset viewer.