[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-partitioning-creatingfilesystem">
|
---|
| 9 | <?dbhtml filename="creatingfilesystem.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Creating a File System on the Partition</title>
|
---|
| 12 |
|
---|
| 13 | <para os="a">Now that a blank partition has been set up, the file system can be
|
---|
| 14 | created. The most widely-used system in the Linux world is the second
|
---|
| 15 | extended file system (ext2), but with newer high-capacity hard disks,
|
---|
| 16 | journaling file systems are becoming increasingly popular. We will create
|
---|
| 17 | an <systemitem class="filesystem">ext2</systemitem> file system.
|
---|
[9680956] | 18 | Instructions for other file systems can be found at
|
---|
[3f8be484] | 19 | <ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
|
---|
| 20 |
|
---|
| 21 | <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
|
---|
[fb40919] | 22 | system on the CLFS partition, run the following:</para>
|
---|
[3f8be484] | 23 |
|
---|
| 24 | <screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
|
---|
| 25 |
|
---|
[fb40919] | 26 | <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the CLFS
|
---|
[3f8be484] | 27 | partition (<filename class="devicefile">hda5</filename> in our previous
|
---|
| 28 | example).</para>
|
---|
| 29 |
|
---|
| 30 | <note os="e">
|
---|
| 31 | <para>Some host distributions use custom features in their filesystem
|
---|
| 32 | creation tools (E2fsprogs). This can cause problems when booting into
|
---|
[fb40919] | 33 | your new CLFS system, as those features will not be supported by the
|
---|
| 34 | CLFS-installed E2fsprogs; you will get an error similar to
|
---|
| 35 | <computeroutput>unsupported filesystem features, upgrade your
|
---|
| 36 | e2fsprogs</computeroutput>. To check if your host system uses custom
|
---|
| 37 | enhancements, run the following command:</para>
|
---|
[3f8be484] | 38 |
|
---|
| 39 | <screen os="f"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
|
---|
| 40 |
|
---|
| 41 | <para>If the output contains features other than: dir_index; filetype;
|
---|
| 42 | large_file; resize_inode or sparse_super then your host system may have custom
|
---|
| 43 | enhancements. In that case, to avoid later problems, you should compile the
|
---|
| 44 | stock E2fsprogs package and use the resulting binaries to re-create the
|
---|
[fb40919] | 45 | filesystem on your CLFS partition:</para>
|
---|
[3f8be484] | 46 |
|
---|
| 47 | <screen os="g"><userinput>cd /tmp
|
---|
| 48 | tar xjf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
|
---|
| 49 | cd e2fsprogs-&e2fsprogs-version;
|
---|
| 50 | mkdir build
|
---|
| 51 | cd build
|
---|
| 52 | ../configure
|
---|
| 53 | make #note that we intentionally don't 'make install' here!
|
---|
| 54 | ./misc/mke2fs /dev/<replaceable>[xxx]</replaceable>
|
---|
| 55 | cd /tmp
|
---|
| 56 | rm -rf e2fsprogs-&e2fsprogs-version;</userinput></screen>
|
---|
| 57 |
|
---|
| 58 | </note>
|
---|
| 59 |
|
---|
| 60 | <para os="h">If a swap partition was created, it will need to be initialized
|
---|
| 61 | for use by issuing the command below. If you are using an existing swap
|
---|
| 62 | partition, there is no need to format it.</para>
|
---|
| 63 |
|
---|
| 64 | <screen os="i"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
|
---|
| 65 |
|
---|
| 66 | <para os="j">Replace <replaceable>[yyy]</replaceable> with the name of the
|
---|
| 67 | swap partition.</para>
|
---|
| 68 |
|
---|
| 69 | </sect1>
|
---|