mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 14:24:48 +00:00
Fix the location for mounting /dev/shm inside chroot
when /dev/shm is a symlink. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10083 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
21a60f0a73
commit
409e7c850f
@ -39,6 +39,11 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>2012-12-28</para>
|
<para>2012-12-28</para>
|
||||||
<itemizedlist>
|
<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>
|
<listitem>
|
||||||
<para>[matthew] - Move the build of Procps to before E2fsprogs as the
|
<para>[matthew] - Move the build of Procps to before E2fsprogs as the
|
||||||
latter requires <command>ps</command> to be available during its
|
latter requires <command>ps</command> to be available during its
|
||||||
|
@ -74,16 +74,17 @@ mount -vt sysfs sysfs $LFS/sys</userinput></screen>
|
|||||||
|
|
||||||
<para>In some host systems, <filename>/dev/shm</filename> is a
|
<para>In some host systems, <filename>/dev/shm</filename> is a
|
||||||
symbolic link to <filename class="directory">/run/shm</filename>.
|
symbolic link to <filename class="directory">/run/shm</filename>.
|
||||||
Inside a chroot environment, this symbolic link needs to be
|
Inside a chroot environment, this temporary file system needs
|
||||||
changed to a normal directory before mounting as a temporary
|
to be mounted separate from the host file system:</para>
|
||||||
file system:</para>
|
|
||||||
|
|
||||||
<screen><userinput>if [ -h /dev/shm ]; then
|
<screen><userinput>if [ -h $LFS/dev/shm ]; then
|
||||||
rm -f $LFS/dev/shm
|
link=$(readlink $LFS/dev/shm)
|
||||||
mkdir $LFS/dev/shm
|
mkdir -p $LFS/$link
|
||||||
fi
|
mount -vt tmpfs shm $LFS/$link
|
||||||
|
unset link
|
||||||
mount -vt tmpfs shm $LFS/dev/shm</userinput></screen>
|
else
|
||||||
|
mount -vt tmpfs shm $LFS/dev/shm
|
||||||
|
fi</userinput></screen>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -33,7 +33,15 @@
|
|||||||
<para>Then unmount the virtual file systems:</para>
|
<para>Then unmount the virtual file systems:</para>
|
||||||
|
|
||||||
<screen><userinput>umount -v $LFS/dev/pts
|
<screen><userinput>umount -v $LFS/dev/pts
|
||||||
|
|
||||||
|
if [ -h $LFS/dev/shm ]; then
|
||||||
|
link=$(readlink $LFS/dev/shm)
|
||||||
|
umount -v $LFS/$link
|
||||||
|
unset link
|
||||||
|
else
|
||||||
umount -v $LFS/dev/shm
|
umount -v $LFS/dev/shm
|
||||||
|
fi
|
||||||
|
|
||||||
umount -v $LFS/dev
|
umount -v $LFS/dev
|
||||||
umount -v $LFS/proc
|
umount -v $LFS/proc
|
||||||
umount -v $LFS/sys</userinput></screen>
|
umount -v $LFS/sys</userinput></screen>
|
||||||
|
Loading…
Reference in New Issue
Block a user