From ebecd08c0582ef9c01f784452f87f3a39cf40cdd Mon Sep 17 00:00:00 2001 From: David Bryant Date: Wed, 16 Nov 2022 13:15:01 -0600 Subject: Corrected grammar, spelling, and idiom in chapter 7. --- chapter07/chroot.xml | 24 ++++++++++++------------ chapter07/cleanup.xml | 36 ++++++++++++++++-------------------- chapter07/createfiles.xml | 10 +++++----- chapter07/kernfs.xml | 42 +++++++++++++++++++++--------------------- 4 files changed, 54 insertions(+), 58 deletions(-) (limited to 'chapter07') diff --git a/chapter07/chroot.xml b/chapter07/chroot.xml index 6404c0625..69bc6ce69 100644 --- a/chapter07/chroot.xml +++ b/chapter07/chroot.xml @@ -11,11 +11,11 @@ Entering the Chroot Environment Now that all the packages which are required to build the rest of the - needed tools are on the system, it is time to enter the chroot environment to - finish installing the remaining temporary tools. This environment will be in - use also for installing the final system. As user root, run the following command to enter the - environment that is, at the moment, populated with only the temporary + environment that is, at the moment, populated with nothing but temporary tools: chroot "$LFS" /usr/bin/env -i \ @@ -26,25 +26,25 @@ /bin/bash --login The -i option given to the env - command will clear all variables of the chroot environment. After that, only + command will clear all the variables in the chroot environment. After that, only the HOME, TERM, PS1, and PATH variables are set again. The - TERM=$TERM construct will set the TERM + TERM=$TERM construct sets the TERM variable inside chroot to the same value as outside chroot. This variable is - needed for programs like vim and less - to operate properly. If other variables are desired, such as + needed so programs like vim and less + can operate properly. If other variables are desired, such as CFLAGS or CXXFLAGS, this is a good place to set - them again. + them. From this point on, there is no need to use the - LFS variable anymore because all work will be restricted - to the LFS file system. This is because the Bash shell is told that + LFS variable any more because all work will be restricted + to the LFS file system; the chroot command tells the Bash shell that $LFS is now the root (/) directory. Notice that /tools/bin is not in the PATH. This means that the cross toolchain will no longer be - used in the chroot environment. + used. Note that the bash prompt will say I have no name! This is normal because the diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index 2a83e2d62..356f3c34e 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -13,15 +13,15 @@ Cleaning - First, remove the currently installed documentation to prevent them + First, remove the currently installed documentation files to prevent them from ending up in the final system, and to save about 35 MB: rm -rf /usr/share/{info,man,doc}/* Second, on a modern Linux system, the libtool .la files are only - useful for libltdl. No libraries in LFS are expected to be loaded by - libltdl, and it's known that some .la files can cause BLFS packages - fail to build. Remove those files now: + useful for libltdl. No libraries in LFS are loaded by + libltdl, and it's known that some .la files can cause BLFS package + failures. Remove those files now: find /usr/{lib,libexec} -name \*.la -delete @@ -42,9 +42,9 @@ and your current LFS system is in a good state. Your system can now be backed up for later reuse. In case of fatal failures in the subsequent chapters, it often turns out that removing everything and starting over - (more carefully) is the best option to recover. Unfortunately, all the + (more carefully) is the best way to recover. Unfortunately, all the temporary files will be removed, too. To avoid spending extra time to - redo something which has been built successfully, creating a backup of + redo something which has been done successfully, creating a backup of the current LFS system may prove useful. @@ -58,13 +58,12 @@ The following steps are performed from outside the chroot - environment. That means, you have to leave the chroot environment + environment. That means you have to leave the chroot environment first before continuing. The reason for that is to get access to file system locations outside of the chroot - environment to store/read the backup archive which should + environment to store/read the backup archive, which ought not be placed within the - $LFS hierarchy for - safety reasons. + $LFS hierarchy. @@ -78,7 +77,7 @@ All of the following instructions are executed by root on your host system. Take extra care about the commands you're going to run as mistakes - here can modify your host system. Be aware that the + made here can modify your host system. Be aware that the environment variable LFS is set for user lfs by default but may not be set for @@ -101,17 +100,14 @@ umount $LFS/{sys,proc,run,dev} Make sure you have at least 1 GB free disk space (the source tarballs - will be included in the backup archive) on the filesystem containing - directory where you create the backup archive. + will be included in the backup archive) on the file system containing + the directory where you create the backup archive. Note that the instructions below specify the home directory of the host system's root user, which is - typically found on the root filesystem. - - - + typically found on the root file system. Replace $HOME by a directory of your choice if you do not want to have the backup stored in root's home directory. @@ -149,7 +145,7 @@ tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz . Since the sources are located under $LFS, they are included in the backup archive as well, so they do not need to be downloaded again. After - checking that $LFS is set properly, + checking that $LFS is set properly, you can restore the backup by executing the following commands: @@ -167,7 +163,7 @@ rm -rf ./* tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz - Again, double check that the environment has been setup properly + Again, double check that the environment has been set up properly and continue building the rest of the system. @@ -175,7 +171,7 @@ tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz If you left the chroot environment to create a backup or restart building using a restore, remember to check that the virtual - filesystems are still mounted (findmnt | grep + file systems are still mounted (findmnt | grep $LFS). If they are not mounted, remount them now as described in and re-enter the chroot environment (see ) before continuing. diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index ca7de3802..2434a6b17 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -34,11 +34,11 @@ /var/log/wtmp - Historically, Linux maintains a list of the mounted file systems in the + Historically, Linux maintained a list of the mounted file systems in the file /etc/mtab. Modern kernels maintain this list internally and expose it to the user via the /proc filesystem. To satisfy utilities that - expect the presence of /etc/mtab, create the following + expect to find /etc/mtab, create the following symbolic link: ln -sv /proc/self/mounts /etc/mtab @@ -159,13 +159,13 @@ EOF The created groups are not part of any standard—they are groups decided on in part by the requirements of the Udev configuration in Chapter - 9, and in part by common convention employed by a number of existing Linux + 9, and in part by common conventions employed by a number of existing Linux distributions. In addition, some test suites rely on specific users or groups. The Linux Standard Base (LSB, available at ) only recommends that, besides the group root with a Group ID (GID) of 0, a group bin - with a GID of 1 be present. The GID of 5 is widely used for + with a GID of 1 be present. The GID of 5 is widely used for the tty group, and the number 5 is also used in systemd /etc/fstab for the @@ -179,7 +179,7 @@ EOF or the parent user namespace, but do not exist on the local machine or in the separate namespace). We assign nobody and - nogroup for it to avoid an + nogroup to avoid an unnamed ID. But other distros may treat this ID differently, so any portable program should not depend on this assignment. diff --git a/chapter07/kernfs.xml b/chapter07/kernfs.xml index 3e96bee5e..48826d06c 100644 --- a/chapter07/kernfs.xml +++ b/chapter07/kernfs.xml @@ -15,13 +15,13 @@ Applications running in user space utilize various file - systems exported by the kernel to communicate + systems created 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 + space is used for them. The content of these file systems resides in memory. These file systems must be mounted in the $LFS directory tree so the applications can find them in the chroot environment. - Begin by creating directories on which the file systems will be + Begin by creating the directories on which these virtual file systems will be mounted: mkdir -pv $LFS/{dev,proc,sys,run} @@ -29,31 +29,31 @@ Mounting and Populating /dev - During a normal boot of the LFS system, the kernel automatically + During a normal boot of an LFS system, the kernel automatically mounts the devtmpfs - filesystem on the + file system on the /dev directory; the kernel - creates device nodes on that virtual filesystem during the boot process + creates device nodes on that virtual file system during the boot process, or when a device is first detected or accessed. The udev daemon may - change the owner or permission of the device nodes created by the - kernel, or create new device nodes or symlinks to ease the work of - distro maintainers or system administrators. (See + change the ownership or permissions of the device nodes created by the + kernel, and create new device nodes or symlinks, to ease the work of + distro maintainers and system administrators. (See for details.) If the host kernel supports &devtmpfs;, we can simply mount a &devtmpfs; at $LFS/dev and rely - on the kernel to populate it (the LFS building process does not need - the additional work onto &devtmpfs; by udev daemon). - - But, some host kernels may lack &devtmpfs; support and these - host distros maintain the content of - /dev with different methods. - So the only host-agnostic way for populating - $LFS/dev is - bind mounting the host system's + on the kernel to populate it (i.e., the udev daemon will do the + necessary work automatically). + + But some host kernels lack &devtmpfs; support; these + host distros use different methods to create the content of + /dev. + So the only host-agnostic way to populate the + $LFS/dev directory is + 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 + a special type of mount that generates a duplicate copy of a directory or mount point at some other location. Use the following - command to do this: + command to do this. mount -v --bind /dev $LFS/dev @@ -62,7 +62,7 @@ Mounting Virtual Kernel File Systems - Now mount the remaining virtual kernel filesystems: + Now mount the remaining virtual kernel file systems: mount -v --bind /dev/pts $LFS/dev/pts mount -vt proc proc $LFS/proc -- cgit v1.2.3-54-g00ecf