Changeset 87bae31 for chapter02


Ignore:
Timestamp:
01/11/2006 08:21:38 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
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, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, 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:
b0ed1af
Parents:
35edd52
Message:

Indented chapter 02.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7271 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter02
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter02/chapter02.xml

    r35edd52 r87bae31  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<chapter id="chapter-partitioning" xreflabel="Chapter 2">
    7 <?dbhtml dir="chapter02"?>
    8 <title>Preparing a New Partition</title>
    9 <?dbhtml filename="chapter02.html"?>
     9  <?dbhtml dir="chapter02"?>
     10  <?dbhtml filename="chapter02.html"?>
    1011
    11 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
    12 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/>
    13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/>
    14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mounting.xml"/>
     12  <title>Preparing a New Partition</title>
     13
     14  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
     15  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/>
     16  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/>
     17  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mounting.xml"/>
    1518
    1619</chapter>
  • chapter02/creatingfilesystem.xml

    r35edd52 r87bae31  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="space-creatingfilesystem">
    7 <title>Creating a File System on the Partition</title>
    8 <?dbhtml filename="creatingfilesystem.html"?>
     9  <?dbhtml filename="creatingfilesystem.html"?>
    910
    10 <para>Now that a blank partition has been set up, the file system can
    11 be created. The most widely-used system in the Linux world is the
    12 second extended file system (ext2), but with newer high-capacity
    13 hard disks, journaling file systems are becoming increasingly
    14 popular.  We will create an ext2 file system.  Build instructions for other file
    15 systems can be found at <ulink
    16 url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
     11  <title>Creating a File System on the Partition</title>
    1712
    18 <para>To create an ext2 file system on the LFS partition, run the following:</para>
     13  <para>Now that a blank partition has been set up, the file system can be created.
     14  The most widely-used system in the Linux world is the second extended file
     15  system (<systemitem class="filesystem">ext2</systemitem>), but with newer
     16  high-capacity hard disks, journaling file systems are becoming increasingly
     17  popular. We will create an <systemitem class="filesystem">ext2</systemitem>
     18  file system. Build instructions for other file systems can be found at
     19  <ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
     20
     21  <para>To create an <systemitem class="filesystem">ext2</systemitem> file
     22  system on the LFS partition, run the following:</para>
    1923
    2024<screen role="nodump"><userinput>mke2fs -v /dev/<replaceable>[xxx]</replaceable></userinput></screen>
    2125
    22 <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS
    23 partition (<filename class="devicefile">hda5</filename> in our previous example).</para>
     26  <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS
     27  partition (<filename class="devicefile">hda5</filename> in our previous
     28  example).</para>
    2429
    25 <note><para>Some host distributions use custom features in their filesystem
    26 creation tools (e2fsprogs).  This can cause problems when booting into your new
    27 LFS in Chapter 9, as those features will not be supported by the LFS-installed
    28 e2fsprogs; you will get an error similar to <quote>unsupported filesystem
    29 features, upgrade your e2fsprogs</quote>.  To check if your host system
    30 uses custom enhancements, run the following command:</para>
     30  <note>
     31    <para>Some host distributions use custom features in their filesystem
     32    creation tools (E2fsprogs). This can cause problems when booting into your new
     33    LFS in Chapter 9, as those features will not be supported by the LFS-installed
     34    E2fsprogs; you will get an error similar to <quote>unsupported filesystem
     35    features, upgrade your e2fsprogs</quote>. To check if your host system
     36    uses custom enhancements, run the following command:</para>
    3137
    3238<screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
    3339
    34 <para>If the output contains features other than: dir_index; filetype;
    35 large_file; resize_inode or sparse_super then your host system may have custom
    36 enhancements.  In that case, to avoid later problems, you should compile the
    37 stock e2fsprogs package and use the resulting binaries to re-create the
    38 filesystem on your LFS partition:</para>
     40    <para>If the output contains features other than: <option>dir_index</option>;
     41    <option>filetype</option>; <option>large_file</option>;
     42    <option>resize_inode</option> or <option>sparse_super</option> then your host
     43    system may have custom enhancements.  In that case, to avoid later problems,
     44    you should compile the stock E2fsprogs package and use the resulting binaries
     45    to re-create the filesystem on your LFS partition:</para>
    3946
    4047<screen role="nodump"><userinput>cd /tmp
     
    4855cd /tmp
    4956rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>
    50 </note>
     57  </note>
    5158
    52 <para>If a swap partition was created, it will need to be initialized for use by
    53 issuing the command below. If you are using an existing swap partition, there is
    54 no need to format it.</para>
     59  <para>If a <systemitem class="filesystem">swap</systemitem> partition was
     60  created, it will need to be initialized for use by issuing the command below.
     61  If you are using an existing <systemitem class="filesystem">swap</systemitem>
     62  partition, there is no need to format it.</para>
    5563
    5664<screen role="nodump"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
    5765
    58 <para>Replace <replaceable>[yyy]</replaceable> with the name of the swap
    59 partition.</para>
     66  <para>Replace <replaceable>[yyy]</replaceable> with the name of the
     67  <systemitem class="filesystem">swap</systemitem> partition.</para>
    6068
    6169</sect1>
    62 
  • chapter02/creatingpartition.xml

    r35edd52 r87bae31  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="space-creatingpartition">
    7 <title>Creating a New Partition</title>
    8 <?dbhtml filename="creatingpartition.html"?>
     9  <?dbhtml filename="creatingpartition.html"?>
    910
    10 <para>Like most other operating systems, LFS is usually installed on
    11 a dedicated partition.  The recommended approach to building an LFS
    12 system is to use an available empty partition or, if you have enough
    13 unpartitioned space, to create one. However, an LFS system (in
    14 fact even multiple LFS systems) may also be installed on a partition
    15 already occupied by another operating system and the different systems
    16 will co-exist peacefully.  The document
    17 <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/> explains
    18 how to implement this, whereas this book discusses the method of
    19 using a fresh partition for the installation.</para>
     11  <title>Creating a New Partition</title>
    2012
    21 <para>A minimal system requires a partition of around 1.3 gigabytes
    22 (GB).  This is enough to store all the source tarballs and compile
    23 the packages. However, if the LFS system is intended to be the primary
    24 Linux system, additional software will probably be installed which
    25 will require additional space (2-3 GB). The LFS system itself will
    26 not take up this much room. A large portion of this requirement
    27 is to provide sufficient free temporary storage. Compiling
    28 packages can require a lot of disk space which will be reclaimed after
    29 the package is installed.</para>
     13  <para>Like most other operating systems, LFS is usually installed on a
     14  dedicated partition. The recommended approach to building an LFS system
     15  is to use an available empty partition or, if you have enough unpartitioned
     16  space, to create one. However, an LFS system (in fact even multiple LFS
     17  systems) may also be installed on a partition already occupied by another
     18  operating system and the different systems will co-exist peacefully. The
     19  document <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>
     20  explains how to implement this, whereas this book discusses the method of
     21  using a fresh partition for the installation.</para>
    3022
    31 <para>Because there is not always enough Random Access Memory (RAM)
    32 available for compilation processes, it is a good idea to use a small
    33 disk partition as swap space.  This is used by the kernel to
    34 store seldom-used data and leave more memory available for active processes.
    35 The swap partition for an LFS system can be the same as the one used
    36 by the host system, in which case it is not necessary to create another
    37 one.</para>
     23  <para>A minimal system requires a partition of around 1.3 gigabytes (GB).
     24  This is enough to store all the source tarballs and compile the packages.
     25  However, if the LFS system is intended to be the primary Linux system,
     26  additional software will probably be installed which will require additional
     27  space (2-3 GB). The LFS system itself will not take up this much room.
     28  A large portion of this requirement is to provide sufficient free temporary
     29  storage. Compiling packages can require a lot of disk space which will be
     30  reclaimed after the package is installed.</para>
    3831
    39 <para>Start a disk partitioning program such as
    40 <command>cfdisk</command> or <command>fdisk</command> with a command
    41 line option naming the hard disk on which the new partition will be
    42 created&mdash;for example <filename class="devicefile">/dev/hda</filename> for
    43 the primary Integrated Drive Electronics (IDE) disk. Create a Linux native
    44 partition and a swap partition, if needed. Please refer to
    45 <filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if you
    46 do not yet know how to use the programs.</para>
     32  <para>Because there is not always enough Random Access Memory (RAM) available
     33  for compilation processes, it is a good idea to use a small disk partition as
     34  <systemitem class="filesystem">swap</systemitem> space. This is used by the
     35  kernel to store seldom-used data and leave more memory available for active
     36  processes. The <systemitem class="filesystem">swap</systemitem> partition for
     37  an LFS system can be the same as the one used by the host system, in which
     38  case it is not necessary to create another one.</para>
    4739
    48 <para>Remember the designation of the new partition (e.g.,
    49 <filename class="devicefile">hda5</filename>). This book will refer to this as the LFS
    50 partition. Also remember the designation of the swap partition. These
    51 names will be needed later for the <filename>/etc/fstab</filename>
    52 file.</para>
     40  <para>Start a disk partitioning program such as <command>cfdisk</command>
     41  or <command>fdisk</command> with a command line option naming the hard
     42  disk on which the new partition will be created&mdash;for example
     43  <filename class="devicefile">/dev/hda</filename> for the primary Integrated
     44  Drive Electronics (IDE) disk. Create a Linux native partition and a
     45  <systemitem class="filesystem">swap</systemitem> partition, if needed. Please
     46  refer to <filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if
     47  you do not yet know how to use the programs.</para>
     48
     49  <para>Remember the designation of the new partition (e.g., <filename
     50  class="devicefile">hda5</filename>). This book will refer to this as
     51  the LFS partition. Also remember the designation of the <systemitem
     52  class="filesystem">swap</systemitem> partition. These names will be
     53  needed later for the <filename>/etc/fstab</filename> file.</para>
    5354
    5455</sect1>
    55 
  • chapter02/introduction.xml

    r35edd52 r87bae31  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="space-introduction">
    7 <title>Introduction</title>
    8 <?dbhtml filename="introduction.html"?>
     9  <?dbhtml filename="introduction.html"?>
    910
    10 <para>In this chapter, the partition which will host the LFS system is
    11 prepared. We will create the partition itself, create a file system
    12 on it, and mount it.</para>
     11  <title>Introduction</title>
     12
     13  <para>In this chapter, the partition which will host the LFS system is
     14  prepared. We will create the partition itself, create a file system
     15  on it, and mount it.</para>
    1316
    1417</sect1>
    15 
  • chapter02/mounting.xml

    r35edd52 r87bae31  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="space-mounting">
    7 <title>Mounting the New Partition</title>
    8 <?dbhtml filename="mounting.html"?>
     9  <?dbhtml filename="mounting.html"?>
    910
    10 <para>Now that a file system has been created, the partition needs to
    11 be made accessible. In order to do this, the partition needs to be
    12 mounted at a chosen mount point. For the purposes of this book, it is
    13 assumed that the file system is mounted under <filename
    14 class="directory">/mnt/lfs</filename>, but the directory choice is up
    15 to you.</para>
     11  <title>Mounting the New Partition</title>
    1612
    17 <para>Choose a mount point and assign it to the <envar>LFS</envar>
    18 environment variable by running:</para>
     13  <para>Now that a file system has been created, the partition needs to
     14  be made accessible. In order to do this, the partition needs to be
     15  mounted at a chosen mount point. For the purposes of this book, it is
     16  assumed that the file system is mounted under <filename
     17  class="directory">/mnt/lfs</filename>, but the directory choice is up
     18  to you.</para>
     19
     20  <para>Choose a mount point and assign it to the <envar>LFS</envar>
     21  environment variable by running:</para>
    1922
    2023<screen role="nodump"><userinput>export LFS=/mnt/lfs</userinput></screen>
    2124
    22 <para>Next, create the mount point and mount the LFS file system by
    23 running:</para>
     25  <para>Next, create the mount point and mount the LFS file system by
     26  running:</para>
    2427
    2528<screen role="nodump"><userinput>mkdir -pv $LFS
    2629mount -v /dev/<replaceable>[xxx]</replaceable> $LFS</userinput></screen>
    2730
    28 <para>Replace <replaceable>[xxx]</replaceable> with the designation of the LFS
    29 partition.</para>
     31  <para>Replace <replaceable>[xxx]</replaceable> with the designation of the LFS
     32  partition.</para>
    3033
    31 <para>If using multiple partitions for LFS (e.g., one for <filename
    32 class="directory">/</filename> and another for <filename
    33 class="directory">/usr</filename>), mount them using:</para>
     34  <para>If using multiple partitions for LFS (e.g., one for <filename
     35  class="directory">/</filename> and another for <filename
     36  class="directory">/usr</filename>), mount them using:</para>
    3437
    3538<screen role="nodump"><userinput>mkdir -pv $LFS
     
    3841mount -v /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen>
    3942
    40 <para>Replace <replaceable>[xxx]</replaceable> and
    41 <replaceable>[yyy]</replaceable> with the appropriate partition
    42 names.</para>
     43  <para>Replace <replaceable>[xxx]</replaceable> and
     44  <replaceable>[yyy]</replaceable> with the appropriate partition
     45  names.</para>
    4346
    44 <para>Ensure that this new partition is not mounted with permissions
    45 that are too restrictive (such as the nosuid, nodev, or noatime
    46 options). Run the <command>mount</command> command without any
    47 parameters to see what options are set for the mounted LFS
    48 partition. If <parameter>nosuid</parameter>, <parameter>nodev</parameter>,
    49 and/or <parameter>noatime</parameter> are set, the partition will need
    50 to be remounted.</para>
     47  <para>Ensure that this new partition is not mounted with permissions that
     48  are too restrictive (such as the <option>nosuid</option>, <option>nodev</option>,
     49  or <option>noatime</option> options). Run the <command>mount</command> command
     50  without any parameters to see what options are set for the mounted LFS
     51  partition. If <option>nosuid</option>, <option>nodev</option>, and/or
     52  <option>noatime</option> are set, the partition will need to be
     53  remounted.</para>
    5154
    52 <para>Now that there is an established place to work, it is time to
    53 download the packages.</para>
     55  <para>Now that there is an established place to work, it is time to
     56  download the packages.</para>
    5457
    5558</sect1>
Note: See TracChangeset for help on using the changeset viewer.