mounting.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <sect1 id="ch04-mounting">
  2. <title>Mounting the new partition</title>
  3. <?dbhtml filename="mounting.html" dir="chapter04"?>
  4. <para>Now that we have created a file system, it is ready for use. All we have
  5. to do to be able to access the partition (as in reading data from and writing
  6. data to) is mount it. If it is mounted under /mnt/lfs, this partition can
  7. be accessed by cd'ing to the /mnt/lfs directory. This book will assume
  8. that the partition was mounted under /mnt/lfs. It doesn't matter which
  9. directory is chosen, just make sure you remember what you chose.</para>
  10. <para>Create the /mnt/lfs directory by running:</para>
  11. <para><screen><userinput>mkdir -p /mnt/lfs</userinput></screen></para>
  12. <para>Now mount the LFS partition by running:</para>
  13. <para><screen><userinput>mount /dev/xxx /mnt/lfs</userinput></screen></para>
  14. <para>Replace <quote>xxx</quote> by the partition's designation (like hda11).</para>
  15. <para>This directory (/mnt/lfs) is the $LFS variable you have read about
  16. back in chapter 2. If you were planning to make use of the $LFS environment
  17. variable, <userinput>export LFS=/mnt/lfs</userinput> has to be executed
  18. now.</para>
  19. <para>If you decided to create multiple partitions for LFS (say $LFS and
  20. $LFS/usr), mount them like this:</para>
  21. <para><screen><userinput>mkdir -p /mnt/lfs &amp;&amp;
  22. mount /dev/xxx /mnt/lfs &amp;&amp;
  23. mkdir /mnt/lfs/usr &amp;&amp;
  24. mount /dev/yyy /mnt/lfs/usr</userinput></screen></para>
  25. <para>Of course, replace /dev/xxx and /dev/yyy with the appropriate
  26. partition designations.</para>
  27. </sect1>