- Timestamp:
- 05/03/2004 10:59:46 AM (20 years ago)
- 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
- 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> 4 11 5 12 <para>The LFS-Bootscripts package contains a set of bootscripts.</para> 6 13 7 <screen>&buildtime; &bootscripts-time;8 &diskspace; &bootscripts-compsize;</screen>14 <screen>&buildtime; 0.1 SBU 15 &diskspace; 0.3 MB</screen> 9 16 10 &bootscripts-down; 11 &bootscripts-dep; 17 <para>LFS-Bootscripts installation depends on: Bash, Coreutils.</para> 12 18 13 <sect2><title> </title><para> </para></sect2> 19 14 20 15 21 <sect2> 16 22 <title>Installation of LFS-Bootscripts</title> 17 23 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> 20 25 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> 26 27 27 28 </sect2> 28 29 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, 34 halt, ifdown, ifup, loadkeys, localnet, mountfs, mountkernfs, network, rc, 35 reboot, 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 44 before they are mounted (with the exception of journal and network based 45 file 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 49 preserved between reboots, such as those in <filename>/var/run/</filename> and 50 <filename>/var/lock/</filename>. It re-creates <filename>/var/run/utmp</filename> 51 and 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 56 different 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 63 the 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 67 specified 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 71 local 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 75 aren'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 79 kernel-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 83 as 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. 87 It is responsible for running all the other scripts one-by-one, in a sequence 88 determined 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 95 terminated 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 99 localtime 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 103 to 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 107 partitions.</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 111 kernel 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 115 create your own bootscripts for your other daemons.</para> 116 117 </sect2> 118 119 31 120 32 121 </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 ]> 1 6 <chapter id="chapter-bootscripts" xreflabel="Chapter 7"> 7 <?dbhtml dir="chapter07"?> 2 8 <title>Setting up system boot scripts</title> 3 <?dbhtml filename="chapter07.html" dir="chapter07"?>9 <?dbhtml filename="chapter07.html"?> 4 10 5 11 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"/> 25 13 26 14 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 35 39 36 40 </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 ]> 1 6 <sect1 id="ch-scripts-hostname"> 2 7 <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> 4 13 5 14 <para>Part of the localnet script is setting up the system's hostname. This … … 17 26 18 27 </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 ]> 1 6 <sect1 id="ch-scripts-hosts"> 2 7 <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> 4 19 5 20 <para>If a network card is to be configured, you have to decide on the … … 9 24 <screen><IP address> myhost.example.org aliases</screen> 10 25 11 <para> You should make sure that the IP-address is in the private network26 <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 12 27 IP-address range. Valid ranges are:</para> 13 28 … … 18 33 19 34 <para>A valid IP address could be 192.168.1.1. A valid FQDN for this IP could 20 be www.linuxfromscratch.org .</para>35 be www.linuxfromscratch.org (not recommended as this is a valid registered domain address and could cause your domain name server problems).</para> 21 36 22 37 <para>If you aren't going to use a network card, you still need to … … 53 68 54 69 </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 ]> 1 6 <sect1 id="ch-scripts-loadkeys"> 2 7 <title>Do I need the loadkeys script?</title> 3 <?dbhtml filename="loadkeys.html" dir="chapter07"?>8 <?dbhtml filename="loadkeys.html"?> 4 9 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 15 linkend="chapter-bootable"/> (see <xref linkend="ch-system-kbd"/>), then strictly 16 speaking you don't need to run this loadkeys script, since the kernel will set 17 up the keymap for you. If you wish, you can still run the script, it isn't going 18 to hurt you. Keeping it could even be beneficial, in case you run a lot of 19 different kernels and can't be sure that the keymap is compiled into every one 20 of them.</para> 12 21 13 22 <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> 23 remove the <filename class="symlink">/etc/rc.d/rcsysinit.d/S70loadkeys</filename> symlink.</para> 16 24 17 25 </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 ]> 1 6 <sect1 id="ch-scripts-network"> 2 7 <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> 4 13 5 14 <para>This section only applies if you're going to configure a network … … 9 18 create any configuration files relating to network cards. If that is the 10 19 case, you must remove the <filename>network</filename> symlinks from all the 11 run level directories20 run-level directories 12 21 (<filename class="directory">/etc/rc.d/rc*.d</filename>)</para> 13 22 … … 15 24 <title>Configuring default gateway</title> 16 25 17 <para>If you're on a network you may need to set up the default gateway for26 <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 18 27 this machine. This is done by adding the proper values to the 19 28 /etc/sysconfig/network file by running the following:</para> … … 43 52 update the network_devices by providing it with the new path.</para> 44 53 45 <para>Now, new files are created in that directory containing the following.54 <para>Now, new files are created in that directory. 46 55 The following command creates a sample ifconfig.eth0 file:</para> 47 56 48 57 <screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</userinput> 49 58 ONBOOT=yes 59 SERVICE=static 50 60 IP=192.168.1.1 51 61 NETMASK=255.255.255.0 … … 55 65 <para>Of course, the values of those variables have to be changed 56 66 in 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> 67 to yes, the network script will bring up the equivalent NIC (Network Interface Card) 68 during the booting of the system. 69 If set to anything but yes, the equivalent NIC will be ignored by the network script 70 and not brought up.</para> 71 72 <para>The SERVICE entry defines the method of obtaining the IP address. 73 The LFS bootscripts have a modular IP assignment format, and by creating 74 additional files in /etc/sysconfig/network-devices/services, you can allow 75 other IP assignment methods. This would commonly be used if you need DHCP, 76 which is addressed in the BLFS book.</para> 60 77 61 78 </sect2> … … 64 81 <title>Creating the /etc/resolv.conf file</title> 65 82 66 <para>If you're going to be connected to the internet then most likely you'll67 need some means of DNS name resolution to resolve internet domain names to IP68 addresses. This is best achieved by placing the IP address of a DNS server83 <para>If you're going to be connected to the Internet then most likely you'll 84 need some means of DNS name resolution to resolve Internet domain names to IP 85 addresses. This is best achieved by placing the IP address of your DNS, available from your ISP (Internet Service Provider) or network administrator, 69 86 into <filename>/etc/resolv.conf</filename>. Create the file by running the 70 87 following:</para> … … 79 96 80 97 <para>Of course, replace <IP address of your nameserver> with the IP 81 address of the DNS server most appropriate for your setup. Thiswill often be82 provided by your ISP or itmay even be a router on your local network.</para>98 address of the DNS most appropriate for your setup. There will often be 99 more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.</para> 83 100 84 101 </sect2> 85 102 86 103 </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 ]> 1 6 <sect1 id="ch-scripts-setclock"> 2 7 <title>Configuring the setclock script</title> 3 <?dbhtml filename="setclock.html" dir="chapter07"?>8 <?dbhtml filename="setclock.html"?> 4 9 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 15 known as BIOS or CMOS (Complementry Metal-Oxide Semiconductor) clock, and either converts that time to localtime 7 16 using the <filename>/etc/localtime</filename> file (if the hardware clock 8 17 is set to GMT) or not (if the hardware clock is already set to localtime). … … 31 40 32 41 </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 ]> 1 6 <sect1 id="ch-scripts-sysklogd"> 2 7 <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> 4 13 5 14 <para>The <filename>sysklogd</filename> script invokes the … … 12 21 13 22 </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 ]> 1 6 <sect1 id="ch-scripts-usage"> 2 7 <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> 4 13 5 14 <para>Linux uses a special booting facility named SysVinit. It's based on a 6 concept of <emphasis>run levels</emphasis>. It can be widely different15 concept of <emphasis>run-levels</emphasis>. It can be widely different 7 16 from one system to another, so it can't be assumed that because things 8 17 worked in <insert distro name> they should work like that in LFS … … 11 20 12 21 <para>SysVinit (which we'll call <emphasis>init</emphasis> from now on) works 13 using a run levels scheme. There are 7 (from 0 to 6) runlevels14 (actually, there are more run levels but they are for special cases and22 using 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 15 24 generally not used. The init man page describes those details), and each 16 25 one of those corresponds to the things the computer is supposed to do when 17 it starts up. The default run level is 3. Here are the descriptions of the18 different run levels as they are often implemented:</para>26 it starts up. The default run-level is 3. Here are the descriptions of the 27 different run-levels as they are often implemented:</para> 19 28 20 29 <literallayout>0: halt the computer … … 26 35 6: reboot the computer</literallayout> 27 36 28 <para>The command used to change run levels is <command>init29 <runlevel></command> where <runlevel> is the target run level. For37 <para>The command used to change run-levels is <command>init 38 <runlevel></command> where <runlevel> is the target run-level. For 30 39 example, to reboot the computer, a user would issue the <command>init 31 40 6</command> command. The <command>reboot</command> command is just an alias for … … 34 43 35 44 <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 runleveland rcsysinit.d37 which containa number of symbolic links. Some begin with a K, the others begin45 that look like like rc?.d (where ? is the number of the run-level) and rcsysinit.d 46 all containing a number of symbolic links. Some begin with a K, the others begin 38 47 with an S, and all of them have two numbers following the initial letter. The K 39 48 means to stop (kill) a service, and the S means to start a service. The numbers 40 49 determine 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 run level, the50 number the sooner it gets executed. When init switches to another run-level, the 42 51 appropriate services get killed and others get started.</para> 43 52 … … 47 56 called with different parameters like start, stop, restart, reload, 48 57 status. When a K link is encountered, the appropriate script is run with 49 the stop argument. When a S link is encountered, the appropriate script58 the stop argument. When an S link is encountered, the appropriate script 50 59 is run with the start argument.</para> 51 60 … … 86 95 87 96 </sect1> 88
Note:
See TracChangeset
for help on using the changeset viewer.