From 90e3cb3f0e14cadecc0edf2b6de96ee432bc60de Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Sun, 1 Feb 2004 21:49:10 +0000 Subject: [PATCH] Replacing several tags by . git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3203 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- appendixa/autoconf-desc.xml | 2 +- appendixa/bzip2-desc.xml | 2 +- appendixa/lfs-utils-desc.xml | 6 +-- appendixa/perl-desc.xml | 2 +- chapter03/chapter03.xml | 8 ++-- chapter04/chapter04.xml | 2 +- chapter05/bash.xml | 2 +- chapter05/binutils-pass1.xml | 6 +-- chapter05/bzip2.xml | 2 +- chapter05/chapter05.xml | 85 +++++++++++++++++----------------- chapter05/gcc-pass1.xml | 10 ++-- chapter05/gcc-pass2.xml | 8 ++-- chapter05/glibc.xml | 8 ++-- chapter05/grep.xml | 2 +- chapter05/kernelheaders.xml | 2 +- chapter05/patch.xml | 2 +- chapter06/aboutdebug.xml | 2 +- chapter06/bash.xml | 2 +- chapter06/bzip2.xml | 6 +-- chapter06/chapter06.xml | 27 ++++++----- chapter06/config-glibc.xml | 2 +- chapter06/config-shadowpwd.xml | 4 +- chapter06/config-vim.xml | 14 +++--- chapter06/coreutils.xml | 8 ++-- chapter06/flex.xml | 6 +-- chapter06/gcc.xml | 2 +- chapter06/glibc.xml | 2 +- chapter06/groff.xml | 2 +- chapter06/gzip.xml | 4 +- chapter06/inetutils.xml | 2 +- chapter06/kbd.xml | 4 +- chapter06/lfs-utils.xml | 2 +- chapter06/makedev.xml | 8 ++-- chapter06/man.xml | 10 ++-- chapter06/mountproc.xml | 2 +- chapter06/nettools.xml | 4 +- chapter06/patch.xml | 2 +- chapter06/perl.xml | 2 +- chapter06/psmisc.xml | 4 +- chapter06/shadowpwd.xml | 6 +-- chapter06/utillinux.xml | 8 ++-- chapter06/vim.xml | 2 +- chapter07/sysklogd.xml | 12 ++--- chapter07/usage.xml | 28 +++++------ chapter08/fstab.xml | 2 +- chapter08/grub.xml | 2 +- chapter08/kernel-inst.xml | 2 +- 47 files changed, 165 insertions(+), 167 deletions(-) diff --git a/appendixa/autoconf-desc.xml b/appendixa/autoconf-desc.xml index b4b8df0be..54edf9f73 100644 --- a/appendixa/autoconf-desc.xml +++ b/appendixa/autoconf-desc.xml @@ -30,7 +30,7 @@ by their old names to use the current macro names. configure.in for a software package. It prints the identifiers that the package uses in C preprocessor conditionals. If a package has already been set up to have some portability, this program can help to -determine what configure needs to check. It can fill +determine what configure needs to check. It can fill in some gaps in a configure.in file generated by autoscan. diff --git a/appendixa/bzip2-desc.xml b/appendixa/bzip2-desc.xml index d515861ea..2ce53421c 100644 --- a/appendixa/bzip2-desc.xml +++ b/appendixa/bzip2-desc.xml @@ -13,7 +13,7 @@ bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm with Huffman coding. The compression rate is generally considerably better than that achieved by more conventional -compressors using LZ77/LZ78, like gzip. +compressors using LZ77/LZ78, like gzip. bzip2recover tries to recover data from damaged bzip2 files. diff --git a/appendixa/lfs-utils-desc.xml b/appendixa/lfs-utils-desc.xml index 869164285..a0d6cf832 100644 --- a/appendixa/lfs-utils-desc.xml +++ b/appendixa/lfs-utils-desc.xml @@ -4,14 +4,14 @@ It is used in scripts. tempfile creates temporary files in a less secure -manner than mktemp. It is installed for +manner than mktemp. It is installed for backwards-compatibility. The http-get script takes advantage of a little known -feature of bash called "net redirection". It is used to +feature of bash called "net redirection". It is used to download from websites without using any other programs. -iana-net uses the http-get +iana-net uses the http-get script to simplify the process of procuring IANA's services and protocols configuration files. diff --git a/appendixa/perl-desc.xml b/appendixa/perl-desc.xml index e3f776d43..11a264035 100644 --- a/appendixa/perl-desc.xml +++ b/appendixa/perl-desc.xml @@ -34,7 +34,7 @@ Procedure. It can be used to verify that Perl and its libraries have been installed correctly. piconv is a Perl version of the character encoding -converter iconv. +converter iconv. pl2pm is a rough tool for converting Perl4 .pl files to Perl5 .pm modules. diff --git a/chapter03/chapter03.xml b/chapter03/chapter03.xml index 2a419fec2..2b1fe79ba 100644 --- a/chapter03/chapter03.xml +++ b/chapter03/chapter03.xml @@ -39,12 +39,12 @@ The swap partition for your LFS system can be the same one as for your host system, so you won't have to create another if your host system already uses a swap partition. -Start a disk partitioning program such as cfdisk -or fdisk with an argument naming the hard disk upon +Start a disk partitioning program such as cfdisk +or fdisk with an argument naming the hard disk upon which the new partition must be created -- for example /dev/hda for the primary IDE disk. Create a Linux native partition and a swap partition, if needed. Please refer to the man pages of -cfdisk or fdisk if you don't yet +cfdisk or fdisk if you don't yet know how to use the programs. Remember the designation of your new partition -- something like @@ -122,7 +122,7 @@ with the appropriate partition names. You should also ensure that this new partition is not mounted with permissions that are too restrictive (such as the nosuid, nodev or noatime -options). You can run the mount command without any +options). You can run the mount command without any parameters to see with what options the LFS partition is mounted. If you see nosuid, nodev or noatime, you will need to remount it. diff --git a/chapter04/chapter04.xml b/chapter04/chapter04.xml index e70c99ea9..f2770f786 100644 --- a/chapter04/chapter04.xml +++ b/chapter04/chapter04.xml @@ -49,7 +49,7 @@ you won't do the downloading as root, we guess: diff --git a/chapter05/bash.xml b/chapter05/bash.xml index 0772e21f0..05e62ab97 100644 --- a/chapter05/bash.xml +++ b/chapter05/bash.xml @@ -36,7 +36,7 @@ suite anyway, the following command will do so: make install -And make a link for the programs that use sh +And make a link for the programs that use sh for a shell: ln -s bash /tools/bin/sh diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index a98f498c4..34883a596 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -66,9 +66,9 @@ problem. LDFLAGS="-all-static": This tells the linker that all the Binutils programs should be linked statically. However, -strictly speaking, "-all-static" is first passed to the -libtool program which then passes -"-static" on to the linker. +strictly speaking, "-all-static" is first passed to the +libtool program which then passes +"-static" on to the linker. Compilation is now complete. This is the point where we would normally diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml index d11c8e531..72cc0310c 100644 --- a/chapter05/bzip2.xml +++ b/chapter05/bzip2.xml @@ -13,7 +13,7 @@ Installation of Bzip2 -The Bzip2 package doesn't contain a configure +The Bzip2 package doesn't contain a configure script. Compile and install it with a straightforward: make PREFIX=/tools install diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 53139ae54..0349addd0 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -23,7 +23,7 @@ Since the packages compiled here are merely temporary, we don't want them to pollute the soon-to-be LFS system. The build instructions assume that you are using the -bash shell. It is also expected that you have already +bash shell. It is also expected that you have already unpacked a source package (while logged in as user lfs -- explained shortly) and performed a cd into the source directory of a package before issuing its build commands. @@ -100,7 +100,7 @@ something completely different. You should be able to determine the name of your platform's dynamic linker by looking in the /lib directory on your host system. A surefire way is to inspect a random binary from your host system by running: -'readelf -l <name of binary> | grep interpreter' +readelf -l <name of binary> | grep interpreter and noting the output. The authoritative reference covering all platforms is in the shlib-versions file in the root of the Glibc source tree. @@ -118,14 +118,14 @@ into the same prefix work in cooperation and thus utilize a little GNU path to ensure programs are linked only against libraries we choose. -Careful manipulation of gcc's +Careful manipulation of gcc's specs file to tell the compiler which target dynamic linker will be used. Binutils is installed first because both GCC and Glibc perform various feature tests on the assembler and linker during their respective runs of -./configure to determine which software features to enable +./configure to determine which software features to enable or disable. This is more important than one might first realize. An incorrectly configured GCC or Glibc can result in a subtly broken toolchain where the impact of such breakage might not show up until near the end of the build of a whole @@ -137,43 +137,43 @@ much time is wasted. /tools/$TARGET_TRIPLET/bin. In reality, the tools in one location are hard linked to the other. An important facet of the linker is its library search order. Detailed information can be obtained -from ld by passing it the --verbose -flag. For example: 'ld --verbose | grep SEARCH' will +from ld by passing it the --verbose +flag. For example: ld --verbose | grep SEARCH will show you the current search paths and their order. You can see what files are -actually linked by ld by compiling a dummy program and -passing the --verbose switch. For example: -'gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded' -will show you all the files successfully opened during the link. +actually linked by ld by compiling a dummy program and +passing the --verbose switch to the linker. For example: +gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded +will show you all the files successfully opened during the linking. The next package installed is GCC and during its run of -./configure you'll see, for example: +./configure you'll see, for example:
checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld
This is important for the reasons mentioned above. It also demonstrates that GCC's configure script does not search the $PATH directories to find which -tools to use. However, during the actual operation of gcc +tools to use. However, during the actual operation of gcc itself, the same search paths are not necessarily used. You can find out which -standard linker gcc will use by running: -'gcc -print-prog-name=ld'. -Detailed information can be obtained from gcc by passing +standard linker gcc will use by running: +gcc -print-prog-name=ld. +Detailed information can be obtained from gcc by passing it the -v flag while compiling a dummy program. For -example: 'gcc -v dummy.c' will show you detailed +example: gcc -v dummy.c will show you detailed information about the preprocessor, compilation and assembly stages, including -gcc's include search paths and their order. +gcc's include search paths and their order. The next package installed is Glibc. The most important considerations for building Glibc are the compiler, binary tools and kernel headers. The compiler -is generally no problem as Glibc will always use the gcc +is generally no problem as Glibc will always use the gcc found in a $PATH directory. The binary tools and kernel headers can be a little more troublesome. Therefore we take no risks and use the available configure switches to enforce the correct selections. After the run of -./configure you can check the contents of the +./configure you can check the contents of the config.make file in the glibc-build directory for all the important details. You'll note some interesting items like the use of -CC="gcc -B/tools/bin/" to control which binary tools are +CC="gcc -B/tools/bin/" to control which binary tools are used, and also the use of the -nostdinc and -isystem flags to control the compiler's include search path. These items help to highlight an important aspect of the Glibc package: @@ -182,18 +182,17 @@ not rely on toolchain defaults. After the Glibc installation, we make some adjustments to ensure that searching and linking take place only within our /tools -prefix. We install an adjusted ld, which has a hard-wired +prefix. We install an adjusted ld, which has a hard-wired search path limited to /tools/lib. Then -we amend gcc's specs file to point to our new dynamic +we amend gcc's specs file to point to our new dynamic linker in /tools/lib. This last step is vital to the whole process. As mentioned above, a hard-wired path to a dynamic linker is embedded into every ELF shared executable. You can inspect this by running: -'readelf -l <name of binary> | grep interpreter'. -By amending gcc's specs file, we are ensuring that every -program compiled from here through the end of will -use our new dynamic linker in -/tools/lib. +readelf -l <name of binary> | grep interpreter. +By amending gcc's specs file, we are ensuring that every +program compiled from here through the end of this chapter will use our new +dynamic linker in /tools/lib. The need to use the new dynamic linker is also the reason why we apply the Specs patch for the second pass of GCC. Failure to do so will result in the GCC @@ -203,7 +202,7 @@ would defeat our goal of getting away from the host. During the second pass of Binutils, we are able to utilize the --with-lib-path configure switch to control -ld's library search path. From this point onwards, the +ld's library search path. From this point onwards, the core toolchain is self-contained and self-hosted. The remainder of the packages all build against the new Glibc in /tools and all is well. @@ -213,7 +212,7 @@ first major package we install is Glibc, due to its self-sufficient nature that we mentioned above. Once this Glibc is installed into /usr, we perform a quick changeover of the toolchain defaults, then proceed for real in building the rest of the -target LFS system. +target LFS system. Notes on static linking @@ -288,7 +287,7 @@ partition: ln -s $LFS/tools / -The above command is correct. The ln command +The above command is correct. The ln command has a few syntactic variations, so be sure to check the info page before reporting what you may think is an error. @@ -349,8 +348,8 @@ user command: su - lfs -The "-" instructs su to -start a login shell. +The "-" instructs su to start a +login shell. @@ -360,7 +359,7 @@ start a login shell. We're going to set up a good working environment by creating two new -startup files for the bash shell. While logged in as +startup files for the bash shell. While logged in as user lfs, issue the following command to create a new .bash_profile: @@ -372,7 +371,7 @@ exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash the initial shell is a login shell which reads the /etc/profile of your host (probably containing some settings of environment variables) and then .bash_profile. -The exec env -i ... /bin/bash command in the latter file +The exec env -i ... /bin/bash command in the latter file replaces the running shell with a new one with a completely empty environment, except for the HOME, TERM and PS1 variables. This ensures that no unwanted and potentially hazardous environment variables from the host system leak into our @@ -393,15 +392,15 @@ PATH=/tools/bin:/bin:/usr/bin export LFS LC_ALL PATH EOF -The set +h command turns off -bash's hash function. Normally hashing is a useful -feature: bash uses a hash table to remember the +The set +h command turns off +bash's hash function. Normally hashing is a useful +feature: bash uses a hash table to remember the full pathnames of executable files to avoid searching the PATH time and time again to find the same executable. However, we'd like the new tools to be used as soon as they are installed. By switching off the hash function, our -"interactive" commands (make, -patch, sed, -cp and so forth) will always use +"interactive" commands (make, +patch, sed, +cp and so forth) will always use the newest available version during the build process. Setting the user file-creation mask to 022 ensures that newly created @@ -519,8 +518,8 @@ appears as the prefix of our dynamic linker. If you did not receive the output as shown above, or received no output at all, then something is seriously wrong. You will need to investigate and retrace your steps to find out where the problem is and correct it. There is no point in continuing until this is done. -First, redo the sanity check using gcc instead of -cc. If this works it means the +First, redo the sanity check using gcc instead of +cc. If this works it means the /tools/bin/cc symlink is missing. Revisit and fix the symlink. Second, ensure your $PATH is correct. You can check this by running echo $PATH and @@ -587,7 +586,7 @@ that it doesn't recognize their file format. Most of them are scripts instead of binaries. Take care not to use ---strip-unneeded on the libraries -- they would be +--strip-unneeded on the libraries -- they would be destroyed and you would have to build Glibc all over again. To save another couple of megabytes, you can throw away all the diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index ed1d8a27e..08822cbf0 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -42,7 +42,7 @@ cd ../gcc-build
--with-local-prefix=/tools: The purpose of this switch is to remove /usr/local/include -from gcc's include search path. This is not absolutely +from gcc's include search path. This is not absolutely essential; however, we want to try to minimize the influence of the host system, thus making this a sensible thing to do. @@ -51,8 +51,8 @@ seem counter-intuitive at first. But using it allows the building of libgcc_s.so.1 and libgcc_eh.a, and having libgcc_eh.a available ensures that the configure script for Glibc (the next package we compile) produces the proper results. -Note that the gcc binaries will still be linked -statically, as this is controlled by the -static +Note that the gcc binaries will still be linked +statically, as this is controlled by the -static value of BOOT_LDFLAGS further on. --enable-languages=c: This option @@ -92,10 +92,10 @@ the second pass. As a finishing touch we'll create the /tools/bin/cc symlink. Many programs and -scripts run cc instead of gcc, +scripts run cc instead of gcc, a thing meant to keep programs generic and therefore usable on all kinds of Unix systems. Not everybody has the GNU C compiler installed. Simply running -cc leaves the system administrator free to decide what +cc leaves the system administrator free to decide what C compiler to install, as long as there's a symlink pointing to it: ln -s gcc /tools/bin/cc diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index 34f8f18d8..982c267d6 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -112,7 +112,7 @@ needed to ensure that both C and C++ compilers are built. make -There is no need to use the bootstrap target now, +There is no need to use the bootstrap target now, as the compiler we're using to compile this GCC was built from the exact same version of the GCC sources we used earlier. @@ -123,7 +123,7 @@ so: make -k check -The -k flag is used to make the test suite run +The -k flag is used to make the test suite run through to completion and not stop at the first failure. The GCC test suite is very comprehensive and is almost guaranteed to generate a few failures. To get a summary of the test suite results, run this: @@ -142,12 +142,12 @@ current GCC-&gcc-version; should look on i686-pc-linux-gnu, see * 24 XPASS's for libstdc++ The unexpected pass for g++ is due to the use of ---enable-__cxa_atexit. Apparently not all platforms +--enable-__cxa_atexit. Apparently not all platforms supported by GCC have support for "__cxa_atexit" in their C libraries, so this test is not always expected to pass. The 24 unexpected passes for libstdc++ are due to the use of ---enable-clocale=gnu, which is the correct choice on +--enable-clocale=gnu, which is the correct choice on Glibc-based systems of versions 2.2.5 and above. The underlying locale support in the GNU C library is superior to that of the otherwise selected "generic" model (which may be applicable if for instance you were using Newlibc, Sun-libc diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index e8c2e8e91..5b5f1d77e 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -53,7 +53,7 @@ regard to what kernel headers and Binutils programs get used during the Glibc build. --without-gd: This switch ensures -that we don't build the memusagestat program, which +that we don't build the memusagestat program, which strangely enough insists on linking against the host's libraries (libgd, libpng, libz, and so forth). @@ -122,9 +122,9 @@ ultimately end up using so that is the one we would really like to see pass. But please keep in mind, even in some failures could still occur -- the math tests for example. When experiencing a failure, make a note of it, then -continue by reissuing the make check. The test suite +continue by reissuing the make check. The test suite should pick up where it left off and continue on. You can circumvent this -stop-start sequence by issuing a make -k check. But if +stop-start sequence by issuing a make -k check. But if you do that, be sure to log the output so that you can later peruse the log file and examine the total number of failures. @@ -156,7 +156,7 @@ command will do so: An alternative to running the previous command is to install only those locales which you need or want. This can be achieved by using the -localedef command. Information on this can be found in +localedef command. Information on this can be found in the INSTALL file in the Glibc source. However, there are a number of locales that are essential for the tests of future packages to pass, in particular, the libstdc++ tests from GCC. The diff --git a/chapter05/grep.xml b/chapter05/grep.xml index bb349ea6c..e05a15341 100644 --- a/chapter05/grep.xml +++ b/chapter05/grep.xml @@ -22,7 +22,7 @@ --disable-perl-regexp: This makes sure -that grep does not get linked against a PCRE library +that grep does not get linked against a PCRE library that may be present on the host and would not be available once we enter the chroot environment. --with-included-regex: This ensures that diff --git a/chapter05/kernelheaders.xml b/chapter05/kernelheaders.xml index e535ff5d5..adc7a668d 100644 --- a/chapter05/kernelheaders.xml +++ b/chapter05/kernelheaders.xml @@ -12,7 +12,7 @@ As some packages need to refer to the kernel header files, we're going to unpack the kernel archive now, set it up, and copy the required files to a -place where gcc can later find them. +place where gcc can later find them. Prepare for the header installation with: diff --git a/chapter05/patch.xml b/chapter05/patch.xml index 4f9e4647d..ab72274aa 100644 --- a/chapter05/patch.xml +++ b/chapter05/patch.xml @@ -17,7 +17,7 @@ CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools -The preprocessor flag -D_GNU_SOURCE is only needed +The preprocessor flag -D_GNU_SOURCE is only needed on the PowerPC platform. On other architectures you can leave it out. Compile the program: diff --git a/chapter06/aboutdebug.xml b/chapter06/aboutdebug.xml index dff5d0775..ccf05b83e 100644 --- a/chapter06/aboutdebug.xml +++ b/chapter06/aboutdebug.xml @@ -37,7 +37,7 @@ symbols, the difference will generally be a factor between 2 and 5. software, a lot of disk space can be regained by removing these symbols . To remove debugging symbols from a binary (which must be an a.out -or ELF binary), run strip --strip-debug filename. +or ELF binary), run strip --strip-debug filename. Wildcards can be used to treat multiple files (use something like strip --strip-debug $LFS/tools/bin/*). diff --git a/chapter06/bash.xml b/chapter06/bash.xml index 994b7000c..f7862db68 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -39,7 +39,7 @@ following command will do so: make install -And reload the newly compiled bash program: +And reload the newly compiled bash program: exec /bin/bash --login +h diff --git a/chapter06/bzip2.xml b/chapter06/bzip2.xml index e67810b0d..d1893c1f0 100644 --- a/chapter06/bzip2.xml +++ b/chapter06/bzip2.xml @@ -4,7 +4,7 @@ The Bzip2 package contains programs for compressing and decompressing files. On text files they achieve a much better compression than the -traditional gzip. +traditional gzip. &buildtime; &bzip2-time; &diskspace; &bzip2-compsize; @@ -34,13 +34,13 @@ against it. If you are reinstalling Bzip2, you will now first have to do rm -f /usr/bin/bz*, otherwise the following -make install will fail. +make install will fail. Install the programs: make install -And install the shared bzip2 binary into the +And install the shared bzip2 binary into the /bin directory, then make some necessary symbolic links, and clean up: diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 6364740be..f97d4d777 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -68,13 +68,12 @@ with a series of short descriptions of these. It is time to enter the chroot environment in order to begin installing the packages we need. Before you can chroot, however, you need to become root, since only root -can execute the chroot command. +can execute the chroot command. Just like earlier, ensure the LFS environment variable is set up properly by running echo $LFS and ensuring it shows the path to your LFS partition's mount point, which is -/mnt/lfs if you followed our -example. +/mnt/lfs if you followed our example. Become root and run the following command to enter the chroot environment: @@ -84,12 +83,12 @@ to enter the chroot environment:     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \     /tools/bin/bash --login +h -The -i option given to the -env command will clear all variables of the chroot +The -i option given to the +env command will clear all variables of the chroot environment. After that, only the HOME, TERM, PS1 and PATH variables are set again. The TERM=$TERM construct will set the TERM variable inside chroot to the same value as outside chroot; this variable is needed for programs -like vim and less to operate +like vim and less to operate properly. If you need other variables present, such as CFLAGS or CXXFLAGS, this is a good place to set them again. @@ -103,8 +102,8 @@ the chroot command. last in the PATH. This means that a temporary tool will not be used any more as soon as its final version is installed. Well, at least when the shell doesn't remember the locations of executed binaries -- for this reason hashing -is switched off by passing the +h option to -bash. +is switched off by passing the +h option to +bash. You have to make sure all the commands in the rest of this chapter and in the following chapters are run from within the chroot environment. @@ -281,15 +280,15 @@ will now work. exec /tools/bin/bash --login +h -Note the use of the +h directive. This tells -bash not to use its internal path hashing. Without this -directive, bash would remember the paths to binaries it +Note the use of the +h directive. This tells +bash not to use its internal path hashing. Without this +directive, bash would remember the paths to binaries it has executed. Since we want to use our newly compiled binaries as soon as they are installed, we turn off this function for the duration of this chapter. -The login, agetty and -init programs (and some others) use a number of log +The login, agetty and +init programs (and some others) use a number of log files to record information such as who was logged into the system and when. These programs, however, won't write to the log files if they don't already exist. Initialize the log files and give them their proper permissions: @@ -341,7 +340,7 @@ identical. From now on every compiled program will link only against the libraries in /usr/lib and /lib. The extra -INSTALL=/tools/bin/install is needed because the Makefile +INSTALL=/tools/bin/install is needed because the Makefile created during the second pass still contains the reference to /usr/bin/install, which we obviously haven't installed yet. Some host distributions contain a ginstall diff --git a/chapter06/config-glibc.xml b/chapter06/config-glibc.xml index e92a7caf5..6d74eed27 100644 --- a/chapter06/config-glibc.xml +++ b/chapter06/config-glibc.xml @@ -54,7 +54,7 @@ user mode. Of course, instead of Canada/Eastern, fill in -the name of the time zone that the tzselect script +the name of the time zone that the tzselect script gave you. diff --git a/chapter06/config-shadowpwd.xml b/chapter06/config-shadowpwd.xml index 769292fbc..e3268b6f2 100644 --- a/chapter06/config-shadowpwd.xml +++ b/chapter06/config-shadowpwd.xml @@ -23,7 +23,7 @@ command: Under normal circumstances, you won't have created any passwords yet. However, if returning to this section to enable shadowing, you should reset any -current user passwords with the passwd command or any -group passwords with the gpasswd command. +current user passwords with the passwd command or any +group passwords with the gpasswd command. diff --git a/chapter06/config-vim.xml b/chapter06/config-vim.xml index ab9aea8bf..7fa0650ac 100644 --- a/chapter06/config-vim.xml +++ b/chapter06/config-vim.xml @@ -2,10 +2,10 @@ Configuring Vim -By default, vim runs in vi-compatible mode. Some -people might like this, but we prefer to run vim in its +By default, vim runs in vi-compatible mode. Some +people might like this, but we prefer to run vim in its own mode (else we wouldn't have included it in this book, but the original -vi). Create a default vim configuration file by running +vi). Create a default vim configuration file by running the following: cat > /etc/vimrc << "EOF" @@ -18,11 +18,11 @@ syntax on " End /etc/vimrc EOF -The set nocompatible will make -vim behave in a more useful way than the default -vi-compatible manner. The set backspace=2 allows +The set nocompatible will make +vim behave in a more useful way than the default +vi-compatible manner. The set backspace=2 allows backspacing over line breaks, autoindent and the start of insert. And the -syntax on switches on vim's +syntax on switches on vim's semantic colouring. diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 38c605909..0d2f9cb81 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -20,14 +20,14 @@ basic system characteristics. patch -Np1 -i ../&coreutils-posixver-patch; -Normally the functionality of uname is somewhat -broken, in that the -p switch always returns "unknown". +Normally the functionality of uname is somewhat +broken, in that the -p switch always returns "unknown". The following patch fixes this behaviour for Intel architectures: patch -Np1 -i ../&coreutils-uname-patch; We do not want Coreutils to install its version of the -hostname program, because it is inferior to the version +hostname program, because it is inferior to the version provided by Net-tools. Prevent its installation by applying a patch: patch -Np1 -i ../&coreutils-hostname-patch; @@ -40,7 +40,7 @@ provided by Net-tools. Prevent its installation by applying a patch: make -The su program from Coreutils wasn't installed in +The su program from Coreutils wasn't installed in Chapter 5 because it needed root privilege to do so. We're going to need it in a few moments for the test suite. Therefore we work around the problem by installing it now: diff --git a/chapter06/flex.xml b/chapter06/flex.xml index ff36d5748..809f1ca31 100644 --- a/chapter06/flex.xml +++ b/chapter06/flex.xml @@ -39,10 +39,10 @@ following command will do so: ln -s libfl.a /usr/lib/libl.a -A few programs don't know about flex yet and try -to run its predecessor lex. To support those programs, +A few programs don't know about flex yet and try +to run its predecessor lex. To support those programs, create a shell script named lex that calls -flex in Lex emulation mode: +flex in Lex emulation mode: cat > /usr/bin/lex << "EOF" #!/bin/sh diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index 670a35b70..920ff6831 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -86,7 +86,7 @@ To honor those packages, create this symlink: ln -s ../usr/bin/cpp /lib -Many packages use the name cc to call the C +Many packages use the name cc to call the C compiler. To satisfy those packages, create a symlink: ln -s gcc /usr/bin/cc diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 2df7bdd3b..5b8d60f4c 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -91,7 +91,7 @@ weren't installed by the above command. Do it with this: An alternative to running the previous command is to install only those locales which you need or want. This can be achieved by using the -localedef command. Information on this can be found in +localedef command. Information on this can be found in the INSTALL file in the Glibc source. However, there are a number of locales that are essential for the tests of future packages to pass, in particular, the libstdc++ tests from GCC. The diff --git a/chapter06/groff.xml b/chapter06/groff.xml index f7c3ed066..3722ba239 100644 --- a/chapter06/groff.xml +++ b/chapter06/groff.xml @@ -32,7 +32,7 @@ live elsewhere, you may want to change PAGE=letter to make install -Some documentation programs, such as xman, +Some documentation programs, such as xman, will not work properly without the following symlinks: ln -s soelim /usr/bin/zsoelim diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml index a2b52b8f2..81e054b4d 100644 --- a/chapter06/gzip.xml +++ b/chapter06/gzip.xml @@ -20,8 +20,8 @@ files. ./configure --prefix=/usr -The gzexe script has the location of the -gzip binary hard-wired into it. Because we later change +The gzexe script has the location of the +gzip binary hard-wired into it. Because we later change the location of the binary, the following command assures that the new location gets placed into the script: diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml index f35b948d1..c5a4fc880 100644 --- a/chapter06/inetutils.xml +++ b/chapter06/inetutils.xml @@ -61,7 +61,7 @@ replacements are available for many of these servers. make install -And move the ping program to its proper place: +And move the ping program to its proper place: mv /usr/bin/ping /bin diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml index 32cb7e4dc..34cea17fc 100644 --- a/chapter06/kbd.xml +++ b/chapter06/kbd.xml @@ -15,8 +15,8 @@ Installation of Kbd -By default some of Kbd's utilities (setlogcons, -setvesablank and getunimap) are +By default some of Kbd's utilities (setlogcons, +setvesablank and getunimap) are not installed. First enable the compilation of these utilities: patch -Np1 -i ../&kbd-patch; diff --git a/chapter06/lfs-utils.xml b/chapter06/lfs-utils.xml index ea1af2068..a4a025126 100644 --- a/chapter06/lfs-utils.xml +++ b/chapter06/lfs-utils.xml @@ -23,7 +23,7 @@ --with-libc: This causes the -mktemp program to use the mkstemp +mktemp program to use the mkstemp and mkdtemp functions from the system C library. diff --git a/chapter06/makedev.xml b/chapter06/makedev.xml index d98a59241..0763e8c8f 100644 --- a/chapter06/makedev.xml +++ b/chapter06/makedev.xml @@ -16,10 +16,10 @@ Making devices Note that unpacking the MAKEDEV-&makedev-version;.bz2 -file doesn't create a directory for you to cd into, as +file doesn't create a directory for you to cd into, as the file contains only a shell script. -Install the MAKEDEV script: +Install the MAKEDEV script: bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV chmod 754 /dev/MAKEDEV @@ -36,7 +36,7 @@ chmod 754 /dev/MAKEDEV verbose mode. generic-nopty: This instructs -MAKEDEV to create a generic selection of commonly used +MAKEDEV to create a generic selection of commonly used device special files, except for the ptyXX and ttyXX range of files. We don't need those files because we are going to use Unix98 PTYs via the devpts file system. @@ -44,7 +44,7 @@ need those files because we are going to use Unix98 PTYs via the If it turns out that some special device zzz that you need is missing, try running ./MAKEDEV -v zzz. -Alternatively, you may create devices via the mknod +Alternatively, you may create devices via the mknod program. Please refer to its man and info pages if you need more information. diff --git a/chapter06/man.xml b/chapter06/man.xml index 2594c8936..d308a1263 100644 --- a/chapter06/man.xml +++ b/chapter06/man.xml @@ -31,7 +31,7 @@ properly handled by Less: The third is also a sed substitution to comment out the "MANPATH /usr/man" line in the man.conf file to prevent redundant -results when using programs such as whatis: +results when using programs such as whatis: sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in @@ -50,7 +50,7 @@ FHS by putting cat pages under /var/cache/man provided that that directory exists. -confdir=/etc: This tells the -man program to look for the man.conf +man program to look for the man.conf configuration file in the /etc directory. @@ -62,9 +62,9 @@ configuration file in the /etc directory. make install -If you wish to disable SGR escape sequences, you should -edit the man.conf file and add the -c argument -to nroff. +If you wish to disable SGR escape sequences, you should edit the +man.conf file and add the -c switch +to NROFF. You may want to also take a look at the BLFS page at which deals with diff --git a/chapter06/mountproc.xml b/chapter06/mountproc.xml index a60f76e10..e15c3546e 100644 --- a/chapter06/mountproc.xml +++ b/chapter06/mountproc.xml @@ -44,7 +44,7 @@ now the most common way for pseudo terminals (PTYs) to be implemented. The most likely cause is that your host system's kernel was compiled without support for the devpts file system. You can check which file systems your kernel supports by peeking into its internals with a command such as -cat /proc/filesystems. If a file system type named +cat /proc/filesystems. If a file system type named devfs is listed there, then we'll be able to work around the problem by mounting the host's devfs file system on top of the new /dev structure which we'll create later on in the section diff --git a/chapter06/nettools.xml b/chapter06/nettools.xml index 56e313d73..70bcdd33a 100644 --- a/chapter06/nettools.xml +++ b/chapter06/nettools.xml @@ -16,7 +16,7 @@ Installation of Net-tools If you don't know what to answer to all the questions asked during the -make config phase below, then just accept the defaults. +make config phase below, then just accept the defaults. This will be just fine in the majority of cases. What you're asked here is a bunch of questions about which network protocols you've enabled in your kernel. The default answers will enable the tools from this package to work @@ -35,7 +35,7 @@ program: make config If you intend to accept the default settings, you may skip the -questions generated by make config by running +questions generated by make config by running yes "" | make config instead. Compile the package: diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 0b58365d6..57bb23a7a 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -19,7 +19,7 @@ CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr -Again, the preprocessor flag -D_GNU_SOURCE is only +Again, the preprocessor flag -D_GNU_SOURCE is only needed on the PowerPC platform. On other architectures you can leave it out. Compile the package: diff --git a/chapter06/perl.xml b/chapter06/perl.xml index f1d0598bf..8e69cbcee 100644 --- a/chapter06/perl.xml +++ b/chapter06/perl.xml @@ -22,7 +22,7 @@ ./configure.gnu --prefix=/usr -Dpager="/bin/less -isR" If you want more control over the way Perl sets itself up to be -built, you can run the interactive Configure script +built, you can run the interactive Configure script instead and modify the way Perl is built. If you think you can live with the (sensible) defaults Perl auto-detects, then just use the command listed above. diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml index 3cde75179..f506ed5b8 100644 --- a/chapter06/psmisc.xml +++ b/chapter06/psmisc.xml @@ -48,9 +48,9 @@ therefore make it a symbolic link to pstree: mv /bin/pstree* /usr/bin ln -sf pstree /usr/bin/pstree.x11 -By default Psmisc's pidof program isn't installed. +By default Psmisc's pidof program isn't installed. Generally, this isn't a problem because we later install the Sysvinit package, -which provides a better pidof program. But if you're not +which provides a better pidof program. But if you're not going to use Sysvinit, you should complete the installation of Psmisc by creating the following symlink: diff --git a/chapter06/shadowpwd.xml b/chapter06/shadowpwd.xml index 856262fe3..5c9c6b510 100644 --- a/chapter06/shadowpwd.xml +++ b/chapter06/shadowpwd.xml @@ -16,9 +16,9 @@ way. Installation of Shadow -Shadow hard-wires the path to the passwd binary +Shadow hard-wires the path to the passwd binary within the binary itself, but does this the wrong way. If a -passwd binary is not present before installing Shadow, +passwd binary is not present before installing Shadow, the package incorrectly assumes it is going to be located at /bin/passwd, but then installs it in /usr/bin/passwd. This will lead to errors about not finding @@ -84,7 +84,7 @@ directory for it to work properly: mkdir /etc/default -Coreutils has already installed a better groups +Coreutils has already installed a better groups program in /usr/bin. Remove the one installed by Shadow: diff --git a/chapter06/utillinux.xml b/chapter06/utillinux.xml index f167cfb80..fd543bdbb 100644 --- a/chapter06/utillinux.xml +++ b/chapter06/utillinux.xml @@ -19,7 +19,7 @@ messages. The FHS recommends that we use /var/lib/hwclock, instead of the usual /etc, as the location for the -adjtime file. To make the hwclock +adjtime file. To make the hwclock program FHS-compliant, run the following: cp hwclock/hwclock.c{,.backup} @@ -44,12 +44,12 @@ mkdir -p /var/lib/hwclock HAVE_KILL=yes: This prevents the -kill program (already installed by Procps) from being +kill program (already installed by Procps) from being built and installed again. HAVE_SLN=yes: This prevents the -sln program (a statically linked -ln, already installed by Glibc) from being built and +sln program (a statically linked +ln, already installed by Glibc) from being built and installed again. diff --git a/chapter06/vim.xml b/chapter06/vim.xml index e82ccb111..7159413f7 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -52,7 +52,7 @@ the following command will do so: make install -When called as vi, vim +When called as vi, vim will run in old-fashioned vi-mode. To allow this, create a symlink: ln -s vim /usr/bin/vi diff --git a/chapter07/sysklogd.xml b/chapter07/sysklogd.xml index dd8f3dfc7..4c1b02af0 100644 --- a/chapter07/sysklogd.xml +++ b/chapter07/sysklogd.xml @@ -3,12 +3,12 @@ The sysklogd script invokes the -syslogd program with the -m 0 -option. This option turns off the periodic timestamp mark that syslogd -writes to the log files every 20 minutes by default. If you want to turn -on this periodic timestamp mark, edit the sysklogd -script and make the changes accordingly. See man -syslogd for more information. +syslogd program with the -m 0 option. +This option turns off the periodic timestamp mark that +syslogd writes to the log files every 20 minutes by default. +If you want to turn on this periodic timestamp mark, edit the +sysklogd script and make the changes accordingly. See +man syslogd for more information. diff --git a/chapter07/usage.xml b/chapter07/usage.xml index a4609108d..e0810c403 100644 --- a/chapter07/usage.xml +++ b/chapter07/usage.xml @@ -25,21 +25,21 @@ different runlevels as they are often implemented: 5: same as 4, it is usually used for GUI login (like X's xdm or KDE's kdm) 6: reboot the computer -The command used to change runlevels is init -<runlevel> where <runlevel> is -the target runlevel. For example, to reboot the computer, a user would issue -the init 6 command. The reboot command is just an alias, as is the halt -command an alias to init 0. +The command used to change runlevels is init +<runlevel> where <runlevel> is the target runlevel. For +example, to reboot the computer, a user would issue the init +6 command. The reboot command is just an alias for +it, as is the halt command an alias for init +0. -There are a number of directories under /etc/rc.d that look like -like rc?.d where ? is the number of the runlevel and rcsysinit.d which -contain a number of symbolic links. Some begin with a K, the others -begin with an S, and all of them have two numbers following the initial -letter. The K means to stop (kill) a service, and the S means to start a -service. The numbers determine the order in which the scripts are run, -from 00 to 99; the lower the number the sooner it gets executed. When init -switches to another runlevel, the appropriate services get killed and -others get started. +There are a number of directories under /etc/rc.d +that look like like rc?.d where ? is the number of the runlevel and rcsysinit.d +which contain a number of symbolic links. Some begin with a K, the others begin +with an S, and all of them have two numbers following the initial letter. The K +means to stop (kill) a service, and the S means to start a service. The numbers +determine the order in which the scripts are run, from 00 to 99; the lower the +number the sooner it gets executed. When init switches to another runlevel, the +appropriate services get killed and others get started. The real scripts are in /etc/rc.d/init.d. They do all the work, and the symlinks all point to them. Killing links and starting links point to diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml index 5b96a3ab3..5959d891a 100644 --- a/chapter08/fstab.xml +++ b/chapter08/fstab.xml @@ -25,7 +25,7 @@ shm /dev/shm tmpfs defaults 0 0 and fff with the values appropriate for your system -- for example hda2, hda5 and reiserfs. For all the details on the six fields in this -table, see man 5 fstab. +table, see man 5 fstab. When using a reiserfs partition, the 1 1 at the end of the line should be replaced with 0 0, as such a diff --git a/chapter08/grub.xml b/chapter08/grub.xml index d229a461e..e934b7c9f 100644 --- a/chapter08/grub.xml +++ b/chapter08/grub.xml @@ -116,7 +116,7 @@ rootnoverify (hd0,0) chainloader +1 EOF -If info grub doesn't tell you all you want to +If info grub doesn't tell you all you want to know, you can find more information regarding Grub on its website, located at: . diff --git a/chapter08/kernel-inst.xml b/chapter08/kernel-inst.xml index d0c592425..667f2dc28 100644 --- a/chapter08/kernel-inst.xml +++ b/chapter08/kernel-inst.xml @@ -88,7 +88,7 @@ kernel. Issue the following command to install the map file: cp System.map /boot .config is the kernel configuration file that was -produced by the make menuconfig step above. It contains +produced by the make menuconfig step above. It contains all the config selections for the kernel that was just compiled. It's a good idea to keep this file for future reference: