📄 sysvinit.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 7.6. Sysvinit-2.86 </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-x86_64-Pure64"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64 </h4> <h3> Chapter 7. If You Are Going to Boot </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="e2fsprogs.html" title= "E2fsprogs-1.38">Prev</a> <p> E2fsprogs-1.38 </p> </li> <li class="next"> <a accesskey="n" href="module-init-tools.html" title= "Module-Init-Tools-3.2.2">Next</a> <p> Module-Init-Tools-3.2.2 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 7.6. Sysvinit-2.86 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Sysvinit package contains programs for controlling the startup, running, and shutdown of the system. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Binutils, Coreutils, GCC, Glibc, Make, and Sed</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 7.6.1. Installation of Sysvinit </h2> </div> <p> Now we do some modifications so we can boot into this during our build: </p> <pre class="userinput"><kbd class="command">cp -v src/Makefile src/Makefile.origsed -e 's@root@0@g' \ -e "s@/dev/initctl@${LFS}&@g" \ -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \ -e "s@/usr/lib@/tools/lib@" \ src/Makefile.orig > src/Makefile</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make -C src clobbermake -C src CC="${CC} ${BUILD64}"</kbd></pre> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make -C src install INSTALL="install" ROOT="${LFS}"</kbd></pre> </div> <div class="configuration" lang="en" xml:lang="en"> <div class="titlepage"> <a id="conf-tools-sysvinit" name="conf-tools-sysvinit"></a> <h2 class="sect2"> 7.6.2. Configuring Sysvinit </h2> </div> <p> Create a new file <tt class="filename">${LFS}/etc/inittab</tt> by running the following: </p> <pre class="userinput"><kbd class="command">cat > ${LFS}/etc/inittab << "EOF"<tt class="literal"># Begin /etc/inittabid:3:initdefault:si::sysinit:/etc/rc.d/init.d/rc sysinitl0:0:wait:/etc/rc.d/init.d/rc 0l1:S1:wait:/etc/rc.d/init.d/rc 1l2:2:wait:/etc/rc.d/init.d/rc 2l3:3:wait:/etc/rc.d/init.d/rc 3l4:4:wait:/etc/rc.d/init.d/rc 4l5:5:wait:/etc/rc.d/init.d/rc 5l6:6:wait:/etc/rc.d/init.d/rc 6ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r nowsu:S016:once:/sbin/sulogin1:2345:respawn:/sbin/agetty -I '\033(K' tty1 96002:2345:respawn:/sbin/agetty -I '\033(K' tty2 96003:2345:respawn:/sbin/agetty -I '\033(K' tty3 96004:2345:respawn:/sbin/agetty -I '\033(K' tty4 96005:2345:respawn:/sbin/agetty -I '\033(K' tty5 96006:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600# End /etc/inittab</tt>EOF</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <p> Details on this package are located in <a href= "../final-system/sysvinit.html#contents-sysvinit" title= "10.50.3. Contents of Sysvinit">Section 10.50.3, “Contents of Sysvinit.”</a> </p> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="e2fsprogs.html" title= "E2fsprogs-1.38">Prev</a> <p> E2fsprogs-1.38 </p> </li> <li class="next"> <a accesskey="n" href="module-init-tools.html" title= "Module-Init-Tools-3.2.2">Next</a> <p> Module-Init-Tools-3.2.2 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -