Subversion Repositories svn LFS-FR


Rev 1177 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "" [
 <!ENTITY % general-entities SYSTEM "../../general.ent">

<sect1 id="ch-partitioning-creatingfilesystem">
  <?dbhtml filename="creatingfilesystem.html"?>

  <title>Creating a File System on the Partition</title>

  <para os="a">Now that a blank partition has been set up, the file system can be
  created. The most widely-used system in the Linux world is the second
  extended file system (ext2), but with newer high-capacity hard disks,
  journaling file systems are becoming increasingly popular. We will create
  an <systemitem class="filesystem">ext2</systemitem> file system.
  Instructions for other file systems can be found at
  <ulink url="&cblfs-root;index.php?section=6#File_System"/>.</para>

  <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
  system on the CLFS partition, run the following:</para>

<screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>

  <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the CLFS
  partition (<filename class="devicefile">hda5</filename> in our previous

  <note os="e">
    <para>Some host distributions use custom features in their filesystem
    creation tools (E2fsprogs). This can cause problems when booting into
    your new CLFS system, as those features will not be supported by the
    CLFS-installed E2fsprogs; you will get an error similar to
    <computeroutput>unsupported filesystem features, upgrade your
    e2fsprogs</computeroutput>. To check if your host system uses custom
    enhancements, run the following command:</para>

<screen os="f"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>

    <para>If the output contains features other than: dir_index; filetype;
    large_file; resize_inode or sparse_super then your host system may have custom
    enhancements.  In that case, to avoid later problems, you should compile the
    stock E2fsprogs package and use the resulting binaries to re-create the
    filesystem on your CLFS partition:</para>

<screen os="g"><userinput>cd /tmp
tar xjf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
cd e2fsprogs-&e2fsprogs-version;
mkdir build
cd build
make #note that we intentionally don't 'make install' here!
./misc/mke2fs /dev/<replaceable>[xxx]</replaceable>
cd /tmp
rm -rf e2fsprogs-&e2fsprogs-version;</userinput></screen>


  <para os="h">If a swap partition was created, it will need to be initialized
  for use by issuing the command below. If you are using an existing swap
  partition, there is no need to format it.</para>

<screen os="i"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>

  <para os="j">Replace <replaceable>[yyy]</replaceable> with the name of the
  swap partition.</para>