1
0

proc.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  3. <sect1 id="ch-system-proc">
  4. <title>Mounting the proc and devpts file systems</title>
  5. <?dbhtml filename="proc.html"?>
  6. <para>In order for certain programs to function properly, the
  7. <emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be
  8. available within the chroot environment. The proc file system is the process
  9. information pseudo file system through which the kernel provides information
  10. about the status of the system. And the devpts file system is nowadays the most
  11. common way pseudo terminals (PTYs) are implemented. Since kernel version 2.4, a
  12. file system can be mounted as many times and in as many places as you like,
  13. thus it's not a problem that these file systems are already mounted on your
  14. host system, especially so because they are virtual file systems.</para>
  15. <para>First become <emphasis>root</emphasis>, as only <emphasis>root</emphasis>
  16. can mount file systems in unusual places. Then check again that the LFS
  17. environment variable is set correctly by running <userinput>echo
  18. $LFS</userinput> and making sure it shows the path to your LFS partition's
  19. mount point, which is <filename class="directory">/mnt/lfs</filename> if you
  20. followed our example.</para>
  21. <para>Now make the mount points for these filesystems:</para>
  22. <screen><userinput>mkdir -p $LFS/{proc,dev/pts}</userinput></screen>
  23. <para>Mount the <emphasis>proc</emphasis> file system with:</para>
  24. <screen><userinput>mount proc $LFS/proc -t proc</userinput></screen>
  25. <para>And mount the <emphasis>devpts</emphasis> file system with:</para>
  26. <screen><userinput>mount devpts $LFS/dev/pts -t devpts</userinput></screen>
  27. <para>This last command might fail with an error like:</para>
  28. <blockquote><screen>filesystem devpts not supported by kernel</screen></blockquote>
  29. <para>The most likely cause for this is that your host system's kernel was
  30. compiled without support for the devpts file system (you can check which file
  31. systems your kernel supports with <command>cat /proc/filesystems</command>,
  32. for example). A few PTYs are needed to be able to run the suites for Binutils
  33. and GCC later on. If your kernel does not support devpts, do not worry, there
  34. is another way to get them working inside the chroot environment. We'll cover
  35. this shortly in the <xref linkend="ch-system-MAKEDEV"/> section.</para>
  36. <para>Remember that if for any reason you stop working on your LFS, and start
  37. again later, it's important to check that these file systems are mounted again
  38. before entering the chroot environment, otherwise problems could occur.</para>
  39. </sect1>