Необязательный
файл /etc/sysconfig/rc.site
содержит
настройки,
автоматически
подхватываемые
всеми
загрузочными
скриптами.
Этот файл
может
содержать
парамеры,
обычно
указываемые
в файлах hostname
, console
и clock
из
каталога /etc/sysconfig/
. Если
значение
одной и той
же
переменной
присваивается
и в одном из
этих
файлов, и в
rc.site
,
приоритет
имеет
значение
из
специализированного
файла.
Также rc.site
может
содержать
параметры,
так или
иначе
влияющие
на другие
аспекты
процесса
загрузки.
Объявление
переменной
IPROMT включит
интерактивную
загрузку -
выборочный
запуск
загрузочных
скриптов.
Другие
параметры
описаны в
комментариях
внутри
самого
файла. По
умолчанию
этот файл
выглядит
так:
# rc.site # Optional parameters for boot scripts. # Distro Information # These values, if specified here, override the defaults #DISTRO="Linux From Scratch" # The distro name #DISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report address #DISTRO_MINI="LFS" # Short name used in filenames for distro config # Define custom colors used in messages printed to the screen # Please consult `man console_codes` for more information # under the "ECMA-48 Set Graphics Rendition" section # # Warning: when switching from a 8bit to a 9bit font, # the linux console will reinterpret the bold (1;) to # the top 256 glyphs of the 9bit font. This does # not affect framebuffer consoles # These values, if specified here, override the defaults #BRACKET="\\033[1;34m" # Blue #FAILURE="\\033[1;31m" # Red #INFO="\\033[1;36m" # Cyan #NORMAL="\\033[0;39m" # Grey #SUCCESS="\\033[1;32m" # Green #WARNING="\\033[1;33m" # Yellow # Use a colored prefix # These values, if specified here, override the defaults #BMPREFIX=" " #SUCCESS_PREFIX="${SUCCESS} * ${NORMAL}" #FAILURE_PREFIX="${FAILURE}*****${NORMAL}" #WARNING_PREFIX="${WARNING} *** ${NORMAL}" # Interactive startup #IPROMPT="yes" # Whether to display the interactive boot prompt #itime="3" # The amount of time (in seconds) to display the prompt # The total length of the distro welcome string, without escape codes #wlen=$(echo "Welcome to ${DISTRO}" | wc -c ) #welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}" # The total length of the interactive string, without escape codes #ilen=$(echo "Press 'I' to enter interactive startup" | wc -c ) #i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup" # Set scripts to skip the file system check on reboot #FASTBOOT=yes # Skip reading from the console #HEADLESS=yes # Speed up boot without waiting for settle in udev_retry #OMIT_UDEV_RETRY_SETTLE=yes # Write out fsck progress if yes #VERBOSE_FSCK=no # Speed up boot without waiting for settle in udev #OMIT_UDEV_SETTLE=y # Speed up boot without waiting for settle in udev_retry #OMIT_UDEV_RETRY_SETTLE=yes # Skip cleaning /tmp if yes #SKIPTMPCLEAN=no # For setclock #UTC=1 #CLOCKPARAMS= # For consolelog #LOGLEVEL=5 # For network #HOSTNAME=mylfs # Delay between TERM and KILL signals at shutdown #KILLDELAY=3 # Optional sysklogd parameters #SYSKLOGD_PARMS="-m 0" # Console parameters #UNICODE=1 #KEYMAP="de-latin1" #KEYMAP_CORRECTIONS="euro2" #FONT="lat0-16 -m 8859-15" #LEGACY_CHARSET=
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
according to your preferences. To do this, adjust the settings in
the /etc/sysconfig/rc.site
file
above.
During the boot script udev
,
there is a call to udev
settle 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.
The boot script udev_retry
also
runs udev
settle by default. This command is only
needed by default if the /var
directory is separately mounted. This is because the clock
needs the file /var/lib/hwclock/adjtime
. 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.
By default, the file system checks are silent. This can appear to be a delay during the bootup process. To turn on the fsck output, set the variable VERBOSE_FSCK=y.
When rebooting, you may want to skip the filesystem check,
fsck,
completely. To do this, either create the file /fastboot
or reboot the system with the
command /sbin/shutdown -f -r
now. On the other hand, you can force all
file systems to be checked by creating /forcefsck
or running shutdown with the
-F
parameter instead
of -f
.
Setting the variable FASTBOOT=y will disable fsck during the boot process until it is removed. This is not recommended on a permanent basis.
Normally, all files in the /tmp
directory are deleted at boot time. Depending on the number
of files or directories present, this can cause a noticeable
delay in the boot process. To skip removing these files set
the variable SKIPTMPCLEAN=y.
During shutdown, the init 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 sendsignals script for any processes that are not shut down by their own scripts. The delay for init can be set by passing a parameter. For example to remove the delay in init, pass the -t0 parameter when shutting down or rebooting (e.g. /sbin/shutdown -t0 -r now). The delay for the sendsignals script can be skipped by setting the parameter KILLDELAY=0.