diff options
Diffstat (limited to 'chapter02')
-rw-r--r-- | chapter02/creatingfilesystem.xml | 26 | ||||
-rw-r--r-- | chapter02/creatingpartition.xml | 47 | ||||
-rw-r--r-- | chapter02/introduction.xml | 5 | ||||
-rw-r--r-- | chapter02/mounting.xml | 46 |
4 files changed, 120 insertions, 4 deletions
diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index 489153e23..f013b9dec 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -7,6 +7,30 @@ <title>Creating a File System on the Partition</title> <?dbhtml filename="creatingfilesystem.html"?> -<para>See testing</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 (ext2), but with the newer high-capacity +hard disks, the journaling file systems are becoming increasingly +popular. Here we will create an ext2 file system, but 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> + +<screen><userinput>mke2fs /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>If a swap partition was created, it will need to be initialized +as a swap partition too (also known as formatting, as described above +with <command>mke2fs</command>) by running the following. If you are using an existing +swap partition, there is no need to format it.</para> + +<screen><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen> + +<para>Replace <replaceable>[yyy]</replaceable> with the name of the swap +partition.</para> </sect1> + diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml index 78c4cbaa6..f3ef3de91 100644 --- a/chapter02/creatingpartition.xml +++ b/chapter02/creatingpartition.xml @@ -7,6 +7,51 @@ <title>Creating a New Partition</title> <?dbhtml filename="creatingpartition.html"?> -<para>See testing</para> +<!--Edit Me--> +<para>Like most other operating systems, LFS is usually installed on +a dedicated partition. If you have an empty partition or enough +unpartitioned space on one of your hard disks to make one, using this +for your LFS installation is recommended. 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> +<!--End Edit Me--> + +<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 or 3 GB). The LFS system itself will +not take up this much space. A large portion of this required amount +of space is to provide sufficient free temporary space. 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 space is used by the kernel to +store seldom-used data to make room in memory for active processes. +The swap partition for an LFS system can be the same as the one used +by the host system, so another swap partition will not need to be +created if your host system already has one setup.</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 the man +pages of <command>cfdisk</command> or <command>fdisk</command> 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> </sect1> + diff --git a/chapter02/introduction.xml b/chapter02/introduction.xml index 1619521fa..209e069b8 100644 --- a/chapter02/introduction.xml +++ b/chapter02/introduction.xml @@ -7,6 +7,9 @@ <title>Introduction</title> <?dbhtml filename="introduction.html"?> -<para>See testing</para> +<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 fb31964a7..0ac3f91bf 100644 --- a/chapter02/mounting.xml +++ b/chapter02/mounting.xml @@ -7,6 +7,50 @@ <title>Mounting the New Partition</title> <?dbhtml filename="mounting.html"?> -<para>See testing</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> + +<screen><userinput>export LFS=/mnt/lfs</userinput></screen> + +<para>Next, create the mount point and mount the LFS file system by +running:</para> + +<screen><userinput>mkdir -p $LFS +mount /dev/<replaceable>[xxx]</replaceable> $LFS</userinput></screen> + +<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> + +<screen><userinput>mkdir -p $LFS +mount /dev/<replaceable>[xxx]</replaceable> $LFS +mkdir $LFS/usr +mount /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen> + +<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>Now that there is an established place to work, it is time to +download the packages.</para> </sect1> + |