1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/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.
|
---|
18 | Instructions for other file systems can be found at
|
---|
19 | <ulink url="&cblfs-root;index.php?section=6#File_System"/>.</para>
|
---|
20 |
|
---|
21 | <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
|
---|
22 | system on the CLFS partition, run the following:</para>
|
---|
23 |
|
---|
24 | <screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
|
---|
25 |
|
---|
26 | <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the CLFS
|
---|
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
|
---|
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>
|
---|
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
|
---|
45 | filesystem on your CLFS partition:</para>
|
---|
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>
|
---|