source: chapter02/creatingfilesystem.xml@ 25332b5

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 25332b5 was 25332b5, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Add comments to the kernel section to change the unwinder option.
Update to linux-4.14.10.
Update to coreutils-8.29.
Remove old footer from non-chunks book.
Make spacing between "Chapter" and digit non breaking.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11344 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.3 KB
Line 
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="space-creatingfilesystem">
9 <?dbhtml filename="creatingfilesystem.html"?>
10
11 <title>Creating a File System on the Partition</title>
12
13 <para>Now that a blank partition has been set up, the file system can be
14 created. LFS can use any file system recognized by the Linux kernel, but the
15 most common types are ext3 and ext4. The choice of file system can be
16 complex and depends on the characteristics of the files and the size of
17 the partition. For example:</para>
18
19 <variablelist>
20 <varlistentry>
21 <term>ext2</term>
22 <listitem><para>is suitable for small partitions that are updated infrequently
23 such as /boot.</para>
24 </listitem>
25 </varlistentry>
26 <varlistentry>
27 <term>ext3</term>
28 <listitem><para>is an upgrade to ext2 that includes a journal
29 to help recover the partition's status in the case of an unclean
30 shutdown. It is commonly used as a general purpose file system.
31 </para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term>ext4</term>
36 <listitem><para>is the latest version of the ext file system family of
37 partition types. It provides several new capabilities including
38 nano-second timestamps, creation and use of very large files (16 TB), and
39 speed improvements.</para>
40 </listitem>
41 </varlistentry>
42 </variablelist>
43
44 <para>Other file systems, including FAT32, NTFS, ReiserFS, JFS, and XFS are
45 useful for specialized purposes. More information about these file systems
46 can be found at <ulink
47 url="http://en.wikipedia.org/wiki/Comparison_of_file_systems"/>.</para>
48
49 <para>LFS assumes that the root file system (/) is of type ext4. To create
50 an <systemitem class="filesystem">ext4</systemitem> file system on the LFS
51 partition, run the following:</para>
52
53<screen role="nodump"><userinput>mkfs -v -t ext4 /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
54
55<!--
56 <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the LFS
57 partition (<filename class="devicefile">sda5</filename> in our previous
58 example).</para>
59
60 <note>
61 <para>Some host distributions use custom features in their filesystem
62 creation tools (E2fsprogs). This can cause problems when booting into your new
63 LFS in Chapter&nbsp;9, as those features will not be supported by the LFS-installed
64 E2fsprogs; you will get an error similar to <quote>unsupported filesystem
65 features, upgrade your e2fsprogs</quote>. To check if your host system
66 uses custom enhancements, run the following command:</para>
67
68<screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
69
70 <para>If the output contains features other than
71 <option>has_journal</option>, <option>ext_attr</option>,
72 <option>resize_inode</option>, <option>dir_index</option>,
73 <option>filetype</option>, <option>sparse_super</option>,
74 <option>large_file</option> or <option>needs_recovery</option>, then your
75 host system may have custom enhancements. In that case, to avoid later
76 problems, you should compile the stock E2fsprogs package and use the
77 resulting binaries to re-create the filesystem on your LFS partition:</para>
78
79<screen role="nodump"><userinput>cd /tmp
80tar -xzvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.gz
81cd e2fsprogs-&e2fsprogs-version;
82mkdir -v build
83cd build
84../configure
85make #note that we intentionally don't 'make install' here!
86./misc/mke2fs -jv /dev/<replaceable>&lt;xxx&gt;</replaceable>
87cd /tmp
88rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>
89 </note>
90-->
91 <para>If you are using an existing <systemitem class="filesystem">swap
92 </systemitem> partition, there is no need to format it. If a new
93 <systemitem class="filesystem"> swap</systemitem> partition was created,
94 it will need to be initialized with this command:</para>
95
96<screen role="nodump"><userinput>mkswap /dev/<replaceable>&lt;yyy&gt;</replaceable></userinput></screen>
97
98 <para>Replace <replaceable>&lt;yyy&gt;</replaceable> with the name of the
99 <systemitem class="filesystem">swap</systemitem> partition.</para>
100
101</sect1>
Note: See TracBrowser for help on using the repository browser.