<?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='a'])"/>

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

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

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

    <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 configure script:</para>

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

    <para os="bc">Util-linux installs 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 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='c'])"/>

<screen><userinput>./configure</userinput></screen>

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

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

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

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

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

      <varlistentry>
        <term><parameter>HAVE_SHADOW=no</parameter></term>
        <listitem>
          <para>This do ... .</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>CPUOPT=""</parameter></term>
        <listitem>
          <para>This do ... .</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>ARCH=""</parameter></term>
        <listitem>
          <para>This do ... .</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>CPU=""</parameter></term>
        <listitem>
          <para>This do ... .</para>
        </listitem>
      </varlistentry>

    </variablelist>

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

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

    <para os="bi">Now we will put a copy of mount in <filename
    class="directory">/tools/bin</filename>:</para>

<screen os="bj"><userinput>cp ${LFS}/bin/mount /tools/bin</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
