<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-util-linux" role="wrap">
  <?dbhtml filename="util-linux.html"?>

  <title>Util-linux-&util-linux-version;</title>

  <indexterm zone="ch-boot-util-linux">
    <primary sortas="a-Util-linux">Util-linux</primary>
    <secondary>boot</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../final-system/common/util-linux.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Util-linux</title>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p1'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p2'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p3'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p4'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p5'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p6'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p7'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='p8'])"/>

    <para os="ba">Util-linux does not use the freshly installed headers and
    libraries from the <filename class="directory">/tools</filename>
    directory by default. This is fixed by altering the
    <command>configure</command> script:</para>

<screen os="bb"><userinput>cp -v configure{,.orig}
sed -e 's@/usr/include@/tools/include@g' configure.orig &gt; configure</userinput></screen>

    <para os="bc">The Util-linux installation uses <option>-o root</option>.
    The following <command>sed</command> removes that since we don't have
    users setup yet:</para>

<screen os="bd"><userinput>cp -v MCONFIG{,.orig}
sed -e 's|-o root||' MCONFIG.orig > MCONFIG</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='a'])"/>

<screen os="be"><userinput>./configure</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/util-linux.xml"
    xpointer="xpointer(//*[@os='c'])"/>

<screen os="bf"><userinput>make HAVE_KILL=yes HAVE_SLN=yes \
    HAVE_SHADOW=no CPUOPT="" ARCH="" \
    CPU=""</userinput></screen>

    <variablelist os="bg">
      <title>The meaning of the make parameters:</title>

      <varlistentry>
        <term><parameter>HAVE_KILL=yes</parameter></term>
        <listitem>
          <para>This prevents the <command>kill</command> program 
          from being built.</para>
        </listitem>
      </varlistentry>

      <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
      href="../../final-system/common/util-linux.xml"
      xpointer="xpointer(//*[@os='e2'])"/>

      <varlistentry>
        <term><parameter>HAVE_SHADOW=no</parameter></term>
        <listitem>
          <para>This disables linking to shadow .</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>CPUOPT=""</parameter></term>
        <listitem>
          <para>This disables any compiler optimizations by CPU type.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>ARCH=""</parameter></term>
        <listitem>
          <para>This disables the detection of the architecture.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>CPU=""</parameter></term>
        <listitem>
          <para>This disables the detection of the CPU.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para os="bh">Install the package:</para>

<screen os="bi"><userinput>make HAVE_KILL=yes HAVE_SLN=yes HAVE_SHADOW=no \
    USE_TTY_GROUP=no CPUOPT="" ARCH="" \
    CPU="" DESTDIR=${CLFS} install</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-util-linux" role="."/></para>

  </sect2>

</sect1>
