Changeset 673b0d8 for chapter07


Ignore:
Timestamp:
05/03/2004 10:59:46 AM (20 years ago)
Author:
Matthew Burgess <matthew@…>
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, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 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, v5_1, v5_1_1, 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:
0c43171, 2ec64b3, a4a675f
Parents:
287ea55
Message:
  • Merged newxml into HEAD

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

Location:
chapter07
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • chapter07/bootscripts.xml

    r287ea55 r673b0d8  
    1 <sect1 id="ch-system-lfs-bootscripts" xreflabel="Bootscripts">
    2 <title>Installing LFS-Bootscripts-&bootscripts-version;</title>
    3 <?dbhtml filename="bootscripts.html" dir="chapter07"?>
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
     6<sect1 id="ch-scripts-bootscripts" xreflabel="Bootscripts">
     7<title>LFS-Bootscripts-&bootscripts-version;</title>
     8<?dbhtml filename="bootscripts.html"?>
     9
     10<indexterm zone="ch-scripts-bootscripts"><primary sortas="a-Bootscripts">Bootscripts</primary></indexterm>
    411
    512<para>The LFS-Bootscripts package contains a set of bootscripts.</para>
    613
    7 <screen>&buildtime; &bootscripts-time;
    8 &diskspace; &bootscripts-compsize;</screen>
     14<screen>&buildtime; 0.1 SBU
     15&diskspace; 0.3 MB</screen>
    916
    10 &bootscripts-down;
    11 &bootscripts-dep;
     17<para>LFS-Bootscripts installation depends on: Bash, Coreutils.</para>
    1218
    13 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     19
    1420
    1521<sect2>
    1622<title>Installation of LFS-Bootscripts</title>
    1723
    18 <para>Install the boot scripts simply by copying them to their
    19 destination:</para>
     24<para>Installation of the bootscripts is very simple:</para>
    2025
    21 <screen><userinput>cp -a rc.d sysconfig /etc</userinput></screen>
    22 
    23 <para>Make sure <emphasis>root</emphasis> is owner of the scripts:</para>
    24 
    25 <screen><userinput>chown -R root:root /etc/rc.d /etc/sysconfig</userinput></screen>
     26<screen><userinput>make install</userinput></screen>
    2627
    2728</sect2>
    2829
    29 &bootscripts-shortdesc;
    30 &bootscripts-desc;
     30
     31<sect2 id="contents-bootscripts"><title>Contents of LFS-bootscripts</title>
     32
     33<para><emphasis>Installed scripts</emphasis>: checkfs, cleanfs, functions,
     34halt, ifdown, ifup, loadkeys, localnet, mountfs, mountkernfs, network, rc,
     35reboot, sendsignals, setclock, static, swap, sysklogd and template</para>
     36
     37</sect2>
     38
     39
     40<sect2><title>Short descriptions</title>
     41
     42<indexterm zone="ch-scripts-bootscripts checkfs-bootscripts"><primary sortas="d-checkfs">checkfs</primary></indexterm>
     43<para id="checkfs-bootscripts">The <command>checkfs</command> script checks the file systems just
     44before they are mounted (with the exception of journal and network based
     45file systems).</para>
     46
     47<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts"><primary sortas="d-cleanfs">cleanfs</primary></indexterm>
     48<para id="cleanfs-bootscripts">The <command>cleanfs</command> script removes files that shouldn't be
     49preserved between reboots, such as those in <filename>/var/run/</filename> and
     50<filename>/var/lock/</filename>. It re-creates <filename>/var/run/utmp</filename>
     51and removes the possibly present <filename>/etc/nologin</filename>,
     52<filename>/fastboot</filename> and <filename>/forcefsck</filename> files.</para>
     53
     54<indexterm zone="ch-scripts-bootscripts functions-bootscripts"><primary sortas="d-functions">functions</primary></indexterm>
     55<para id="functions-bootscripts">The <command>functions</command> script contains functions shared among
     56different scripts, such as error and status checking.</para>
     57
     58<indexterm zone="ch-scripts-bootscripts halt-bootscripts"><primary sortas="d-halt">halt</primary></indexterm>
     59<para id="halt-bootscripts">The <command>halt</command> script halts the system.</para>
     60
     61<indexterm zone="ch-scripts-bootscripts ifdown-bootscripts"><primary sortas="d-ifdown">ifdown</primary></indexterm>
     62<para id="ifdown-bootscripts">The <command>ifdown</command> and <command>ifup</command> scripts assist
     63the network script with network devices.</para>
     64
     65<indexterm zone="ch-scripts-bootscripts loadkeys-bootscripts"><primary sortas="d-loadkeys">loadkeys</primary></indexterm>
     66<para id="loadkeys-bootscripts">The <command>loadkeys</command> script loads the keymap table you
     67specified as proper for your keyboard layout.</para>
     68
     69<indexterm zone="ch-scripts-bootscripts localnet-bootscripts"><primary sortas="d-localnet">localnet</primary></indexterm>
     70<para id="localnet-bootscripts">The <command>localnet</command> script sets up the system's hostname and
     71local loopback device.</para>
     72
     73<indexterm zone="ch-scripts-bootscripts mountfs-bootscripts"><primary sortas="d-mountfs">mountfs</primary></indexterm>
     74<para id="mountfs-bootscripts">The <command>mountfs</command> script mounts all file systems that
     75aren't marked <emphasis>noauto</emphasis> or aren't network based.</para>
     76
     77<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts"><primary sortas="d-mountkernfs">mountkernfs</primary></indexterm>
     78<para id="mountkernfs-bootscripts">The <command>mountkernfs</command> script is used to mount
     79kernel-provided file systems, such as /proc.</para>
     80
     81<indexterm zone="ch-scripts-bootscripts network-bootscripts"><primary sortas="d-network">network</primary></indexterm>
     82<para id="network-bootscripts">The <command>network</command> script sets up network interfaces, such
     83as network cards, and sets up the default gateway where applicable.</para>
     84
     85<indexterm zone="ch-scripts-bootscripts rc-bootscripts"><primary sortas="d-rc">rc</primary></indexterm>
     86<para id="rc-bootscripts">The <command>rc</command> script is the master run-level control script.
     87It is responsible for running all the other scripts one-by-one, in a sequence
     88determined by the name of the symbolic links being processed.</para>
     89
     90<indexterm zone="ch-scripts-bootscripts reboot-bootscripts"><primary sortas="d-reboot">reboot</primary></indexterm>
     91<para id="reboot-bootscripts">The <command>reboot</command> script reboots the system.</para>
     92
     93<indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts"><primary sortas="d-sendsignals">sendsignals</primary></indexterm>
     94<para id="sendsignals-bootscripts">The <command>sendsignals</command> script makes sure every process is
     95terminated before the system reboots or halts.</para>
     96
     97<indexterm zone="ch-scripts-bootscripts setclock-bootscripts"><primary sortas="d-setclock">setclock</primary></indexterm>
     98<para id="setclock-bootscripts">The <command>setclock</command> script resets the kernel clock to
     99localtime in case the hardware clock isn't set to GMT time.</para>
     100
     101<indexterm zone="ch-scripts-bootscripts static-bootscripts"><primary sortas="d-static">static</primary></indexterm>
     102<para id="static-bootscripts">The <command>static</command> script provides the functionality needed
     103to assign a static IP address to a network interface.</para>
     104
     105<indexterm zone="ch-scripts-bootscripts swap-bootscripts"><primary sortas="d-swap">swap</primary></indexterm>
     106<para id="swap-bootscripts">The <command>swap</command> script enables and disables swap files and
     107partitions.</para>
     108
     109<indexterm zone="ch-scripts-bootscripts sysklogd-bootscripts"><primary sortas="d-sysklogd">sysklogd</primary></indexterm>
     110<para id="sysklogd-bootscripts">The <command>sysklogd</command> script starts and stops the system and
     111kernel log daemons.</para>
     112
     113<indexterm zone="ch-scripts-bootscripts template-bootscripts"><primary sortas="d-template">template</primary></indexterm>
     114<para id="template-bootscripts">The <command>template</command> script is a template you can use to
     115create your own bootscripts for your other daemons.</para>
     116
     117</sect2>
     118
     119
    31120
    32121</sect1>
    33 
  • chapter07/chapter07.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<chapter id="chapter-bootscripts" xreflabel="Chapter 7">
     7<?dbhtml dir="chapter07"?>
    28<title>Setting up system boot scripts</title>
    3 <?dbhtml filename="chapter07.html" dir="chapter07"?>
     9<?dbhtml filename="chapter07.html"?>
    410
    511
    6 <sect1 id="ch-scripts-introduction">
    7 <title>Introduction</title>
    8 <?dbhtml filename="introduction.html" dir="chapter07"?>
    9 
    10 <para>In this chapter we will install the bootscripts and set them up
    11 properly. Most of these scripts will work without needing to modify them, but
    12 a few require additional configuration files, since they deal with hardware
    13 dependent information.</para>
    14 
    15 <para>We have chosen to use System-V style init scripts simply because they
    16 are widely used and we feel comfortable with them. If you would prefer to try
    17 something else: Marc Heerdink has written a hint about BSD style init scripts,
    18 to be found at <ulink url="&hints-root;bsd-init.txt"/>. And if you'd like
    19 something more radical, search the LFS mailing lists for "depinit".</para>
    20 
    21 <para>If you decide to use some other style of init scripts, you can skip this
    22 chapter and move on to <xref linkend="chapter-mixture"/>.</para>
    23 
    24 </sect1>
     12<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
    2513
    2614
    27 &bootscripts;
    28 &c7-usage;
    29 &c7-setclock;
    30 &c7-loadkeys;
    31 &c7-sysklogd;
    32 &c7-hostname;
    33 &c7-hosts;
    34 &c7-network;
     15<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts.xml"/>
     16
     17
     18<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="usage.xml"/>
     19
     20
     21<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="setclock.xml"/>
     22
     23
     24<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="loadkeys.xml"/>
     25
     26
     27<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>
     28
     29
     30<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostname.xml"/>
     31
     32
     33<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hosts.xml"/>
     34
     35
     36<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network.xml"/>
     37
     38
    3539
    3640</chapter>
    37 
  • chapter07/hostname.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-hostname">
    27<title>Configuring the localnet script</title>
    3 <?dbhtml filename="hostname.html" dir="chapter07"?>
     8<?dbhtml filename="hostname.html"?>
     9
     10<indexterm zone="ch-scripts-hostname">
     11<primary sortas="d-localnet">localnet</primary>
     12<secondary>configuring</secondary></indexterm>
    413
    514<para>Part of the localnet script is setting up the system's hostname. This
     
    1726
    1827</sect1>
    19 
  • chapter07/hosts.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-hosts">
    27<title>Creating the /etc/hosts file</title>
    3 <?dbhtml filename="hosts.html" dir="chapter07"?>
     8<?dbhtml filename="hosts.html"?>
     9
     10<indexterm zone="ch-scripts-hosts"><primary sortas="e-/etc/hosts">/etc/hosts</primary></indexterm>
     11
     12<indexterm zone="ch-scripts-hosts">
     13<primary sortas="d-localnet">localnet</primary>
     14<secondary>/etc/hosts</secondary></indexterm>
     15
     16<indexterm zone="ch-scripts-hosts">
     17<primary sortas="d-network">network</primary>
     18<secondary>/etc/hosts</secondary></indexterm>
    419
    520<para>If a network card is to be configured, you have to decide on the
     
    924<screen>&lt;IP address&gt; myhost.example.org aliases</screen>
    1025
    11 <para>You should make sure that the IP-address is in the private network
     26<para>Unless your computer is to be visible to the Internet (e.g. you have a registered domain and a valid block of assigned IP addresses - most of us don't have this)you should make sure that the IP-address is in the private network
    1227IP-address range. Valid ranges are:</para>
    1328
     
    1833
    1934<para>A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
    20 be www.linuxfromscratch.org.</para>
     35be www.linuxfromscratch.org (not recommended as this is a valid registered domain address and could cause your domain name server problems).</para>
    2136
    2237<para>If you aren't going to use a network card, you still need to
     
    5368
    5469</sect1>
    55 
  • chapter07/loadkeys.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-loadkeys">
    27<title>Do I need the loadkeys script?</title>
    3 <?dbhtml filename="loadkeys.html" dir="chapter07"?>
     8<?dbhtml filename="loadkeys.html"?>
    49
    5 <para>If back in <xref linkend="chapter-building-system"/> you decided to go
    6 compile your keymap directly into the kernel (later on in <xref
    7 linkend="chapter-mixture"/>), then strictly speaking you don't need to run this
    8 loadkeys script, since the kernel will set up the keymap for you. If you wish,
    9 you can still run the script, it isn't going to hurt you. Keeping it could even
    10 be beneficial, in case you run a lot of different kernels and can't be sure
    11 that the keymap is compiled into every one of them.</para>
     10<indexterm zone="ch-scripts-loadkeys">
     11<primary sortas="d-loadkeys">loadkeys</primary>
     12<secondary>configuring</secondary></indexterm>
     13
     14<para>If you plan to compile the keymap directly in the kernel during <xref
     15linkend="chapter-bootable"/> (see <xref linkend="ch-system-kbd"/>), then strictly
     16speaking you don't need to run this loadkeys script, since the kernel will set
     17up the keymap for you. If you wish, you can still run the script, it isn't going
     18to hurt you. Keeping it could even be beneficial, in case you run a lot of
     19different kernels and can't be sure that the keymap is compiled into every one
     20of them.</para>
    1221
    1322<para>If you decided you don't need or don't want to use the loadkeys script,
    14 remove the <filename
    15 class="symlink">/etc/rc.d/rcsysinit.d/S70loadkeys</filename> symlink.</para>
     23remove the <filename class="symlink">/etc/rc.d/rcsysinit.d/S70loadkeys</filename> symlink.</para>
    1624
    1725</sect1>
    18 
  • chapter07/network.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-network">
    27<title>Configuring the network script</title>
    3 <?dbhtml filename="network.html" dir="chapter07"?>
     8<?dbhtml filename="network.html"?>
     9
     10<indexterm zone="ch-scripts-network">
     11<primary sortas="d-network">network</primary>
     12<secondary>configuring</secondary></indexterm>
    413
    514<para>This section only applies if you're going to configure a network
     
    918create any configuration files relating to network cards. If that is the
    1019case, you must remove the <filename>network</filename> symlinks from all the
    11 runlevel directories
     20run-level directories
    1221(<filename class="directory">/etc/rc.d/rc*.d</filename>)</para>
    1322
     
    1524<title>Configuring default gateway</title>
    1625
    17 <para>If you're on a network you may need to set up the default gateway for
     26<para>If you're on a network you may need to set up the default gateway (a node on your network that provides access to other networks) for
    1827this machine. This is done by adding the proper values to the
    1928/etc/sysconfig/network file by running the following:</para>
     
    4352update the network_devices by providing it with the new path.</para>
    4453
    45 <para>Now, new files are created in that directory containing the following.
     54<para>Now, new files are created in that directory.
    4655The following command creates a sample ifconfig.eth0 file:</para>
    4756
    4857<screen><userinput>cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0 &lt;&lt; "EOF"</userinput>
    4958ONBOOT=yes
     59SERVICE=static
    5060IP=192.168.1.1
    5161NETMASK=255.255.255.0
     
    5565<para>Of course, the values of those variables have to be changed
    5666in every file to match the proper setup. If the ONBOOT variable is set
    57 to yes, the network script will bring it up during the booting of the system.
    58 If set to anything else but yes, it will be ignored by the network script
    59 and thus not brought up.</para>
     67to yes, the network script will bring up the equivalent NIC (Network Interface Card)
     68 during the booting of the system.
     69If set to anything but yes, the equivalent NIC will be ignored by the network script
     70and not brought up.</para>
     71
     72<para>The SERVICE entry defines the method of obtaining the IP address.
     73The LFS bootscripts have a modular IP assignment format, and by creating
     74additional files in /etc/sysconfig/network-devices/services, you can allow
     75other IP assignment methods.  This would commonly be used if you need DHCP,
     76which is addressed in the BLFS book.</para>
    6077
    6178</sect2>
     
    6481<title>Creating the /etc/resolv.conf file</title>
    6582
    66 <para>If you're going to be connected to the internet then most likely you'll
    67 need some means of DNS name resolution to resolve internet domain names to IP
    68 addresses. This is best achieved by placing the IP address of a DNS server
     83<para>If you're going to be connected to the Internet then most likely you'll
     84need some means of DNS name resolution to resolve Internet domain names to IP
     85addresses. This is best achieved by placing the IP address of your DNS, available from your ISP (Internet Service Provider) or network administrator,
    6986into <filename>/etc/resolv.conf</filename>. Create the file by running the
    7087following:</para>
     
    7996
    8097<para>Of course, replace &lt;IP address of your nameserver&gt; with the IP
    81 address of the DNS server most appropriate for your setup. This will often be
    82 provided by your ISP or it may even be a router on your local network.</para>
     98address of the DNS most appropriate for your setup. There will often be
     99more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.</para>
    83100
    84101</sect2>
    85102
    86103</sect1>
    87 
  • chapter07/setclock.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-setclock">
    27<title>Configuring the setclock script</title>
    3 <?dbhtml filename="setclock.html" dir="chapter07"?>
     8<?dbhtml filename="setclock.html"?>
    49
    5 <para>This setclock script reads the time from your hardware clock (also
    6 known as BIOS or CMOS clock) and either converts that time to localtime
     10<indexterm zone="ch-scripts-setclock">
     11<primary sortas="d-setclock">setclock</primary>
     12<secondary>configuring</secondary></indexterm>
     13
     14<para>This setclock script reads the time from your hardware clock, also
     15known as BIOS or CMOS (Complementry Metal-Oxide Semiconductor) clock, and either converts that time to localtime
    716using the <filename>/etc/localtime</filename> file (if the hardware clock
    817is set to GMT) or not (if the hardware clock is already set to localtime).
     
    3140
    3241</sect1>
    33 
  • chapter07/sysklogd.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-sysklogd">
    27<title>Configuring the sysklogd script</title>
    3 <?dbhtml filename="sysklogd.html" dir="chapter07"?>
     8<?dbhtml filename="sysklogd.html"?>
     9
     10<indexterm zone="ch-scripts-sysklogd">
     11<primary sortas="d-sysklogd">sysklogd</primary>
     12<secondary>configuring</secondary></indexterm>
    413
    514<para>The <filename>sysklogd</filename> script invokes the
     
    1221
    1322</sect1>
    14 
  • chapter07/usage.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-scripts-usage">
    27<title>How does the booting process with these scripts work?</title>
    3 <?dbhtml filename="usage.html" dir="chapter07"?>
     8<?dbhtml filename="usage.html"?>
     9
     10<indexterm zone="ch-scripts-usage">
     11<primary sortas="a-Bootscripts">Bootscripts</primary>
     12<secondary>usage</secondary></indexterm>
    413
    514<para>Linux uses a special booting facility named SysVinit. It's based on a
    6 concept of <emphasis>runlevels</emphasis>. It can be widely different
     15concept of <emphasis>run-levels</emphasis>. It can be widely different
    716from one system to another, so it can't be assumed that because things
    817worked in &lt;insert distro name&gt; they should work like that in LFS
     
    1120
    1221<para>SysVinit (which we'll call <emphasis>init</emphasis> from now on) works
    13 using a runlevels scheme. There are 7 (from 0 to 6) runlevels
    14 (actually, there are more runlevels but they are for special cases and
     22using a run-levels scheme. There are 7 (from 0 to 6) run-levels
     23(actually, there are more run-levels but they are for special cases and
    1524generally not used. The init man page describes those details), and each
    1625one of those corresponds to the things the computer is supposed to do when
    17 it starts up. The default runlevel is 3. Here are the descriptions of the
    18 different runlevels as they are often implemented:</para>
     26it starts up. The default run-level is 3. Here are the descriptions of the
     27different run-levels as they are often implemented:</para>
    1928
    2029<literallayout>0: halt the computer
     
    26356: reboot the computer</literallayout>
    2736
    28 <para>The command used to change runlevels is <command>init
    29 &lt;runlevel&gt;</command> where &lt;runlevel&gt; is the target runlevel. For
     37<para>The command used to change run-levels is <command>init
     38&lt;runlevel&gt;</command> where &lt;runlevel&gt; is the target run-level. For
    3039example, to reboot the computer, a user would issue the <command>init
    31406</command> command. The <command>reboot</command> command is just an alias for
     
    3443
    3544<para>There are a number of directories under <filename>/etc/rc.d</filename>
    36 that look like like rc?.d where ? is the number of the runlevel and rcsysinit.d
    37 which contain a number of symbolic links. Some begin with a K, the others begin
     45that look like like rc?.d (where ? is the number of the run-level) and rcsysinit.d
     46all containing a number of symbolic links. Some begin with a K, the others begin
    3847with an S, and all of them have two numbers following the initial letter. The K
    3948means to stop (kill) a service, and the S means to start a service. The numbers
    4049determine the order in which the scripts are run, from 00 to 99; the lower the
    41 number the sooner it gets executed. When init switches to another runlevel, the
     50number the sooner it gets executed. When init switches to another run-level, the
    4251appropriate services get killed and others get started.</para>
    4352
     
    4756called with different parameters like start, stop, restart, reload,
    4857status. When a K link is encountered, the appropriate script is run with
    49 the stop argument. When a S link is encountered, the appropriate script
     58the stop argument. When an S link is encountered, the appropriate script
    5059is run with the start argument.</para>
    5160
     
    8695
    8796</sect1>
    88 
Note: See TracChangeset for help on using the changeset viewer.