diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-10-22 22:26:46 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-10-22 22:26:46 +0000 |
commit | 360e2c43cd050de14a654927da9a7610af9e38ce (patch) | |
tree | fa36484dc5954a41335c6ec7ddf0b305c020129d | |
parent | 1612f40eb9f1b8ea766ea308e40d6b3fe14f6fc5 (diff) |
Adding some markup and doing miscellaneous shuffles.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3029 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter01/changelog.xml | 17 | ||||
-rw-r--r-- | chapter05/lockingglibc.xml | 4 | ||||
-rw-r--r-- | chapter05/utillinux-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/adjustingtoolchain.xml | 4 | ||||
-rw-r--r-- | chapter06/changingowner.xml | 5 | ||||
-rw-r--r-- | chapter06/chroot.xml | 12 | ||||
-rw-r--r-- | chapter06/config-shadowpwd.xml | 9 | ||||
-rw-r--r-- | chapter06/createfiles.xml | 2 | ||||
-rw-r--r-- | chapter06/creatingdirs.xml | 3 | ||||
-rw-r--r-- | chapter06/gcc-2953-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/makedev-inst.xml | 33 | ||||
-rw-r--r-- | chapter06/mountproc.xml | 4 | ||||
-rw-r--r-- | chapter06/perl-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/pwdgroup.xml | 5 | ||||
-rw-r--r-- | chapter06/shadowpwd-inst.xml | 15 | ||||
-rw-r--r-- | chapter08/fstab.xml | 13 | ||||
-rw-r--r-- | chapter08/grub.xml | 10 | ||||
-rw-r--r-- | chapter09/theend.xml | 8 |
18 files changed, 79 insertions, 71 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 1a42a6acd..c1f55a9be 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -99,26 +99,33 @@ <listitem><para>October 22nd, 2003 [gerard] Chapter 2: Added notes how to create installation dependency lists.</para></listitem> +<listitem><para>October 22nd, 2003 [alex]: Chapter 6 - Gawk and Shadow: +Adjusted the text. And added some markup elsewhere.</para></listitem> + +<listitem><para>October 22nd, 2003 [alex]: Chapter 6 - Entering the chroot +environment: Dropped the <userinput>set +h</userinput> command, as it is +pointless there: it's redone several sections later.</para></listitem> + <listitem><para>October 15th, 2003 [greg]: Chapter 9: Reworked final strip command. Relocated paragraphs about directory removal from Chapter 6.</para></listitem> <listitem><para>October 14th, 2003 [greg]: Chapter 8 - Making the LFS system -bootable: Expand Grub details and add a warning.</para></listitem> +bootable: Expanded Grub details and added a warning.</para></listitem> -<listitem><para>October 14th, 2003 [alex]: Appendix A - Updating the contents +<listitem><para>October 14th, 2003 [alex]: Appendix A - Updated the contents of Perl and Procps.</para></listitem> -<listitem><para>October 14th, 2003 [alex]: Chapter 4 and 5 - Added suggestion +<listitem><para>October 14th, 2003 [alex]: Chapter 4 and 5 - Added a suggestion to use $LFS/sources as the working and storage place.</para></listitem> <listitem><para>October 13th, 2003 [greg]: Chapter 9 - Rebooting the system: Reworked umount commands.</para></listitem> -<listitem><para>October 11h, 2003 [alex]: Adapted the required disk space +<listitem><para>October 11th, 2003 [alex]: Adapted the required disk space values and SBUs, as posted by Bruce Dubbs.</para></listitem> -<listitem><para>October 11h, 2003 [alex]: Chapter 5 - Toolchain technical +<listitem><para>October 11th, 2003 [alex]: Chapter 5 - Toolchain technical notes: Added and changed some markup.</para></listitem> <listitem><para>October 9th, 2003 [gerard]: Upgraded to diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml index 45ab0d683..db2286b49 100644 --- a/chapter05/lockingglibc.xml +++ b/chapter05/lockingglibc.xml @@ -34,7 +34,7 @@ to the new dynamic linker. A simple sed will accomplish this:</para> <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs && sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \ - $SPECFILE > tempspecfile && + $SPECFILE > tempspecfile && mv -f tempspecfile $SPECFILE && unset SPECFILE</userinput></screen> @@ -63,7 +63,7 @@ following commands to eliminate this possibility:</para> functions (compiling and linking) of the new toolchain are working as expected. For this we are going to perform a simple sanity check:</para> -<screen><userinput>echo 'main(){}' > dummy.c +<screen><userinput>echo 'main(){}' > dummy.c gcc dummy.c readelf -l a.out | grep ': /tools'</userinput></screen> diff --git a/chapter05/utillinux-inst.xml b/chapter05/utillinux-inst.xml index 7d0cda535..a38cb26c4 100644 --- a/chapter05/utillinux-inst.xml +++ b/chapter05/utillinux-inst.xml @@ -7,7 +7,7 @@ the /tools directory. This is fixed by altering the configure script:</para> <screen><userinput>cp configure configure.backup -sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen> +sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen> <para>Prepare Util-linux for compilation:</para> diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml index f07562f9c..15630f878 100644 --- a/chapter06/adjustingtoolchain.xml +++ b/chapter06/adjustingtoolchain.xml @@ -44,7 +44,7 @@ this:</para> <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs && sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ - $SPECFILE > newspecfile && + $SPECFILE > newspecfile && mv -f newspecfile $SPECFILE && unset SPECFILE</userinput></screen> @@ -65,7 +65,7 @@ name of your platform's dynamic linker in the above commands. Refer back to basic functions (compiling and linking) of the adjusted toolchain are working as expected. For this we are going to perform a simple sanity check:</para> -<screen><userinput>echo 'main(){}' > dummy.c +<screen><userinput>echo 'main(){}' > dummy.c gcc dummy.c readelf -l a.out | grep ': /lib'</userinput></screen> diff --git a/chapter06/changingowner.xml b/chapter06/changingowner.xml index e7ff8b12e..e70a56125 100644 --- a/chapter06/changingowner.xml +++ b/chapter06/changingowner.xml @@ -24,8 +24,9 @@ user <emphasis>root</emphasis> by running the following command:</para> <screen><userinput>chown -R 0:0 /tools</userinput></screen> -<para>The command uses "0:0" instead of "root:root", because chown is unable -to resolve the name "root" until the password file has been created.</para> +<para>The command uses "0:0" instead of "root:root", because +<userinput>chown</userinput> is unable to resolve the name "root" until the +password file has been created.</para> </sect1> diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index 25fc85295..b7f0d5a72 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -21,20 +21,14 @@ to enter the chroot environment:</para> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login</userinput></screen> -<screen><userinput>set +h</userinput></screen> - <para>The <userinput>-i</userinput> option given to the <userinput>env</userinput> 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 properly. If you need other variables present, -such as CFLAGS or CXXFLAGS, this is a good place to set them again.</para> - -<para>Also note the use of the set +h directive. This tells bash to not use -its internal path hashing. Without this directive, bash will remember paths -to binaries. Since as we go thru chapter 6, we want to use our newly compiled -binaries as soon as they are installed, we turn off this function.</para> +like <userinput>vim</userinput> and <userinput>less</userinput> to operate +properly. If you need other variables present, such as CFLAGS or CXXFLAGS, +this is a good place to set them again.</para> <para>From this point on there's no need to use the LFS variable anymore, because everything you do will be restricted to the LFS file system -- since diff --git a/chapter06/config-shadowpwd.xml b/chapter06/config-shadowpwd.xml index d3373cde3..769292fbc 100644 --- a/chapter06/config-shadowpwd.xml +++ b/chapter06/config-shadowpwd.xml @@ -1,12 +1,13 @@ <sect2><title> </title><para> </para></sect2> -<sect2><title>Configuring Shadow Password Suite</title> +<sect2><title>Configuring Shadow</title> <para>This package contains utilities to modify users' passwords, add or delete users and groups, and the like. We're not going to explain what -'password shadowing' means. A full explanation can be found in the doc/HOWTO -file within the unpacked shadow password suite's source tree. There's one -thing to keep in mind if you decide to use shadow support: programs that +'password shadowing' means. A full explanation can be found in the +<filename>doc/HOWTO</filename> +file within the unpacked Shadow source tree. There's one +thing to keep in mind if you decide to use Shadow support: programs that need to verify passwords (for example xdm, ftp daemons, pop3 daemons) need to be 'shadow-compliant', that is they need to be able to work with shadowed passwords.</para> diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index d08e3671b..8e6069ca6 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -7,7 +7,7 @@ order to satisfy these programs, we create a number of symbolic links which will be replaced by real files throughout the course of this chapter when we're installing all the software.</para> -<screen><userinput>ln -s /tools/bin/{bash,pwd,cat,stty} /bin +<screen><userinput>ln -s /tools/bin/{bash,cat,pwd,stty} /bin ln -s /tools/bin/perl /usr/bin ln -s /tools/lib/libgcc_s.so.1 /usr/lib ln -s bash /bin/sh</userinput></screen> diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml index 1b375fd7b..810526d25 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter06/creatingdirs.xml @@ -23,7 +23,8 @@ mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen> <para>Directories are, by default, created with permission mode 755, but this isn't desirable for all directories. We will make two changes: one to the home -directory of root, and another to the directories for temporary files.</para> +directory of <emphasis>root</emphasis>, and another to the directories for +temporary files.</para> <screen><userinput>chmod 0750 /root chmod 1777 /tmp /var/tmp</userinput></screen> diff --git a/chapter06/gcc-2953-inst.xml b/chapter06/gcc-2953-inst.xml index 58a3d5459..a45c341fd 100644 --- a/chapter06/gcc-2953-inst.xml +++ b/chapter06/gcc-2953-inst.xml @@ -30,7 +30,7 @@ the system GCC already installed in <filename class="directory">/usr</filename> <screen><userinput>patch -Np1 -i ../&gcc-2953-patch; patch -Np1 -i ../&gcc-2953-no-fixinc-patch; patch -Np1 -i ../&gcc-2953-returntype-fix-patch; -echo timestamp > gcc/cstamp-h.in</userinput></screen> +echo timestamp > gcc/cstamp-h.in</userinput></screen> <para>The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:</para> diff --git a/chapter06/makedev-inst.xml b/chapter06/makedev-inst.xml index 1beaec722..15308031b 100644 --- a/chapter06/makedev-inst.xml +++ b/chapter06/makedev-inst.xml @@ -3,11 +3,11 @@ <sect2> <title>Creating devices</title> -<para>Please note that unpacking the MAKEDEV-&makedev-version;.bz2 file -doesn't create a directory for you to <userinput>cd</userinput> into, as -the file only contains a single shell script.</para> +<para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename> +file doesn't create a directory for you to <userinput>cd</userinput> into, as +the file contains only a shell script.</para> -<para>Install the MAKEDEV script:</para> +<para>Install the <userinput>MAKEDEV</userinput> script:</para> <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV chmod 754 /dev/MAKEDEV</userinput></screen> @@ -17,22 +17,23 @@ chmod 754 /dev/MAKEDEV</userinput></screen> <screen><userinput>cd /dev ./MAKEDEV -v generic-nopty</userinput></screen> -<para>The meaning of the option:</para> +<para>The meaning of the arguments:</para> <itemizedlist> -<listitem><para><userinput>-v generic-nopty</userinput>: The -<userinput>-v</userinput> parameter tells the MAKEDEV script to run in verbose -mode. The <userinput>generic-nopty</userinput> parameter instructs 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 <emphasis>devpts</emphasis> file -system.</para></listitem> +<listitem><para><userinput>-v</userinput>: This tells the script to run in +verbose mode.</para></listitem> + +<listitem><para><userinput>generic-nopty</userinput>: This instructs +<userinput>MAKEDEV</userinput> 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 +<emphasis>devpts</emphasis> file system.</para></listitem> </itemizedlist> -<para>If a device you need is missing, try running -<userinput>./MAKEDEV -v <device></userinput>. Alternatively, you may -create devices via the <emphasis>mknod</emphasis> program. Please refer to -the man and info pages of <emphasis>mknod</emphasis> if you need more +<para>If it turns out that some special device <filename>zzz</filename> that +you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>. +Alternatively, you may create devices via the <userinput>mknod</userinput> +program. Please refer to its man and info pages if you need more information.</para> <para>Additionally, if you were unable to mount the devpts filesystem earlier in diff --git a/chapter06/mountproc.xml b/chapter06/mountproc.xml index 5851c9cf7..bef20df46 100644 --- a/chapter06/mountproc.xml +++ b/chapter06/mountproc.xml @@ -5,7 +5,7 @@ <para>In order for certain programs to function properly, the <emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be available within the chroot environment. A file system can be mounted as many -times and in as many places as you like, thus it's not a problem that the these +times and in as many places as you like, thus it's not a problem that these file systems are already mounted on your host system -- especially so because they are virtual file systems.</para> @@ -44,7 +44,7 @@ now the most common way for pseudo terminals (PTYs) to be implemented.</para> <para>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 -<userinput>cat /proc/filesystems</userinput>. If for some reason, devpts is +<userinput>cat /proc/filesystems</userinput>. If for some reason devpts is listed there but the mount still doesn't work, check instead for a different file system variety called <emphasis>devfs</emphasis>. If devfs is listed then we'll be able to work around the problem by mounting the host's devfs file diff --git a/chapter06/perl-inst.xml b/chapter06/perl-inst.xml index e7a594f13..9b5466010 100644 --- a/chapter06/perl-inst.xml +++ b/chapter06/perl-inst.xml @@ -22,7 +22,7 @@ checks to ensure it built correctly. Should you choose to run it, you first have to create a basic <filename>/etc/hosts</filename> file, needed by a couple of tests to resolve the name <emphasis>localhost</emphasis>:</para> -<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> +<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> <para>Now run the tests, if you wish:</para> diff --git a/chapter06/pwdgroup.xml b/chapter06/pwdgroup.xml index 24767482a..02243673f 100644 --- a/chapter06/pwdgroup.xml +++ b/chapter06/pwdgroup.xml @@ -49,6 +49,11 @@ the <quote>I have no name!</quote> prompt.</para> <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> +<para>Note the use of the <userinput>+h</userinput> directive. This tells +<userinput>bash</userinput> not to use its internal path hashing. Without this +directive, <userinput>bash</userinput> would remember the paths to binaries it +has executed. Since as we go through this chapter, we want to use our newly +compiled binaries as soon as they are installed, we turn off this function.</para> </sect1> diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index c6ef2893b..ecdfded3e 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -1,18 +1,15 @@ <sect2><title> </title><para> </para></sect2> <sect2> -<title>Installation of Shadow Password Suite</title> +<title>Installation of Shadow</title> <para>The <userinput>login</userinput>, <userinput>getty</userinput> and <userinput>init</userinput> programs (and some others) maintain a number of logfiles to record who are and who were logged in to the system. These programs, however, don't create these logfiles when they don't exist, so if you want this logging to occur you will have to create the files yourself. -To let the Shadow package (that is installed next) detect these files in their -proper place, create them now, with their proper permissions:</para> - -<para>Create these files with their proper permissions by running the -following commands:</para> +The Shadow package needs to detect these files in their proper place, so we +create them now, with their proper permissions:</para> <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen> @@ -35,9 +32,9 @@ the package incorrectly assumes it is going to be located at <screen><userinput>touch /usr/bin/passwd</userinput></screen> -<para>The current shadow suite has a problem in the newgrp command which causes -it to fail. The following patch (also appearing in Shadow's CVS code) fixes -this problem.</para> +<para>The current Shadow suite has a problem that causes in the +<userinput>newgrp</userinput> command to fail. The following patch (also +appearing in Shadow's CVS code) fixes this problem:</para> <screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen> diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml index c52daee44..83ddc1ab3 100644 --- a/chapter08/fstab.xml +++ b/chapter08/fstab.xml @@ -32,12 +32,13 @@ end of the line should be replaced with <emphasis>0 0</emphasis>, as such a partition does not need to be dumped or checked</para> <para>The <filename>/dev/shm</filename> mount point for tmpfs is included to -enable POSIX shared memory. Your kernel must have the required support built -into it for this to work. More about this in the next section. Please note that -currently, very little software actually uses POSIX shared memory. Therefore you -can consider the <filename>/dev/shm</filename> mount optional. For more -information, see <filename>Documentation/filesystems/tmpfs.txt</filename> in the -kernel source tree.</para> +allow enabling POSIX shared memory. Your kernel must have the required support +built into it for this to work -- more about this in the next section. Please +note that currently very little software actually uses POSIX shared memory. +Therefore you can consider the <filename>/dev/shm</filename> mount point +optional. For more information, see +<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel source +tree.</para> <para>There are other lines which you may consider adding to your <filename>fstab</filename> file. One example is a line to use if you intend to diff --git a/chapter08/grub.xml b/chapter08/grub.xml index 0c59f4eef..6ed20b328 100644 --- a/chapter08/grub.xml +++ b/chapter08/grub.xml @@ -25,7 +25,7 @@ Insert a blank floppy diskette and run the following commands:</para> dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen> <para>Remove the diskette and store it somewhere safe. Now we'll run the -<userinput>grub</userinput> shell.</para> +<userinput>grub</userinput> shell:</para> <screen><userinput>grub</userinput></screen> @@ -54,8 +54,8 @@ files -- you can use Tab everywhere to make Grub show the alternatives:</para> Don't run the command if this is not what you want. For example, you may be using a third party boot manager to manage your MBR (Master Boot Record). In this scenario, it would probably make more sense to install Grub into the -"boot sector" of the LFS partition, in which case the command would become -<userinput>setup (hd0,3)</userinput>:</para></warning> +"boot sector" of the LFS partition, in which case the command would become: +<userinput>setup (hd0,3)</userinput>.</para></warning> <!-- HACK - Force some whitespace to appease tidy --> <literallayout></literallayout> @@ -70,8 +70,8 @@ this scenario, it would probably make more sense to install Grub into the <screen><userinput>quit</userinput></screen> -<para>Now we need to create the <filename>menu.lst</filename> file, which -defines Grub's boot menu:</para> +<para>Now we need to create a "menu list" file, defining Grub's boot +menu:</para> <screen><userinput>cat > /boot/grub/menu.lst << "EOF"</userinput> # Begin /boot/grub/menu.lst diff --git a/chapter09/theend.xml b/chapter09/theend.xml index 272686f5e..2d49add8b 100644 --- a/chapter09/theend.xml +++ b/chapter09/theend.xml @@ -50,13 +50,13 @@ chroot $LFS /tools/bin/env -i \ recognized. Most of these are scripts instead of binaries. These warnings can be safely ignored.</para> -<para>It's a good idea to create an /etc/lfs file. By +<para>It's a good idea to create an <filename>/etc/lfs</filename> file. By having this file it is very easy for you (and for us if you are going to ask for help with something at some point) to find out which LFS version -you have installed on your system. Create the /etc/lfs file by -running the following command:</para> +you have installed on your system. Create the <filename>/etc/lfs</filename> +file by running the following command:</para> -<screen><userinput>echo &version; > /etc/lfs</userinput></screen> +<screen><userinput>echo &version; > /etc/lfs</userinput></screen> </sect1> |