aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chapter01/changelog.xml5
-rw-r--r--chapter06/kernfs.xml21
-rw-r--r--chapter09/reboot.xml10
3 files changed, 25 insertions, 11 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 78a4c1690..78d017e9a 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -40,6 +40,11 @@
<para>2012-12-28</para>
<itemizedlist>
<listitem>
+ <para>[bdubbs] - Fix the location for mounting /dev/shm
+ inside chroot. Fixes
+ <ulink url="&lfs-ticket-root;3258">#3258</ulink>.</para>
+ </listitem>
+ <listitem>
<para>[matthew] - Move the build of Procps to before E2fsprogs as the
latter requires <command>ps</command> to be available during its
testsuite run.</para>
diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml
index 4667d6012..51bcbe59c 100644
--- a/chapter06/kernfs.xml
+++ b/chapter06/kernfs.xml
@@ -74,16 +74,17 @@ 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 symbolic link needs to be
- changed to a normal directory before mounting as a temporary
- file system:</para>
-
-<screen><userinput>if [ -h /dev/shm ]; then
- rm -f $LFS/dev/shm
- mkdir $LFS/dev/shm
-fi
-
-mount -vt tmpfs shm $LFS/dev/shm</userinput></screen>
+ Inside a chroot environment, this temporary file system needs
+ to be mounted separate from the host file system:</para>
+
+<screen><userinput>if [ -h $LFS/dev/shm ]; then
+ link=$(readlink $LFS/dev/shm)
+ mkdir -p $LFS/$link
+ mount -vt tmpfs shm $LFS/$link
+ unset link
+else
+ mount -vt tmpfs shm $LFS/dev/shm
+fi</userinput></screen>
</sect2>
diff --git a/chapter09/reboot.xml b/chapter09/reboot.xml
index 78d7ac550..59a24d4d2 100644
--- a/chapter09/reboot.xml
+++ b/chapter09/reboot.xml
@@ -33,7 +33,15 @@
<para>Then unmount the virtual file systems:</para>
<screen><userinput>umount -v $LFS/dev/pts
-umount -v $LFS/dev/shm
+
+if [ -h $LFS/dev/shm ]; then
+ link=$(readlink $LFS/dev/shm)
+ umount -v $LFS/$link
+ unset link
+else
+ umount -v $LFS/dev/shm
+fi
+
umount -v $LFS/dev
umount -v $LFS/proc
umount -v $LFS/sys</userinput></screen>