source: chapter02/creatingfilesystem.xml@ fb66c4c

11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 bdubbs/gcc13 multilib renodr/libudev-from-systemd trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng 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 fb66c4c was fb66c4c, checked in by Xi Ruoyao <xry111@…>, 20 months ago

some http -> https changes

  • Property mode set to 100644
File size: 2.8 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="ch-partitioning-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="https://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 <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the LFS
56 partition.</para>
57
58 <para>If you are using an existing <systemitem class="filesystem">swap
59 </systemitem> partition, there is no need to format it. If a new
60 <systemitem class="filesystem"> swap</systemitem> partition was created,
61 it will need to be initialized with this command:</para>
62
63<screen role="nodump"><userinput>mkswap /dev/<replaceable>&lt;yyy&gt;</replaceable></userinput></screen>
64
65 <para>Replace <replaceable>&lt;yyy&gt;</replaceable> with the name of the
66 <systemitem class="filesystem">swap</systemitem> partition.</para>
67
68</sect1>
Note: See TracBrowser for help on using the repository browser.