Changeset 6dfcfecc for chapter02


Ignore:
Timestamp:
03/31/2021 10:41:39 AM (3 years ago)
Author:
Xℹ Ruoyao <xry111@…>
Branches:
ml-11.0, multilib
Children:
7610848
Parents:
811b5a39
git-author:
Thomas Trepl <thomas@…> (06/29/2020 07:55:01 AM)
git-committer:
Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:39 AM)
Message:

Update to new lfs structure

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11986 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter02
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chapter02/creatingfilesystem.xml

    r811b5a39 r6dfcfecc  
    5353<screen role="nodump"><userinput>mkfs -v -t ext4 /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
    5454
    55 <!--
    5655  <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the LFS
    57   partition (<filename class="devicefile">sda5</filename> in our previous
    58   example).</para>
     56  partition.</para>
    5957
    60   <note>
    61     <para>Some host distributions use custom features in their filesystem
    62     creation tools (E2fsprogs). This can cause problems when booting into your new
    63     LFS in Chapter&nbsp;9, as those features will not be supported by the LFS-installed
    64     E2fsprogs; you will get an error similar to <quote>unsupported filesystem
    65     features, upgrade your e2fsprogs</quote>. To check if your host system
    66     uses custom enhancements, run the following command:</para>
    67 
    68 <screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
    69 
    70     <para>If the output contains features other than
    71     <option>has_journal</option>, <option>ext_attr</option>,
    72     <option>resize_inode</option>, <option>dir_index</option>,
    73     <option>filetype</option>, <option>sparse_super</option>,
    74     <option>large_file</option> or <option>needs_recovery</option>, then your
    75     host system may have custom enhancements.  In that case, to avoid later
    76     problems, you should compile the stock E2fsprogs package and use the
    77     resulting binaries to re-create the filesystem on your LFS partition:</para>
    78 
    79 <screen role="nodump"><userinput>cd /tmp
    80 tar -xzvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.gz
    81 cd e2fsprogs-&e2fsprogs-version;
    82 mkdir -v build
    83 cd build
    84 ../configure
    85 make #note that we intentionally don't 'make install' here!
    86 ./misc/mke2fs -jv /dev/<replaceable>&lt;xxx&gt;</replaceable>
    87 cd /tmp
    88 rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>
    89   </note>
    90 -->
    9158  <para>If you are using an existing <systemitem class="filesystem">swap
    9259  </systemitem> partition, there is no need to format it. If a new
  • chapter02/creatingpartition.xml

    r811b5a39 r6dfcfecc  
    1515  is to use an available empty partition or, if you have enough unpartitioned
    1616  space, to create one.</para>
    17 
    18 <!--
    19 
    20   <para>It is possible to install an LFS system (in fact even multiple LFS
    21   systems) on a partition already occupied by another
    22   operating system and the different systems will co-exist peacefully. The
    23   document <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>
    24   contains notes on how to implement this. This document was last updated
    25   in 2004. It has not been updated since and it has not been tested with
    26   recent versions of this LFS book. The document is more than likely not
    27   usable as-is and you will need to account for changes made to the LFS
    28   procedures since it was written. This is only recommended for expert LFS
    29   users.</para>
    30 
    31 -->
    3217
    3318  <para>A minimal system requires a partition of around 10 gigabytes (GB).
     
    7863
    7964  <para>Requests for advice on system partitioning are often posted on the LFS mailing
    80   lists.  This is a highly subjective topic.  The default for most distributions
     65  lists. This is a highly subjective topic.  The default for most distributions
    8166  is to use the entire drive with the exception of one small swap partition.  This
    8267  is not optimal for LFS for several reasons.  It reduces flexibility, makes
     
    9075    <para>A root LFS partition (not to be confused with the
    9176    <filename class="directory">/root</filename> directory) of
    92     ten gigabytes is a good compromise for most systems.  It provides enough
     77    twenty gigabytes is a good compromise for most systems.  It provides enough
    9378    space to build LFS and most of BLFS, but is small enough so that multiple
    9479    partitions can be easily created for experimentation.</para> </sect3>
     
    10388    swapping.</para>
    10489
    105     <para>Swapping is never good.  Generally you can tell if a system is
    106     swapping by just listening to disk activity and observing how the system
    107     reacts to commands.  The first reaction to swapping should be to check for
    108     an unreasonable command such as trying to edit a five gigabyte file.  If
    109     swapping becomes a normal occurrence, the best solution is to purchase more
    110     RAM for your system.</para>
    111     </sect3>
     90    <para>If you want to use the hibernation feature (suspend-to-disk) of Linux,
     91    it writes out the contents of RAM to the swap partition before turning off
     92    the machine. In this case the size of the swap partition should be at
     93    least as large as the system's installed RAM.</para>
     94
     95    <para>Swapping is never good. For mechanical hard drives you can generally
     96    tell if a system is swapping by just listening to disk activity and
     97    observing how the system reacts to commands.  For an SSD drive you will not
     98    be able to hear swapping but you can tell how much swap space is being used
     99    by the <command>top</command> or <command>free</command> programs.  Use of
     100    an SSD drive for a swap partition should be avoided if possible.  The first
     101    reaction to swapping should be to check for an unreasonable command such as
     102    trying to edit a five gigabyte file. If swapping becomes a normal
     103    occurrence, the best solution is to purchase more RAM for your
     104    system.</para> </sect3>
    112105
    113106    <sect3>
     
    141134      store kernels and other booting information.  To minimize potential boot
    142135      problems with larger disks, make this the first physical partition on
    143       your first disk drive.  A partition size of 100 megabytes is quite
     136      your first disk drive.  A partition size of 200 megabytes is quite
    144137      adequate.</para></listitem>
    145138
     
    151144      <listitem><para>/usr &ndash; A separate /usr partition is generally used
    152145      if providing a server for a thin client or diskless workstation.  It is
    153       normally not needed for LFS.  A size of five gigabytes will handle most
     146      normally not needed for LFS.  A size of ten gigabytes will handle most
    154147      installations.</para></listitem>
    155148
  • chapter02/hostreqs.xml

    r811b5a39 r6dfcfecc  
    245245    [*] x32 ABI for 64-bit mode
    246246</screen>
     247
    247248    <para arch="ml_32,ml_x32,ml_all">The option 'IA32 a.out support' is
    248249      optional. In case your kernel does not have 'x32 ABI for 64-bit mode'
     
    252253      'x32 ABI for 64-bit mode' is enabled, you will run in errors
    253254      latest when building <application>glibc</application> in Chapter 6,
    254       so an upgrade of your host system is required.
     255      so an upgrade of your host system kernel is required.
    255256    </para>
    256257   
  • chapter02/stages.xml

    r811b5a39 r6dfcfecc  
    2626    <itemizedlist>
    2727      <listitem>
    28          <para>Procedures done as the root user after Section 2.4 need to
    29          have the LFS environment variable set <emphasis>FOR THE ROOT
    30          USER</emphasis>.</para>
     28        <para>Procedures done as the root user after Section 2.4 need to
     29        have the LFS environment variable set <emphasis>FOR THE ROOT
     30        USER</emphasis>.</para>
    3131      </listitem>
    3232    </itemizedlist>
     
    3434 
    3535  <sect2>
    36   <title>Chapter&nbsp;5</title>
     36  <title>Chapter&nbsp;5&ndash;6</title>
     37
     38    <itemizedlist>
     39      <listitem>
     40        <para>The /mnt/lfs partition must be mounted.</para>
     41      </listitem>
     42
     43      <listitem>
     44        <para>Threse two chapters must be done as user <emphasis>lfs</emphasis>.
     45        A <command>su - lfs</command> needs to be done before any task in these
     46        chapters. Failing to do that, you are at risk of installing packages to the
     47        host, and potentially rendering it unusable.</para>
     48      </listitem>
     49
     50      <listitem>
     51         <para>The procedures in <xref linkend='ch-tools-generalinstructions'/>
     52         are critical.  If there is any
     53         doubt about installing a package, ensure any previously expanded
     54         tarballs are removed, then re-extract the package files, and complete all
     55         instructions in that section.</para>
     56      </listitem>
     57    </itemizedlist>
     58  </sect2>
     59
     60  <sect2>
     61  <title>Chapter&nbsp;7&ndash;10</title>
    3762
    3863    <itemizedlist>
     
    4267
    4368      <listitem>
    44          <para><emphasis>ALL</emphasis> instructions in Chapter&nbsp;5
    45          must be done by user <emphasis>lfs</emphasis>. 
    46          A  <command>su - lfs</command> needs to be done before any
    47          task in Chapter&nbsp;5.</para>
    48       </listitem>
    49 
    50       <listitem>
    51          <para>The procedures in <xref linkend='ch-tools-generalinstructions'/>
    52          are critical.  If there is any
    53          doubt about installing a package, ensure any previously expanded
    54          tarballs are removed, re-extract the package files, and complete all
    55          instructions in that section.</para>
    56       </listitem>
    57     </itemizedlist>
    58   </sect2>
    59 
    60   <sect2>
    61   <title>Chapters&nbsp;6&ndash;8</title>
    62 
    63     <itemizedlist>
    64       <listitem>
    65          <para>The /mnt/lfs partition must be mounted.</para>
     69        <para>A few operations, from <quote>Changing Ownership</quote> to
     70        <quote>Entering the Chroot Environment</quote> must be done as the
     71        root user, with the LFS envirnment variable set for the root user.</para>
    6672      </listitem>
    6773
    6874      <listitem>
    6975         <para> When entering chroot, the LFS environment variable must be set
    70          for root.  The LFS variable is not used otherwise.</para>
     76         for root. The LFS variable is not used afterwards.</para>
    7177      </listitem>
    7278
     
    7581         before or after entering chroot by changing to a host virtual terminal
    7682         and, as root, running the commands in
    77          <xref linkend='ch-system-bindmount'/> and
    78          <xref linkend='ch-system-kernfsmount'/>.</para>
     83         <xref linkend='ch-tools-bindmount'/> and
     84         <xref linkend='ch-tools-kernfsmount'/>.</para>
    7985      </listitem>
    8086    </itemizedlist>
Note: See TracChangeset for help on using the changeset viewer.