diff options
Diffstat (limited to 'chapter06/kernfs.xml')
-rw-r--r-- | chapter06/kernfs.xml | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml index bfd583455..860cdfc00 100644 --- a/chapter06/kernfs.xml +++ b/chapter06/kernfs.xml @@ -22,7 +22,7 @@ <para>Begin by creating directories onto which the file systems will be mounted:</para> -<screen><userinput>mkdir -pv $LFS/{dev,proc,sys}</userinput></screen> +<screen><userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput></screen> <sect2> <title>Creating Initial Device Nodes</title> @@ -70,7 +70,8 @@ mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> <screen><userinput>mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc -mount -vt sysfs sysfs $LFS/sys</userinput></screen> +mount -vt sysfs sysfs $LFS/sys +mount -vt tmpfs tmpfs $LFS/run</userinput></screen> <variablelist> <title>The meaning of the mount options for devpts:</title> @@ -102,16 +103,11 @@ mount -vt sysfs sysfs $LFS/sys</userinput></screen> <para>In some host systems, <filename>/dev/shm</filename> is a symbolic link to <filename class="directory">/run/shm</filename>. - Inside a chroot environment, this temporary file system needs - to be mounted separate from the host file system:</para> + The /run tmpfs was mounted above so in this case only a + directory needs to be created.</para> <screen><userinput>if [ -h $LFS/dev/shm ]; then - link=$(readlink $LFS/dev/shm) - mkdir -pv $LFS/$link - mount -vt tmpfs shm $LFS/$link - unset link -else - mount -vt tmpfs shm $LFS/dev/shm + mkdir -pv $LFS/$(readlink $LFS/dev/shm) fi</userinput></screen> </sect2> |