creatingfilesystem.xml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. <sect1 id="ch-partitioning-creatingfilesystem">
  8. <?dbhtml filename="creatingfilesystem.html"?>
  9. <title>Creating a File System on the Partition</title>
  10. <para>Now that a blank partition has been set up, the file system can be
  11. created. LFS can use any file system recognized by the Linux kernel, but the
  12. most common types are ext3 and ext4. The choice of file system can be
  13. complex and depends on the characteristics of the files and the size of
  14. the partition. For example:</para>
  15. <variablelist>
  16. <varlistentry>
  17. <term>ext2</term>
  18. <listitem><para>is suitable for small partitions that are updated infrequently
  19. such as /boot.</para>
  20. </listitem>
  21. </varlistentry>
  22. <varlistentry>
  23. <term>ext3</term>
  24. <listitem><para>is an upgrade to ext2 that includes a journal
  25. to help recover the partition's status in the case of an unclean
  26. shutdown. It is commonly used as a general purpose file system.
  27. </para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term>ext4</term>
  32. <listitem><para>is the latest version of the ext file system family of
  33. partition types. It provides several new capabilities including
  34. nano-second timestamps, creation and use of very large files (16 TB), and
  35. speed improvements.</para>
  36. </listitem>
  37. </varlistentry>
  38. </variablelist>
  39. <para>Other file systems, including FAT32, NTFS, ReiserFS, JFS, and XFS are
  40. useful for specialized purposes. More information about these file systems
  41. can be found at <ulink
  42. url="http://en.wikipedia.org/wiki/Comparison_of_file_systems"/>.</para>
  43. <para>LFS assumes that the root file system (/) is of type ext4. To create
  44. an <systemitem class="filesystem">ext4</systemitem> file system on the LFS
  45. partition, run the following:</para>
  46. <screen role="nodump"><userinput>mkfs -v -t ext4 /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
  47. <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the LFS
  48. partition.</para>
  49. <para>If you are using an existing <systemitem class="filesystem">swap
  50. </systemitem> partition, there is no need to format it. If a new
  51. <systemitem class="filesystem"> swap</systemitem> partition was created,
  52. it will need to be initialized with this command:</para>
  53. <screen role="nodump"><userinput>mkswap /dev/<replaceable>&lt;yyy&gt;</replaceable></userinput></screen>
  54. <para>Replace <replaceable>&lt;yyy&gt;</replaceable> with the name of the
  55. <systemitem class="filesystem">swap</systemitem> partition.</para>
  56. </sect1>