diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2006-01-11 20:22:30 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2006-01-11 20:22:30 +0000 |
commit | 1b202674192bc7f3a5d68368d97e0c5e4d1424f2 (patch) | |
tree | bdeaff77cbba048658cb21d2b512b142fc8bc30c | |
parent | e1266e53d9c1c82900fa851b9950e660bf841194 (diff) |
Ported r7271 from trunk.
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/alphabetical/BOOK@7272 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter02/chapter02.xml | 19 | ||||
-rw-r--r-- | chapter02/creatingfilesystem.xml | 69 | ||||
-rw-r--r-- | chapter02/creatingpartition.xml | 96 | ||||
-rw-r--r-- | chapter02/introduction.xml | 16 | ||||
-rw-r--r-- | chapter02/mounting.xml | 63 |
5 files changed, 139 insertions, 124 deletions
diff --git a/chapter02/chapter02.xml b/chapter02/chapter02.xml index ecb031a58..8200994ed 100644 --- a/chapter02/chapter02.xml +++ b/chapter02/chapter02.xml @@ -1,16 +1,19 @@ <?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"> %general-entities; ]> + <chapter id="chapter-partitioning" xreflabel="Chapter 2"> -<?dbhtml dir="chapter02"?> -<title>Preparing a New Partition</title> -<?dbhtml filename="chapter02.html"?> + <?dbhtml dir="chapter02"?> + <?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="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="mounting.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="creatingfilesystem.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mounting.xml"/> </chapter> diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index 3466a555a..4e7346b20 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -1,41 +1,48 @@ <?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"> %general-entities; ]> + <sect1 id="space-creatingfilesystem"> -<title>Creating a File System on the Partition</title> -<?dbhtml filename="creatingfilesystem.html"?> + <?dbhtml filename="creatingfilesystem.html"?> + + <title>Creating a File System on the Partition</title> -<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 (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>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 ext2 file system on the LFS partition, run the following:</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> -<para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS -partition (<filename class="devicefile">hda5</filename> in our previous example).</para> + <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS + partition (<filename class="devicefile">hda5</filename> in our previous + example).</para> -<note><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 -e2fsprogs; you will get an error similar to <quote>unsupported filesystem -features, upgrade your e2fsprogs</quote>. To check if your host system -uses custom enhancements, run the following command:</para> + <note> + <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 + E2fsprogs; you will get an error similar to <quote>unsupported filesystem + features, upgrade your e2fsprogs</quote>. To check if your host system + uses custom enhancements, run the following command:</para> <screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen> -<para>If the output contains features other than: dir_index; filetype; -large_file; resize_inode or sparse_super then your host system may have custom -enhancements. In that case, to avoid later problems, you should compile the -stock e2fsprogs package and use the resulting binaries to re-create the -filesystem on your LFS partition:</para> + <para>If the output contains features other than: <option>dir_index</option>; + <option>filetype</option>; <option>large_file</option>; + <option>resize_inode</option> or <option>sparse_super</option> then your host + system may have custom enhancements. In that case, to avoid later problems, + 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 tar -xjvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2 @@ -47,16 +54,16 @@ make #note that we intentionally don't 'make install' here! ./misc/mke2fs -v /dev/<replaceable>[xxx]</replaceable> cd /tmp 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 -issuing the command below. If you are using an existing swap partition, there is -no need to format it.</para> + <para>If a <systemitem class="filesystem">swap</systemitem> partition was + created, it will need to be initialized for use by issuing the command below. + 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> -<para>Replace <replaceable>[yyy]</replaceable> with the name of the swap -partition.</para> + <para>Replace <replaceable>[yyy]</replaceable> with the name of the + <systemitem class="filesystem">swap</systemitem> partition.</para> </sect1> - diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml index d6441124a..612d1c3cf 100644 --- a/chapter02/creatingpartition.xml +++ b/chapter02/creatingpartition.xml @@ -1,55 +1,55 @@ <?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"> %general-entities; ]> + <sect1 id="space-creatingpartition"> -<title>Creating a New Partition</title> -<?dbhtml filename="creatingpartition.html"?> - -<para>Like most other operating systems, LFS is usually installed on -a dedicated partition. The recommended approach to building an LFS -system is to use an available empty partition or, if you have enough -unpartitioned space, to create one. However, an LFS system (in -fact even multiple LFS systems) may also be installed on a partition -already occupied by another operating system and the different systems -will co-exist peacefully. The 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> - -<para>A minimal system requires a partition of around 1.3 gigabytes -(GB). This is enough to store all the source tarballs and compile -the packages. However, if the LFS system is intended to be the primary -Linux system, additional software will probably be installed which -will require additional space (2-3 GB). The LFS system itself will -not take up this much room. A large portion of this requirement -is to provide sufficient free temporary storage. Compiling -packages can require a lot of disk space which will be reclaimed after -the package is installed.</para> - -<para>Because there is not always enough Random Access Memory (RAM) -available for compilation processes, it is a good idea to use a small -disk partition as swap space. This is used by the kernel to -store seldom-used data and leave more memory available for active processes. -The swap partition for an LFS system can be the same as the one used -by the host system, in which case it is not necessary to create another -one.</para> - -<para>Start a disk partitioning program such as -<command>cfdisk</command> or <command>fdisk</command> with a command -line option naming the hard disk on which the new partition will be -created—for example <filename class="devicefile">/dev/hda</filename> for -the primary Integrated Drive Electronics (IDE) disk. Create a Linux native -partition and a swap partition, if needed. Please refer to -<filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if you -do not yet know how to use the programs.</para> - -<para>Remember the designation of the new partition (e.g., -<filename class="devicefile">hda5</filename>). This book will refer to this as the LFS -partition. Also remember the designation of the swap partition. These -names will be needed later for the <filename>/etc/fstab</filename> -file.</para> + <?dbhtml filename="creatingpartition.html"?> -</sect1> + <title>Creating a New Partition</title> + + <para>Like most other operating systems, LFS is usually installed on a + dedicated partition. The recommended approach to building an LFS system + is to use an available empty partition or, if you have enough unpartitioned + space, to create one. However, an LFS system (in fact even multiple LFS + systems) may also be installed on a partition already occupied by another + operating system and the different systems will co-exist peacefully. The + 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> + + <para>A minimal system requires a partition of around 1.3 gigabytes (GB). + This is enough to store all the source tarballs and compile the packages. + However, if the LFS system is intended to be the primary Linux system, + additional software will probably be installed which will require additional + space (2-3 GB). The LFS system itself will not take up this much room. + A large portion of this requirement is to provide sufficient free temporary + storage. Compiling packages can require a lot of disk space which will be + reclaimed after the package is installed.</para> + <para>Because there is not always enough Random Access Memory (RAM) available + for compilation processes, it is a good idea to use a small disk partition as + <systemitem class="filesystem">swap</systemitem> space. This is used by the + kernel to store seldom-used data and leave more memory available for active + processes. The <systemitem class="filesystem">swap</systemitem> partition for + an LFS system can be the same as the one used by the host system, in which + case it is not necessary to create another one.</para> + + <para>Start a disk partitioning program such as <command>cfdisk</command> + or <command>fdisk</command> with a command line option naming the hard + disk on which the new partition will be created—for example + <filename class="devicefile">/dev/hda</filename> for the primary Integrated + Drive Electronics (IDE) disk. Create a Linux native partition and a + <systemitem class="filesystem">swap</systemitem> partition, if needed. Please + refer to <filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if + you do not yet know how to use the programs.</para> + + <para>Remember the designation of the new partition (e.g., <filename + class="devicefile">hda5</filename>). This book will refer to this as + the LFS partition. Also remember the designation of the <systemitem + class="filesystem">swap</systemitem> partition. These names will be + needed later for the <filename>/etc/fstab</filename> file.</para> + +</sect1> diff --git a/chapter02/introduction.xml b/chapter02/introduction.xml index 209e069b8..812764536 100644 --- a/chapter02/introduction.xml +++ b/chapter02/introduction.xml @@ -1,15 +1,17 @@ <?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"> %general-entities; ]> + <sect1 id="space-introduction"> -<title>Introduction</title> -<?dbhtml filename="introduction.html"?> + <?dbhtml filename="introduction.html"?> -<para>In this chapter, the partition which will host the LFS system is -prepared. We will create the partition itself, create a file system -on it, and mount it.</para> + <title>Introduction</title> -</sect1> + <para>In this chapter, the partition which will host the LFS system is + prepared. We will create the partition itself, create a file system + on it, and mount it.</para> +</sect1> diff --git a/chapter02/mounting.xml b/chapter02/mounting.xml index 37654087a..67f786203 100644 --- a/chapter02/mounting.xml +++ b/chapter02/mounting.xml @@ -1,56 +1,59 @@ <?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"> %general-entities; ]> + <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 -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 -assumed that the file system is mounted under <filename -class="directory">/mnt/lfs</filename>, but the directory choice is up -to you.</para> + <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 + mounted at a chosen mount point. For the purposes of this book, it is + assumed that the file system is mounted under <filename + class="directory">/mnt/lfs</filename>, but the directory choice is up + to you.</para> -<para>Choose a mount point and assign it to the <envar>LFS</envar> -environment variable by running:</para> + <para>Choose a mount point and assign it to the <envar>LFS</envar> + environment variable by running:</para> <screen role="nodump"><userinput>export LFS=/mnt/lfs</userinput></screen> -<para>Next, create the mount point and mount the LFS file system by -running:</para> + <para>Next, create the mount point and mount the LFS file system by + running:</para> <screen role="nodump"><userinput>mkdir -pv $LFS mount -v /dev/<replaceable>[xxx]</replaceable> $LFS</userinput></screen> -<para>Replace <replaceable>[xxx]</replaceable> with the designation of the LFS -partition.</para> + <para>Replace <replaceable>[xxx]</replaceable> with the designation of the LFS + partition.</para> -<para>If using multiple partitions for LFS (e.g., one for <filename -class="directory">/</filename> and another for <filename -class="directory">/usr</filename>), mount them using:</para> + <para>If using multiple partitions for LFS (e.g., one for <filename + class="directory">/</filename> and another for <filename + class="directory">/usr</filename>), mount them using:</para> <screen role="nodump"><userinput>mkdir -pv $LFS mount -v /dev/<replaceable>[xxx]</replaceable> $LFS mkdir -v $LFS/usr mount -v /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen> -<para>Replace <replaceable>[xxx]</replaceable> and -<replaceable>[yyy]</replaceable> with the appropriate partition -names.</para> + <para>Replace <replaceable>[xxx]</replaceable> and + <replaceable>[yyy]</replaceable> with the appropriate partition + names.</para> -<para>Ensure that this new partition is not mounted with permissions -that are too restrictive (such as the nosuid, nodev, or noatime -options). Run the <command>mount</command> command without any -parameters to see what options are set for the mounted LFS -partition. If <parameter>nosuid</parameter>, <parameter>nodev</parameter>, -and/or <parameter>noatime</parameter> are set, the partition will need -to be remounted.</para> + <para>Ensure that this new partition is not mounted with permissions that + are too restrictive (such as the <option>nosuid</option>, <option>nodev</option>, + or <option>noatime</option> options). Run the <command>mount</command> command + without any parameters to see what options are set for the mounted LFS + partition. If <option>nosuid</option>, <option>nodev</option>, and/or + <option>noatime</option> are set, the partition will need to be + remounted.</para> -<para>Now that there is an established place to work, it is time to -download the packages.</para> + <para>Now that there is an established place to work, it is time to + download the packages.</para> </sect1> |