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"?>
7 <para>In order for certain programs to function properly, the
8 <emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be
9 available within the chroot environment. The proc file system is the process
10 information pseudo file system through which the kernel provides information
11 about the status of the system. And the devpts file system is nowadays the most
12 common way pseudo terminals (PTYs) are implemented. Since kernel version 2.4, a
13 file system can be mounted as many times and in as many places as you like,
14 thus it's not a problem that these file systems are already mounted on your
15 host system, especially so because they are virtual file systems.</para>
17 <para>First become <emphasis>root</emphasis>, as only <emphasis>root</emphasis>
18 can mount file systems in unusual places. Then check again that the LFS
19 environment variable is set correctly by running <userinput>echo
20 $LFS</userinput> and making sure it shows the path to your LFS partition's
21 mount point, which is <filename class="directory">/mnt/lfs</filename> if you
22 followed our example.</para>
24 <para>Now make the mount points for these filesystems:</para>
26 <screen><userinput>mkdir -p $LFS/{proc,dev/pts}</userinput></screen>
28 <para>Mount the <emphasis>proc</emphasis> file system with:</para>
30 <screen><userinput>mount proc $LFS/proc -t proc</userinput></screen>
32 <para>And mount the <emphasis>devpts</emphasis> file system with:</para>
34 <screen><userinput>mount devpts $LFS/dev/pts -t devpts</userinput></screen>
36 <para>This last command might fail with an error like:</para>
38 <blockquote><screen>filesystem devpts not supported by kernel</screen></blockquote>
40 <para>The most likely cause for this is that your host system's kernel was
41 compiled without support for the devpts file system (you can check which file
42 systems your kernel supports with <command>cat /proc/filesystems</command>,
43 for example). A few PTYs are needed to be able to run the suites for Binutils
44 and GCC later on. If your kernel does not support devpts, do not worry, there
45 is another way to get them working inside the chroot environment. We'll cover
46 this shortly in the <xref linkend="ch-system-MAKEDEV"/> section.</para>
48 <para>Remember that if for any reason you stop working on your LFS, and start
49 again later, it's important to check that these file systems are mounted again
50 before entering the chroot environment, otherwise problems could occur.</para>