mounting.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <sect1 id="ch03-mounting">
  2. <title>Mounting the new partition</title>
  3. <?dbhtml filename="mounting.html" dir="chapter03"?>
  4. <para>Now that we've created a file system, we want to be able to access
  5. the partition. For that, we need to mount it, and have to choose a mount
  6. point. In this book we assume that the file system is mounted under
  7. <filename>/mnt/lfs</filename>, but it doesn't matter what directory
  8. you choose.</para>
  9. <para>Choose a mount point and assign it to the LFS environment variable
  10. by running:</para>
  11. <para><screen><userinput>export LFS=/mnt/lfs</userinput></screen></para>
  12. <para>Now create the mount point and mount the LFS file system by running:</para>
  13. <para><screen><userinput>mkdir -p $LFS
  14. mount /dev/xxx $LFS</userinput></screen></para>
  15. <para>Replace <filename>xxx</filename> with the designation of the LFS
  16. partition.</para>
  17. <para>If you have decided to use multiple partitions for LFS (say one for
  18. <filename>/</filename> and another for <filename>/usr</filename>), mount
  19. them like this:</para>
  20. <para><screen><userinput>mkdir -p $LFS
  21. mount /dev/xxx $LFS
  22. mkdir $LFS/usr
  23. mount /dev/yyy $LFS/usr</userinput></screen></para>
  24. <para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
  25. with the appropriate partition names.</para>
  26. <para>You should also ensure that this new partition doesn't mount with
  27. permissions which are too restrictive (such as the nosuid or nodev options).
  28. You can run the mount command with no parameters to see what options are in use.
  29. If you see nosuid or nodev on the LFS partition, you need to change your mount
  30. options.</para>
  31. <para>Now that we've made ourselves a place to work in, we're ready to download
  32. the packages.</para>
  33. </sect1>