Index: BOOK/chroot/common/kernfs.xml
===================================================================
--- BOOK/chroot/common/kernfs.xml (revision 2115f27be4d86c11ab0239f7b1a5750e2d5b020f)
+++ BOOK/chroot/common/kernfs.xml (revision 677f8ac99dfb15706007b65db3b8dfa43b1b05cc)
@@ -27,18 +27,9 @@
be mounted:
-mkdir -pv ${CLFS}/{dev,proc,sys}
-
- Now mount the file systems:
-
-mount -vt proc proc ${CLFS}/proc
-mount -vt sysfs sysfs ${CLFS}/sys
-
- Remember that if for any reason you stop working on the CLFS system
- and start again later, it is important to check that these file systems
- are mounted again before entering the chroot environment.
+mkdir -pv ${CLFS}/{dev,proc,run,sys}
Two device nodes, /dev/console
and /dev/null, are required to be
- present on the filesystem. These are needed by the kernel even before
+ present on the file system. These are needed by the kernel even before
starting Udev early in the boot process, so we create them here:
@@ -50,21 +41,24 @@
devtmpfs file system. For now
though, we will just use the bind
option in the mount command
- to make our host system's /dev structure appear in the new CLFS filesystem:
+ to make our host system's /dev structure appear in the new CLFS file system:
mount -v -o bind /dev ${CLFS}/dev
- Additional file systems will soon be mounted from within the chroot
- environment. To keep the host up to date, perform a fake mount
- for each of these now:
+ Now mount the remaining file systems:
-if [ -h ${CLFS}/dev/shm ]; then
- link=$(readlink ${CLFS}/dev/shm)
- mkdir -p ${CLFS}/$link
- mount -f -vt tmpfs shm ${CLFS}/$link
- unset link
-else
- mount -f -vt tmpfs shm ${CLFS}/dev/shm
-fi
-mount -f -vt devpts -o gid=&gid-tty;,mode=620 devpts ${CLFS}/dev/pts
+mount -vt devpts -o gid=&gid-tty;,mode=620 devpts ${CLFS}/dev/pts
+mount -vt proc proc ${CLFS}/proc
+mount -vt tmpfs tmpfs ${CLFS}/run
+mount -vt sysfs sysfs ${CLFS}/sys
+
+ On some host systems, /dev/shm
+ is a symbolic link to /run/shm.
+ If it is, create a directory in /run:
+
+[ -h ${CLFS}/dev/shm ] && mkdir -pv ${CLFS}/$(readlink ${CLFS}/dev/shm)
+
+ Remember that if for any reason you stop working on the CLFS system
+ and start again later, it is important to check that these file systems
+ are mounted again before entering the chroot environment.