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

  <!ENTITY parted-download-http
    "http://ftp.gnu.org/gnu/parted/parted-&parted-version;.tar.xz">
  <!ENTITY parted-download-ftp  " ">
  <!ENTITY parted-md5sum        "0247b6a7b314f8edeb618159fa95f9cb">
  <!ENTITY parted-size          "1.6 MB">
  <!ENTITY parted-buildsize     "27 MB (additional 2 MB for the tests and additional 1 MB for optional PDF and Postscript documentation)">
  <!ENTITY parted-time          "0.4 SBU (additional 0.6 SBU for the tests)">
]>

<sect1 id="parted" xreflabel="parted-&parted-version;">
  <?dbhtml filename="parted.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-24 00:00:51 -0500 (Tue, 24 Feb 2015) $</date>
  </sect1info>

  <title>parted-&parted-version;</title>

  <indexterm zone="parted">
    <primary sortas="a-parted">Parted</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to parted</title>

    <para>
      The <application>Parted</application> package is a disk partitioning and
      partition resizing tool.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&parted-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&parted-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &parted-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &parted-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &parted-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &parted-time;</para>
      </listitem>
    </itemizedlist>

      <bridgehead renderas="sect3">Additional Downloads</bridgehead>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
             Optional, to fix build without device mapper support:
            <ulink url="&patch-root;/parted-&parted-version;-devmapper-1.patch"/>
          </para>
        </listitem>
      </itemizedlist>

    <bridgehead renderas="sect3">Parted Dependencies</bridgehead>

    <bridgehead renderas="sect4">Recommended</bridgehead>
    <para role="recommended">
      <xref linkend="lvm2"/> (device-mapper, required if building
      <application>udisks</application>)
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="pth"/>
      <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
    </para>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/parted"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of parted</title>
            
    <para>
      If you want to build without device mapper support, a fix is necessary:
    </para>

<screen><userinput>patch -Np1 -i ../parted-&parted-version;-devmapper-1.patch</userinput></screen>

    <para>
      Install <application>Parted</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr --disable-static &amp;&amp;
make &amp;&amp;

make -C doc html                                       &amp;&amp;
makeinfo --html      -o doc/html       doc/parted.texi &amp;&amp;
makeinfo --plaintext -o doc/parted.txt doc/parted.texi</userinput></screen>

    <para>If you have <xref linkend="texlive"/> installed and wish to create
    PDF and Postcript documentation issue the following commands:</para>

<screen><userinput>texi2pdf             -o doc/parted.pdf doc/parted.texi &amp;&amp;
texi2dvi             -o doc/parted.dvi doc/parted.texi &amp;&amp;
dvips                -o doc/parted.ps  doc/parted.dvi</userinput></screen>

    <para>If you wish to run the test suite, first remove a test that normally
    fails in BLFS, because it needs a locale C.UTF-8:</para>

<screen><userinput>sed -i '/t0251-gpt-unicode.sh/d' tests/Makefile</userinput></screen>

    <para>
      To test the results, issue: <command>make check</command>.  Note that
      many tests are skipped if not run as the <systemitem
      class="username">root</systemitem> user.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install &amp;&amp;
install -v -m755 -d /usr/share/doc/parted-&parted-version;/html &amp;&amp;
install -v -m644    doc/html/* \
                    /usr/share/doc/parted-&parted-version;/html &amp;&amp;
install -v -m644    doc/{FAT,API,parted.{txt,html}} \
                    /usr/share/doc/parted-&parted-version;</userinput></screen>

    <para>Install the optional PDF and Postscript documentation by issuing
    the following command as the <systemitem class="username">root</systemitem>
    user:</para>

<screen role="root"><userinput>install -v -m644 doc/FAT doc/API doc/parted.{pdf,ps,dvi} \
                    /usr/share/doc/parted-&parted-version;</userinput></screen>
  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

    <para>
      <option>--disable-device-mapper</option>: This option disables device
      mapper support. Add this parameter if you have not installed
      <application>LVM2</application>.
    </para>
  </sect2>

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

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          parted and
          partprobe
        </seg>
        <seg>
          libparted.so and
          libparted-fs-resize.so</seg>
        <seg>
          /usr/include/parted and
          /usr/share/doc/parted-&parted-version;</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="parted-prog">
        <term><command>parted</command></term>
        <listitem>
          <para>is a partition manipulation program.</para>
          <indexterm zone="parted parted-prog">
            <primary sortas="b-parted">parted</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="partprobe">
        <term><command>partprobe</command></term>
        <listitem>
          <para>informs the OS of partition table changes.</para>
          <indexterm zone="parted partprobe">
            <primary sortas="b-partprobe">partprobe</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libparted">
        <term><filename class='libraryfile'>libparted.so</filename></term>
        <listitem>
          <para>
            contains the <application>Parted</application> API functions.
          </para>
          <indexterm zone="parted libparted">
            <primary sortas="c-libparted">libparted.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>
  </sect2>
</sect1>
