[9dfc02f] | 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-kernfs">
|
---|
[69993f4] | 4 | <title>Mounting Virtual Kernel File Systems</title>
|
---|
[9dfc02f] | 5 | <?dbhtml filename="kernfs.html"?>
|
---|
| 6 |
|
---|
[ef13657] | 7 | <para>Various file systems exported by the kernel do not exist on the
|
---|
| 8 | hard drive, but are used to communicate to and from the kernel
|
---|
| 9 | itself.</para>
|
---|
[9dfc02f] | 10 |
|
---|
| 11 | <para>Begin by creating directories onto which the file systems will be mounted:</para>
|
---|
| 12 |
|
---|
| 13 | <screen><userinput>mkdir -p $LFS/{proc,sys}</userinput></screen>
|
---|
| 14 |
|
---|
| 15 | <para>Now mount the file systems:</para>
|
---|
| 16 |
|
---|
| 17 | <screen><userinput>mount -t proc proc $LFS/proc
|
---|
| 18 | mount -t sysfs sysfs $LFS/sys</userinput></screen>
|
---|
| 19 |
|
---|
[ef13657] | 20 | <para>Remember that if for any reason you stop working on the LFS
|
---|
| 21 | system and start again later, it is important to check that these file
|
---|
| 22 | systems are mounted again before entering the chroot
|
---|
| 23 | environment.</para>
|
---|
[9dfc02f] | 24 |
|
---|
[ef13657] | 25 | <para>Additional file systems will soon be mounted from within the
|
---|
[69993f4] | 26 | chroot environment. To keep the host up to date, perform a <quote>fake
|
---|
[ef13657] | 27 | mount</quote> for each of these now:</para>
|
---|
[9dfc02f] | 28 |
|
---|
| 29 | <screen><userinput>mount -f -t ramfs ramfs $LFS/dev
|
---|
| 30 | mount -f -t tmpfs tmpfs $LFS/dev/shm
|
---|
| 31 | mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen>
|
---|
| 32 |
|
---|
[dadb405] | 33 | <para>The <command>mount</command> commands executed above may result
|
---|
[752f4e5] | 34 | in the following warning message: <computeroutput>can't open /etc/fstab: No
|
---|
| 35 | such file or directory</computeroutput>. This
|
---|
| 36 | file—<filename>/etc/fstab</filename>—has
|
---|
[dadb405] | 37 | not been created yet but is also not required for the file systems to
|
---|
| 38 | be properly mounted. As such, the warning can be safely ignored.</para>
|
---|
| 39 |
|
---|
[9dfc02f] | 40 | </sect1>
|
---|
[ef13657] | 41 |
|
---|