Changeset 387a32af
- Timestamp:
- 06/11/2020 03:13:43 AM (4 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- aefc822
- Parents:
- bc8cca5
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/changingowner.xml
rbc8cca5 r387a32af 29 29 these files to possible malicious manipulation.</para> 30 30 31 <para>To avoid this issue, you could add the <systemitem 32 class="username">lfs</systemitem> user to the new LFS system later when 33 creating the <filename>/etc/passwd</filename> file, taking care to assign it 34 the same user and group IDs as on the host system. Better yet, change the 31 <para>To address this issue, change the 35 32 ownership of the <filename class="directory">$LFS/*</filename> directories to 36 33 user <systemitem class="username">root</systemitem> by running the following -
chapter07/chroot.xml
rbc8cca5 r387a32af 11 11 <title>Entering the Chroot Environment</title> 12 12 13 <para>Now that all the packages which depend on themselves for being built14 are on the system, it is time to enter the chroot environment to finish15 installing the remaining temporary tools. This environment will be in use16 also for installing the final system. As user <systemitem13 <para>Now that all the packages which are required to build the rest of the 14 needed tools are on the system, it is time to enter the chroot environment to 15 finish installing the remaining temporary tools. This environment will be in 16 use also for installing the final system. As user <systemitem 17 17 class="username">root</systemitem>, run the following command to enter the 18 realm that is, at the moment, populated with only the temporary tools:</para> 18 environment that is, at the moment, populated with only the temporary 19 tools:</para> 19 20 20 <screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \21 <screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \ 21 22 HOME=/root \ 22 23 TERM="$TERM" \ … … 32 33 variable inside chroot to the same value as outside chroot. This variable is 33 34 needed for programs like <command>vim</command> and <command>less</command> 34 to operate properly. If other variables are needed, such as35 to operate properly. If other variables are desired, such as 35 36 <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set 36 37 them again.</para> 37 38 38 39 <para>From this point on, there is no need to use the 39 <envar>LFS</envar> variable anymore ,because all work will be restricted40 <envar>LFS</envar> variable anymore because all work will be restricted 40 41 to the LFS file system. This is because the Bash shell is told that 41 42 <filename class="directory">$LFS</filename> is now the root … … 43 44 44 45 <para>Notice that <filename class="directory">/tools/bin</filename> is not 45 anymorein the <envar>PATH</envar>. This means that a temporary tool will no longer be46 in the <envar>PATH</envar>. This means that a temporary tool will no longer be 46 47 used once its final version is installed. This occurs when the shell does not 47 48 <quote>remember</quote> the locations of executed binaries—for this -
chapter07/createfiles.xml
rbc8cca5 r387a32af 77 77 78 78 <para>The actual password for <systemitem class="username">root</systemitem> 79 (the <quote>x</quote> used here is just a placeholder)will be set later.</para>79 will be set later.</para> 80 80 81 81 <para>Create the <filename>/etc/group</filename> file by running the following … … 146 146 147 147 <para>The created groups are not part of any standard—they are groups 148 decided on in part by the requirements of the Udev configuration in the next149 chapter, and in part by common convention employed by a number of existing150 Linux distributions. In addition, some test suites rely on specific users151 orgroups. The Linux Standard Base (LSB, available at <ulink152 url="http:// www.linuxbase.org"/>) recommends only that, besides the group153 <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0,154 a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be155 present. All other group names and GIDs can be chosen freely by the system156 administrator since well-written programs do not depend on GID numbers, but157 rather use the group's name.</para>148 decided on in part by the requirements of the Udev configuration in Chapter 149 9, and in part by common convention employed by a number of existing Linux 150 distributions. In addition, some test suites rely on specific users or 151 groups. The Linux Standard Base (LSB, available at <ulink 152 url="http://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that, 153 besides the group <systemitem class="groupname">root</systemitem> with a 154 Group ID (GID) of 0, a group <systemitem class="groupname">bin</systemitem> 155 with a GID of 1 be present. All other group names and GIDs can be chosen 156 freely by the system administrator since well-written programs do not depend 157 on GID numbers, but rather use the group's name.</para> 158 158 159 159 <para>Some tests in <xref linkend="chapter-building-system"/> need a regular … … 178 178 executed. To ensure the use of the newly compiled binaries as soon as they are 179 179 installed, the <parameter>+h</parameter> directive will be used for the duration 180 of this chapter.</para>180 of this and the next chapter.</para> 181 181 182 182 <para>The <command>login</command>, <command>agetty</command>, and -
chapter07/creatingdirs.xml
rbc8cca5 r387a32af 16 16 <screen><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} 17 17 mkdir -pv /{media/{floppy,cdrom},srv,var} 18 install -dv -m 0750 /root19 install -dv -m 1777 /tmp /var/tmp20 18 mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} 21 19 mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} 22 mkdir -pv 20 mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} 23 21 mkdir -pv /usr/{,local/}share/man/man{1..8} 22 install -dv -m 1777 /tmp /var/tmp 23 install -dv -m 0750 /root 24 24 25 25 mkdir -v /var/{log,mail,spool} -
chapter07/introduction.xml
rbc8cca5 r387a32af 11 11 <title>Introduction</title> 12 12 13 <para>This chapter shows how to build the last missing bits of the 14 temporary system: first, the tools needed by the build machinery of15 various packages, then three packages needed to run tests.16 Now that all circular dependencies have been resolved,17 we can use a <quote>chroot</quote> environment, completely isolated18 f rom the computer used for the build, except for the running kernel.</para>13 <para>This chapter shows how to build the last missing bits of the temporary 14 system: first, the tools needed by the build machinery of various packages, 15 then three packages needed to run tests. Now that all circular dependencies 16 have been resolved, we can use a <quote>chroot</quote> environment, 17 completely isolated the host operating system used for the build, except 18 for the running kernel.</para> 19 19 20 20 <para>For proper operation of the isolated environment, some communication … … 22 22 so-called <emphasis>Virtual Kernel File Systems</emphasis>, which must be 23 23 mounted when entering the chroot environment. You may want to check 24 that they are mounted by issuing <command>ls $LFS/dev</command>, 25 <command>ls $LFS/proc</command>, or <command>ls $LFS/sys</command>. 26 Note that mounting the virtual kernel file systems must be done 27 <emphasis>each time you want to enter the chroot 28 environment</emphasis>.</para> 24 that they are mounted by issuing <command>findmnt</command>.</para> 29 25 30 26 <para>Until <xref linkend="ch-tools-chroot"/>, the commands must be … … 32 28 <envar>LFS</envar> variable set. After entering chroot, all commands 33 29 are run as root, fortunately without access to the OS of the computer 34 you buil dLFS on. Be careful anyway, as it is easy to destroy the whole30 you built LFS on. Be careful anyway, as it is easy to destroy the whole 35 31 LFS system with badly formed commands.</para> 36 32 -
chapter07/kernfs.xml
rbc8cca5 r387a32af 31 31 device nodes, in particular the <filename 32 32 class="devicefile">console</filename> and <filename 33 class="devicefile">null</filename> devices. The device nodes must be created 34 on the hard disk so that they are available before <command>udevd</command> 35 has been started, and additionally when Linux is started with 33 class="devicefile">null</filename> devices. The device nodes must be 34 created on the hard disk so that they are available before the kernel 35 populates <systemitem class="filesystem">/dev</systemitem>), and 36 additionally when Linux is started with 36 37 <parameter>init=/bin/bash</parameter>. Create the devices by running the 37 38 following commands:</para> … … 73 74 mount -vt sysfs sysfs $LFS/sys 74 75 mount -vt tmpfs tmpfs $LFS/run</userinput></screen> 75 76 <!-- 76 77 <variablelist> 77 78 <title>The meaning of the mount options for devpts:</title> … … 101 102 102 103 </variablelist> 103 104 --> 104 105 <para>In some host systems, <filename>/dev/shm</filename> is a 105 106 symbolic link to <filename class="directory">/run/shm</filename>. -
chapter08/grep.xml
rbc8cca5 r387a32af 24 24 <title/> 25 25 26 <para>The Grep package contains programs for searching through t ehcontents of files.</para>26 <para>The Grep package contains programs for searching through the contents of files.</para> 27 27 28 28 <segmentedlist> -
chapter08/make.xml
rbc8cca5 r387a32af 25 25 26 26 <para>The Make package contains a program for controlling the generation of 27 executables and other non-source files of a program from the program's 28 source files. .</para> 27 executables and other non-source files of a package from source files.</para> 29 28 30 29 <segmentedlist>
Note:
See TracChangeset
for help on using the changeset viewer.