Indented chapter 02.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7271 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2006-01-11 20:21:38 +00:00
parent 35edd526b5
commit 87bae3144c
5 changed files with 136 additions and 121 deletions

View File

@ -1,13 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<chapter id="chapter-partitioning" xreflabel="Chapter 2"> <chapter id="chapter-partitioning" xreflabel="Chapter 2">
<?dbhtml dir="chapter02"?> <?dbhtml dir="chapter02"?>
<title>Preparing a New Partition</title>
<?dbhtml filename="chapter02.html"?> <?dbhtml filename="chapter02.html"?>
<title>Preparing a New Partition</title>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/>

View File

@ -1,41 +1,48 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="space-creatingfilesystem"> <sect1 id="space-creatingfilesystem">
<title>Creating a File System on the Partition</title>
<?dbhtml filename="creatingfilesystem.html"?> <?dbhtml filename="creatingfilesystem.html"?>
<para>Now that a blank partition has been set up, the file system can <title>Creating a File System on the Partition</title>
be created. The most widely-used system in the Linux world is the
second extended file system (ext2), but with newer high-capacity
hard disks, journaling file systems are becoming increasingly
popular. We will create an ext2 file system. Build instructions for other file
systems can be found at <ulink
url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
<para>To create an ext2 file system on the LFS partition, run the following:</para> <para>Now that a blank partition has been set up, the file system can be created.
The most widely-used system in the Linux world is the second extended file
system (<systemitem class="filesystem">ext2</systemitem>), but with newer
high-capacity hard disks, journaling file systems are becoming increasingly
popular. We will create an <systemitem class="filesystem">ext2</systemitem>
file system. Build instructions for other file systems can be found at
<ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
<para>To create an <systemitem class="filesystem">ext2</systemitem> file
system on the LFS partition, run the following:</para>
<screen role="nodump"><userinput>mke2fs -v /dev/<replaceable>[xxx]</replaceable></userinput></screen> <screen role="nodump"><userinput>mke2fs -v /dev/<replaceable>[xxx]</replaceable></userinput></screen>
<para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS
partition (<filename class="devicefile">hda5</filename> in our previous example).</para> partition (<filename class="devicefile">hda5</filename> in our previous
example).</para>
<note><para>Some host distributions use custom features in their filesystem <note>
creation tools (e2fsprogs). This can cause problems when booting into your new <para>Some host distributions use custom features in their filesystem
creation tools (E2fsprogs). This can cause problems when booting into your new
LFS in Chapter 9, as those features will not be supported by the LFS-installed LFS in Chapter 9, as those features will not be supported by the LFS-installed
e2fsprogs; you will get an error similar to <quote>unsupported filesystem E2fsprogs; you will get an error similar to <quote>unsupported filesystem
features, upgrade your e2fsprogs</quote>. To check if your host system features, upgrade your e2fsprogs</quote>. To check if your host system
uses custom enhancements, run the following command:</para> uses custom enhancements, run the following command:</para>
<screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen> <screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
<para>If the output contains features other than: dir_index; filetype; <para>If the output contains features other than: <option>dir_index</option>;
large_file; resize_inode or sparse_super then your host system may have custom <option>filetype</option>; <option>large_file</option>;
enhancements. In that case, to avoid later problems, you should compile the <option>resize_inode</option> or <option>sparse_super</option> then your host
stock e2fsprogs package and use the resulting binaries to re-create the system may have custom enhancements. In that case, to avoid later problems,
filesystem on your LFS partition:</para> you should compile the stock E2fsprogs package and use the resulting binaries
to re-create the filesystem on your LFS partition:</para>
<screen role="nodump"><userinput>cd /tmp <screen role="nodump"><userinput>cd /tmp
tar -xjvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2 tar -xjvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
@ -49,14 +56,14 @@ cd /tmp
rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen> rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>
</note> </note>
<para>If a swap partition was created, it will need to be initialized for use by <para>If a <systemitem class="filesystem">swap</systemitem> partition was
issuing the command below. If you are using an existing swap partition, there is created, it will need to be initialized for use by issuing the command below.
no need to format it.</para> If you are using an existing <systemitem class="filesystem">swap</systemitem>
partition, there is no need to format it.</para>
<screen role="nodump"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen> <screen role="nodump"><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
<para>Replace <replaceable>[yyy]</replaceable> with the name of the swap <para>Replace <replaceable>[yyy]</replaceable> with the name of the
partition.</para> <systemitem class="filesystem">swap</systemitem> partition.</para>
</sect1> </sect1>

View File

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

View File

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="space-introduction"> <sect1 id="space-introduction">
<title>Introduction</title>
<?dbhtml filename="introduction.html"?> <?dbhtml filename="introduction.html"?>
<title>Introduction</title>
<para>In this chapter, the partition which will host the LFS system is <para>In this chapter, the partition which will host the LFS system is
prepared. We will create the partition itself, create a file system prepared. We will create the partition itself, create a file system
on it, and mount it.</para> on it, and mount it.</para>
</sect1> </sect1>

View File

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="space-mounting"> <sect1 id="space-mounting">
<title>Mounting the New Partition</title>
<?dbhtml filename="mounting.html"?> <?dbhtml filename="mounting.html"?>
<title>Mounting the New Partition</title>
<para>Now that a file system has been created, the partition needs to <para>Now that a file system has been created, the partition needs to
be made accessible. In order to do this, the partition needs to be be made accessible. In order to do this, the partition needs to be
mounted at a chosen mount point. For the purposes of this book, it is mounted at a chosen mount point. For the purposes of this book, it is
@ -41,13 +44,13 @@ mount -v /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen>
<replaceable>[yyy]</replaceable> with the appropriate partition <replaceable>[yyy]</replaceable> with the appropriate partition
names.</para> names.</para>
<para>Ensure that this new partition is not mounted with permissions <para>Ensure that this new partition is not mounted with permissions that
that are too restrictive (such as the nosuid, nodev, or noatime are too restrictive (such as the <option>nosuid</option>, <option>nodev</option>,
options). Run the <command>mount</command> command without any or <option>noatime</option> options). Run the <command>mount</command> command
parameters to see what options are set for the mounted LFS without any parameters to see what options are set for the mounted LFS
partition. If <parameter>nosuid</parameter>, <parameter>nodev</parameter>, partition. If <option>nosuid</option>, <option>nodev</option>, and/or
and/or <parameter>noatime</parameter> are set, the partition will need <option>noatime</option> are set, the partition will need to be
to be remounted.</para> remounted.</para>
<para>Now that there is an established place to work, it is time to <para>Now that there is an established place to work, it is time to
download the packages.</para> download the packages.</para>