diff --git a/chapter07/kernfs.xml b/chapter07/kernfs.xml index c9721113d..56521ea20 100644 --- a/chapter07/kernfs.xml +++ b/chapter07/kernfs.xml @@ -14,12 +14,14 @@ /dev/* - Various file systems exported by the kernel are used to communicate to - and from the kernel itself. These file systems are virtual in that no disk + Applications running in user space utilize various file + systems exported by the kernel to communicate + with the kernel itself. These file systems are virtual: no disk space is used for them. The content of the file systems resides in - memory. + memory. These file systems must exist in the $LFS directory tree + before you can chroot successfully. - Begin by creating directories onto which the file systems will be + Begin by creating directories on which the file systems will be mounted: mkdir -pv $LFS/{dev,proc,sys,run} @@ -29,18 +31,18 @@ During a normal boot, the kernel automatically mounts the devtmpfs filesystem on the - /dev directory, and allow the - devices to be created dynamically on that virtual filesystem as they - are detected or accessed. Device creation is generally done during the - boot process by the kernel and Udev. - Since this new system does not yet have Udev and + /dev directory; the + devices are created dynamically on that virtual filesystem when they + are first detected or accessed. Device creation is generally done during the + boot process by the kernel and the udev program. + Since the new system does not yet include udev and has not yet been booted, it is necessary to mount and populate - /dev manually. This is + the /dev directory manually. This is accomplished by bind mounting the host system's /dev directory. A bind mount is a special type of mount that allows you to create a mirror of a - directory or mount point to some other location. Use the following - command to achieve this: + directory or mount point at some other location. Use the following + command to do this: mount -v --bind /dev $LFS/dev @@ -89,10 +91,10 @@ mount -vt tmpfs tmpfs $LFS/run The /run tmpfs was mounted above so in this case only a directory needs to be created. - In other cases /dev/shm is a mountpoint + In other host systems /dev/shm is a mount point 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, + /dev/shm as a directory in the chroot environment. In this situation + we must explicitly mount a tmpfs: if [ -h $LFS/dev/shm ]; then mkdir -pv $LFS/$(readlink $LFS/dev/shm)