mounting.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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="space-mounting">
  8. <?dbhtml filename="mounting.html"?>
  9. <title>Mounting the New Partition</title>
  10. <para>Now that a file system has been created, the partition needs to
  11. be made accessible. In order to do this, the partition needs to be
  12. mounted at a chosen mount point. For the purposes of this book, it is
  13. assumed that the file system is mounted under the directory specified by the
  14. <envar>LFS</envar> environment variable as described in the previous section.
  15. </para>
  16. <para>Create the mount point and mount the LFS file system by running:</para>
  17. <screen role="nodump"><userinput>mkdir -pv $LFS
  18. mount -v -t ext4 /dev/<replaceable>&lt;xxx&gt;</replaceable> $LFS</userinput></screen>
  19. <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the designation of the LFS
  20. partition.</para>
  21. <para>If using multiple partitions for LFS (e.g., one for <filename
  22. class="directory">/</filename> and another for <filename
  23. class="directory">/usr</filename>), mount them using:</para>
  24. <screen role="nodump"><userinput>mkdir -pv $LFS
  25. mount -v -t ext4 /dev/<replaceable>&lt;xxx&gt;</replaceable> $LFS
  26. mkdir -v $LFS/usr
  27. mount -v -t ext4 /dev/<replaceable>&lt;yyy&gt;</replaceable> $LFS/usr</userinput></screen>
  28. <para>Replace <replaceable>&lt;xxx&gt;</replaceable> and
  29. <replaceable>&lt;yyy&gt;</replaceable> with the appropriate partition
  30. names.</para>
  31. <para>Ensure that this new partition is not mounted with permissions that are
  32. too restrictive (such as the <option>nosuid</option> or
  33. <option>nodev</option> options). Run the <command>mount</command> command
  34. without any parameters to see what options are set for the mounted LFS
  35. partition. If <option>nosuid</option> and/or <option>nodev</option> are set,
  36. the partition will need to be remounted.</para>
  37. <para>If you are using a <systemitem
  38. class="filesystem">swap</systemitem> partition, ensure that it is enabled
  39. using the <command>swapon</command> command:</para>
  40. <screen role="nodump"><userinput>/sbin/swapon -v /dev/<replaceable>&lt;zzz&gt;</replaceable></userinput></screen>
  41. <para>Replace <replaceable>&lt;zzz&gt;</replaceable> with the name of the
  42. <systemitem class="filesystem">swap</systemitem> partition.</para>
  43. <para>Now that there is an established place to work, it is time to
  44. download the packages.</para>
  45. </sect1>