diff options
Diffstat (limited to 'chapter07')
-rw-r--r-- | chapter07/cleanup.xml | 3 | ||||
-rw-r--r-- | chapter07/kernfs.xml | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index 7946d84eb..d5396208c 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -95,7 +95,8 @@ <para>Before making a backup, unmount the virtual file systems:</para> -<screen role="nodump"><userinput>umount $LFS/dev/pts +<screen role="nodump"><userinput>[ mountpoint -q $LFS/dev/shm ] && umount $LFS/dev/shm +umount $LFS/dev/pts umount $LFS/{sys,proc,run,dev}</userinput></screen> <para> 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> |