From 87bae3144cc4ce8c61e68426d09d060b2c92cfb2 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Wed, 11 Jan 2006 20:21:38 +0000 Subject: Indented chapter 02. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7271 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter02/chapter02.xml | 19 ++++---- chapter02/creatingfilesystem.xml | 69 ++++++++++++++++------------- chapter02/creatingpartition.xml | 96 ++++++++++++++++++++-------------------- chapter02/introduction.xml | 16 ++++--- 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 @@ - %general-entities; ]> + - -Preparing a New Partition - + + + + Preparing a New Partition - - - - + + + + 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 @@ - %general-entities; ]> + -Creating a File System on the Partition - + + + Creating a File System on the Partition -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 . + 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 + . -To create an ext2 file system on the LFS partition, run the following: + To create an ext2 file + system on the LFS partition, run the following: mke2fs -v /dev/[xxx] -Replace [xxx] with the name of the LFS -partition (hda5 in our previous example). + Replace [xxx] with the name of the LFS + partition (hda5 in our previous + example). -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 unsupported filesystem -features, upgrade your e2fsprogs. To check if your host system -uses custom enhancements, run the following command: + + 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 unsupported filesystem + features, upgrade your e2fsprogs. To check if your host system + uses custom enhancements, run the following command: debugfs -R feature /dev/[xxx] -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: + If the output contains features other than: ; + ; ; + or 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: 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/[xxx] cd /tmp rm -rfv e2fsprogs-&e2fsprogs-version; - + -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. + 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. mkswap /dev/[yyy] -Replace [yyy] with the name of the swap -partition. + Replace [yyy] with the name of the + swap partition. - 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 @@ - %general-entities; ]> + -Creating a New Partition - - -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 - explains -how to implement this, whereas this book discusses the method of -using a fresh partition for the installation. - -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. - -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. - -Start a disk partitioning program such as -cfdisk or fdisk with a command -line option naming the hard disk on which the new partition will be -created—for example /dev/hda for -the primary Integrated Drive Electronics (IDE) disk. Create a Linux native -partition and a swap partition, if needed. Please refer to -cfdisk(8) or fdisk(8) if you -do not yet know how to use the programs. - -Remember the designation of the new partition (e.g., -hda5). 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 /etc/fstab -file. + - + Creating a New Partition + + 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 + explains how to implement this, whereas this book discusses the method of + using a fresh partition for the installation. + + 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. + 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. + + Start a disk partitioning program such as cfdisk + or fdisk with a command line option naming the hard + disk on which the new partition will be created—for example + /dev/hda for the primary Integrated + Drive Electronics (IDE) disk. Create a Linux native partition and a + swap partition, if needed. Please + refer to cfdisk(8) or fdisk(8) if + you do not yet know how to use the programs. + + Remember the designation of the new partition (e.g., hda5). 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 /etc/fstab file. + + 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 @@ - %general-entities; ]> + -Introduction - + -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. + Introduction - + 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. + 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 @@ - %general-entities; ]> + -Mounting the New Partition - + + + Mounting the New Partition -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 /mnt/lfs, but the directory choice is up -to you. + 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 /mnt/lfs, but the directory choice is up + to you. -Choose a mount point and assign it to the LFS -environment variable by running: + Choose a mount point and assign it to the LFS + environment variable by running: export LFS=/mnt/lfs -Next, create the mount point and mount the LFS file system by -running: + Next, create the mount point and mount the LFS file system by + running: mkdir -pv $LFS mount -v /dev/[xxx] $LFS -Replace [xxx] with the designation of the LFS -partition. + Replace [xxx] with the designation of the LFS + partition. -If using multiple partitions for LFS (e.g., one for / and another for /usr), mount them using: + If using multiple partitions for LFS (e.g., one for / and another for /usr), mount them using: mkdir -pv $LFS mount -v /dev/[xxx] $LFS mkdir -v $LFS/usr mount -v /dev/[yyy] $LFS/usr -Replace [xxx] and -[yyy] with the appropriate partition -names. + Replace [xxx] and + [yyy] with the appropriate partition + names. -Ensure that this new partition is not mounted with permissions -that are too restrictive (such as the nosuid, nodev, or noatime -options). Run the mount command without any -parameters to see what options are set for the mounted LFS -partition. If nosuid, nodev, -and/or noatime are set, the partition will need -to be remounted. + Ensure that this new partition is not mounted with permissions that + are too restrictive (such as the , , + or options). Run the mount command + without any parameters to see what options are set for the mounted LFS + partition. If , , and/or + are set, the partition will need to be + remounted. -Now that there is an established place to work, it is time to -download the packages. + Now that there is an established place to work, it is time to + download the packages. -- cgit v1.2.3-54-g00ecf