aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/kernfs.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter07/kernfs.xml')
-rw-r--r--chapter07/kernfs.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/chapter07/kernfs.xml b/chapter07/kernfs.xml
index 64db54c24..c9721113d 100644
--- a/chapter07/kernfs.xml
+++ b/chapter07/kernfs.xml
@@ -89,8 +89,15 @@ mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
The /run tmpfs was mounted above so in this case only a
directory needs to be created.</para>
+ <para>In other cases <filename>/dev/shm</filename> is a mountpoint
+ for a tmpfs. In that case the mount of /dev above will only create
+ /dev/shm in the chroot environment as a directory. In this situation
+ we explicitly mount a tmpfs,</para>
+
<screen><userinput>if [ -h $LFS/dev/shm ]; then
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
+else
+ mount -t tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi</userinput></screen>
</sect2>