Changeset 16a1647


Ignore:
Timestamp:
11/16/2022 11:30:12 PM (17 months ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
8d5322e
Parents:
a03b7d95 (diff), ebecd08 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Automatic merge of trunk into multilib

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter07/chroot.xml

    ra03b7d95 r16a1647  
    1212
    1313  <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
     14  needed tools are on the system, it is time to enter the chroot environment and
     15  finish installing the temporary tools. This environment will also be
     16  used to install the final system. As user <systemitem
    1717  class="username">root</systemitem>, run the following command to enter the
    18   environment that is, at the moment, populated with only the temporary
     18  environment that is, at the moment, populated with nothing but temporary
    1919  tools:</para>
    2020
     
    2727
    2828  <para>The <parameter>-i</parameter> option given to the <command>env</command>
    29   command will clear all variables of the chroot environment. After that, only
     29  command will clear all the variables in the chroot environment. After that, only
    3030  the <envar>HOME</envar>, <envar>TERM</envar>, <envar>PS1</envar>, and
    3131  <envar>PATH</envar> variables are set again. The
    32   <parameter>TERM=$TERM</parameter> construct will set the <envar>TERM</envar>
     32  <parameter>TERM=$TERM</parameter> construct sets the <envar>TERM</envar>
    3333  variable inside chroot to the same value as outside chroot. This variable is
    34   needed for programs like <command>vim</command> and <command>less</command>
    35   to operate properly.  If other variables are desired, such as
     34  needed so programs like <command>vim</command> and <command>less</command>
     35  can operate properly.  If other variables are desired, such as
    3636  <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set
    37   them again.</para>
     37  them.</para>
    3838
    3939  <para>From this point on, there is no need to use the
    40   <envar>LFS</envar> variable anymore because all work will be restricted
    41   to the LFS file system.  This is because the Bash shell is told that
     40  <envar>LFS</envar> variable any more because all work will be restricted
     41  to the LFS file system; the <command>chroot</command> command tells the Bash shell that
    4242  <filename class="directory">$LFS</filename> is now the root
    4343  (<filename class="directory">/</filename>) directory.</para>
     
    4545  <para>Notice that <filename class="directory">/tools/bin</filename> is not
    4646  in the <envar>PATH</envar>. This means that the cross toolchain will no longer be
    47   used in the chroot environment.</para>
     47  used.</para>
    4848
    4949  <para>Note that the <command>bash</command> prompt will say
  • chapter07/cleanup.xml

    ra03b7d95 r16a1647  
    1414    <title>Cleaning</title>
    1515
    16     <para>First, remove the currently installed documentation to prevent them
     16    <para>First, remove the currently installed documentation files to prevent them
    1717    from ending up in the final system, and to save about 35 MB:</para>
    1818
     
    2020
    2121    <para>Second, on a modern Linux system, the libtool .la files are only
    22     useful for libltdl.  No libraries in LFS are expected to be loaded by
    23     libltdl, and it's known that some .la files can cause BLFS packages
    24     fail to build.  Remove those files now:</para>
     22    useful for libltdl.  No libraries in LFS are loaded by
     23    libltdl, and it's known that some .la files can cause BLFS package
     24    failures.  Remove those files now:</para>
    2525
    2626<screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput><userinput arch="ml_32">
     
    4646      backed up for later reuse. In case of fatal failures in the subsequent
    4747      chapters, it often turns out that removing everything and starting over
    48       (more carefully) is the best option to recover. Unfortunately, all the
     48      (more carefully) is the best way to recover. Unfortunately, all the
    4949      temporary files will be removed, too. To avoid spending extra time to
    50       redo something which has been built successfully, creating a backup of
     50      redo something which has been done successfully, creating a backup of
    5151      the current LFS system may prove useful.
    5252    </para>
     
    6262    <para>
    6363      The following steps are performed from outside the chroot
    64       environment. That means, you have to leave the chroot environment
     64      environment. That means you have to leave the chroot environment
    6565      first before continuing. The reason for that is to
    6666      get access to file system locations outside of the chroot
    67       environment to store/read the backup archive which should
     67      environment to store/read the backup archive, which ought
    6868      not be placed within the
    69       <filename class="directory">$LFS</filename> hierarchy for
    70       safety reasons.
     69      <filename class="directory">$LFS</filename> hierarchy.
    7170    </para>
    7271
     
    8281        <systemitem class="username">root</systemitem> on your host system.
    8382        Take extra care about the commands you're going to run as mistakes
    84         here can modify your host system. Be aware that the
     83        made here can modify your host system. Be aware that the
    8584        environment variable <envar>LFS</envar>
    8685        is set for user <systemitem class="username">lfs</systemitem> by default
     
    105104    <para>
    106105      Make sure you have at least 1 GB free disk space (the source tarballs
    107       will be included in the backup archive) on the filesystem containing
    108       directory where you create the backup archive.
     106      will be included in the backup archive) on the file system containing
     107      the directory where you create the backup archive.
    109108    </para>
    110109
     
    112111      Note that the instructions below specify the home directory of the host
    113112      system's <systemitem class="username">root</systemitem> user, which is
    114       typically found on the root filesystem.
    115     </para>
    116 
    117     <para>
     113      typically found on the root file system.
    118114      Replace <envar>$HOME</envar> by a directory of your choice if you
    119115      do not want to have the backup stored in <systemitem
     
    153149      <filename class="directory">$LFS</filename>, they are included in the
    154150      backup archive as well, so they do not need to be downloaded again. After
    155       checking that <envar>$LFS</envar> is set properly,
     151      checking that <envar>$LFS</envar> is set properly, you can
    156152      restore the backup by executing the following commands:
    157153    </para>
     
    171167
    172168    <para>
    173        Again, double check that the environment has been setup properly
     169       Again, double check that the environment has been set up properly
    174170       and continue building the rest of the system.
    175171    </para>
     
    179175         If you left the chroot environment to create a backup or restart
    180176         building using a restore, remember to check that the virtual
    181          filesystems are still mounted (<command>findmnt | grep
     177         file systems are still mounted (<command>findmnt | grep
    182178         $LFS</command>).  If they are not mounted, remount them now as
    183179         described in <xref linkend='ch-tools-kernfs'/> and re-enter the chroot
  • chapter07/createfiles.xml

    ra03b7d95 r16a1647  
    3535  </indexterm>
    3636
    37   <para>Historically, Linux maintains a list of the mounted file systems in the
     37  <para>Historically, Linux maintained a list of the mounted file systems in the
    3838  file <filename>/etc/mtab</filename>. Modern kernels maintain this list
    3939  internally and expose it to the user via the <filename
    4040  class="directory">/proc</filename> filesystem. To satisfy utilities that
    41   expect the presence of <filename>/etc/mtab</filename>, create the following
     41  expect to find <filename>/etc/mtab</filename>, create the following
    4242  symbolic link:</para>
    4343
     
    160160  <para>The created groups are not part of any standard&mdash;they are groups
    161161  decided on in part by the requirements of the Udev configuration in Chapter
    162   9, and in part by common convention employed by a number of existing Linux
     162  9, and in part by common conventions employed by a number of existing Linux
    163163  distributions. In addition, some test suites rely on specific users or
    164164  groups.  The Linux Standard Base (LSB, available at <ulink
     
    166166  besides the group <systemitem class="groupname">root</systemitem> with a
    167167  Group ID (GID) of 0, a group <systemitem class="groupname">bin</systemitem>
    168   with a GID of 1 be present. The GID of 5 is widely used for
     168  with a GID of 1 be present. The GID of 5 is widely used for the
    169169  <systemitem class="groupname">tty</systemitem> group, and the number 5 is
    170170  also used in <phrase revision="systemd">systemd</phrase>
     
    180180  machine or in the separate namespace).  We assign
    181181  <systemitem class="username">nobody</systemitem> and
    182   <systemitem class="groupname">nogroup</systemitem> for it to avoid an
     182  <systemitem class="groupname">nogroup</systemitem> to avoid an
    183183  unnamed ID.  But other distros may treat this ID differently, so any
    184184  portable program should not depend on this assignment.</para>
  • chapter07/kernfs.xml

    ra03b7d95 r16a1647  
    1616
    1717    <para>Applications running in user space utilize various file
    18     systems exported by the kernel to communicate
     18    systems created by the kernel to communicate
    1919    with the kernel itself. These file systems are virtual: no disk
    20     space is used for them. The content of the file systems resides in
     20    space is used for them. The content of these file systems resides in
    2121    memory. These file systems must be mounted in the $LFS directory tree
    2222    so the applications can find them in the chroot environment.</para>
    2323
    24     <para>Begin by creating directories on which the file systems will be
     24    <para>Begin by creating the directories on which these virtual file systems will be
    2525    mounted:</para>
    2626
     
    3030    <title>Mounting and Populating /dev</title>
    3131
    32       <para>During a normal boot of the LFS system, the kernel automatically
     32      <para>During a normal boot of an LFS system, the kernel automatically
    3333      mounts the <systemitem class="filesystem">devtmpfs</systemitem>
    34       filesystem on the
     34      file system on the
    3535      <filename class="directory">/dev</filename> directory; the kernel
    36       creates device nodes on that virtual filesystem during the boot process
     36      creates device nodes on that virtual file system during the boot process,
    3737      or when a device is first detected or accessed. The udev daemon may
    38       change the owner or permission of the device nodes created by the
    39       kernel, or create new device nodes or symlinks to ease the work of
    40       distro maintainers or system administrators.  (See
     38      change the ownership or permissions of the device nodes created by the
     39      kernel, and create new device nodes or symlinks, to ease the work of
     40      distro maintainers and system administrators.  (See
    4141      <xref linkend='ch-config-udev-device-node-creation'/> for details.)
    4242      If the host kernel supports &devtmpfs;, we can simply mount a
    4343      &devtmpfs; at <filename class='directory'>$LFS/dev</filename> and rely
    44       on the kernel to populate it (the LFS building process does not need
    45       the additional work onto &devtmpfs; by udev daemon).</para>
     44      on the kernel to populate it (i.e., the udev daemon will do the
     45      necessary work automatically).</para>
    4646
    47       <para>But, some host kernels may lack &devtmpfs; support and these
    48       host distros maintain the content of
    49       <filename class="directory">/dev</filename> with different methods.
    50       So the only host-agnostic way for populating
    51       <filename class="directory">$LFS/dev</filename> is
    52       bind mounting the host system's
     47      <para>But some host kernels lack &devtmpfs; support; these
     48      host distros use different methods to create the content of
     49      <filename class="directory">/dev</filename>.
     50      So the only host-agnostic way to populate the
     51      <filename class="directory">$LFS/dev</filename> directory is
     52      by bind mounting the host system's
    5353      <filename class="directory">/dev</filename> directory. A bind mount is
    54       a special type of mount that allows you to create a mirror of a
     54      a special type of mount that generates a duplicate copy of a
    5555      directory or mount point at some other location. Use the following
    56       command to do this:</para>
     56      command to do this.</para>
    5757
    5858<screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen>
     
    6363    <title>Mounting Virtual Kernel File Systems</title>
    6464
    65       <para>Now mount the remaining virtual kernel filesystems:</para>
     65      <para>Now mount the remaining virtual kernel file systems:</para>
    6666
    6767<screen><userinput>mount -v --bind /dev/pts $LFS/dev/pts
  • chapter08/shadow.xml

    ra03b7d95 r16a1647  
    245245    <segmentedlist>
    246246      <segtitle>Installed programs</segtitle>
    247       <segtitle>Installed directory</segtitle>
     247      <segtitle>Installed directories</segtitle>
    248248      <segtitle>Installed libraries</segtitle>
    249249
     
    255255        sg (link to newgrp), su, useradd, userdel, usermod,
    256256        vigr (link to vipw), and vipw</seg>
    257         <seg>/etc/default</seg>
     257      <seg>/etc/default and /usr/include/shadow</seg>
    258258        <seg>libsubid.so</seg>
    259259      </seglistitem>
Note: See TracChangeset for help on using the changeset viewer.