📄 util-linux.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> 10.52. Util-linux-2.12r </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-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="tar.html" title="Tar-1.15.1">Prev</a> <p> Tar-1.15.1 </p> </li> <li class="next"> <a accesskey="n" href="udev.html" title="Udev-090">Next</a> <p> Udev-090 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.52. Util-linux-2.12r </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Util-linux package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Bash, Binutils, Coreutils, Diffutils, E2fsprogs, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, Sed, and Zlib</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <a id="fhs-util-linux" name="fhs-util-linux"></a> <h2 class="sect2"> 10.52.1. FHS compliance notes </h2> </div> <p> The FHS recommends using the <tt class= "filename">/var/lib/hwclock</tt> directory instead of the usual <tt class="filename">/etc</tt> directory as the location for the <tt class="filename">adjtime</tt> file. To make the <span><strong class="command">hwclock</strong></span> program FHS-compliant, run the following: </p> <pre class="userinput"><kbd class="command">sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ hwclock/hwclock.cmkdir -pv /var/lib/hwclock</kbd></pre> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.52.2. Installation of Util-linux </h2> </div> <p> Util-linux fails to compile against newer versions of Linux-Libc-Headers. The following patch properly fixes this issue: </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../util-linux-2.12r-cramfs-1.patch</kbd></pre> <p> The following patch fixes build issues with GCC 4.1.0: </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../util-linux-2.12r-gcc4_fixes-1.patch</kbd></pre> <p> Prepare Util-linux for compilation: </p> <pre class="userinput"><kbd class="command">./configure</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make HAVE_KILL=yes HAVE_SLN=yes</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the make parameters:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>HAVE_KILL=yes</tt></em></span> </dt> <dd> <p> This prevents the <span><strong class= "command">kill</strong></span> program (already installed by Procps) from being built and installed again. </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>HAVE_SLN=yes</tt></em></span> </dt> <dd> <p> This prevents the <span><strong class= "command">sln</strong></span> program (a statically linked version of <span><strong class="command">ln</strong></span> already installed by Glibc) from being built and installed again. </p> </dd> </dl> </div> <p> This package does not come with a test suite. </p> <p> Install the package and move the <span><strong class= "command">logger</strong></span> binary to <tt class= "filename">/bin</tt> as it is needed by the LFS-Bootscripts package: </p> <pre class="userinput"><kbd class="command">make HAVE_KILL=yes HAVE_SLN=yes installmv -v /usr/bin/logger /bin</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-util-linux" name="contents-util-linux"></a> <h2 class="sect2"> 10.52.3. Contents of Util-linux </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed programs:</span></strong> <span class="seg">agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root, ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags (link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapdev, swapoff (link to swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis, and write</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3689687" name="id3689687"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="agetty" name="agetty"></a><span class= "term"><span><strong class= "command">agetty</strong></span></span> </td> <td> <p> Opens a tty port, prompts for a login name, and then invokes the <span><strong class= "command">login</strong></span> program </p> </td> </tr> <tr> <td> <a id="arch" name="arch"></a><span class= "term"><span><strong class= "command">arch</strong></span></span> </td> <td> <p> Reports the machine's architecture </p> </td> </tr> <tr> <td> <a id="blockdev" name="blockdev"></a><span class= "term"><span><strong class= "command">blockdev</strong></span></span> </td> <td> <p> Allows users to call block device ioctls from the command line </p> </td> </tr> <tr> <td> <a id="cal" name="cal"></a><span class= "term"><span><strong class= "command">cal</strong></span></span> </td> <td> <p> Displays a simple calendar </p> </td> </tr> <tr> <td> <a id="cfdisk" name="cfdisk"></a><span class= "term"><span><strong class= "command">cfdisk</strong></span></span> </td> <td> <p> Manipulates the partition table of the given device </p> </td> </tr> <tr> <td> <a id="chkdupexe" name="chkdupexe"></a><span class= "term"><span><strong class= "command">chkdupexe</strong></span></span> </td> <td> <p> Finds duplicate executables </p> </td> </tr> <tr> <td> <a id="col" name="col"></a><span class= "term"><span><strong class= "command">col</strong></span></span> </td> <td> <p> Filters out reverse line feeds </p> </td> </tr> <tr> <td> <a id="colcrt" name="colcrt"></a><span class= "term"><span><strong class= "command">colcrt</strong></span></span> </td> <td> <p> Filters <span><strong class= "command">nroff</strong></span> output for terminals that lack some capabilities, such as overstriking and half-lines </p> </td> </tr> <tr> <td> <a id="colrm" name="colrm"></a><span class= "term"><span><strong class= "command">colrm</strong></span></span> </td> <td> <p> Filters out the given columns </p> </td> </tr> <tr> <td> <a id="column" name="column"></a><span class= "term"><span><strong class= "command">column</strong></span></span> </td> <td> <p> Formats a given file into multiple columns </p> </td> </tr> <tr> <td> <a id="ctrlaltdel" name="ctrlaltdel"></a><span class= "term"><span><strong class= "command">ctrlaltdel</strong></span></span> </td> <td> <p> Sets the function of the Ctrl+Alt+Del key combination to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -