r156 - trunk/BOOK/chapter02

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Feb 9 13:28:35 PST 2005


Author: manuel
Date: 2005-02-09 14:28:34 -0700 (Wed, 09 Feb 2005)
New Revision: 156

Added:
   trunk/BOOK/chapter02/creatingfilesystem.xml
   trunk/BOOK/chapter02/creatingpartition.xml
   trunk/BOOK/chapter02/mounting.xml
Modified:
   trunk/BOOK/chapter02/chapter02.xml
Log:
Completed chapter02

Modified: trunk/BOOK/chapter02/chapter02.xml
===================================================================
--- trunk/BOOK/chapter02/chapter02.xml	2005-02-09 20:43:42 UTC (rev 155)
+++ trunk/BOOK/chapter02/chapter02.xml	2005-02-09 21:28:34 UTC (rev 156)
@@ -13,5 +13,8 @@
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchain.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ssp.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pie.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>

Added: trunk/BOOK/chapter02/creatingfilesystem.xml
===================================================================
--- trunk/BOOK/chapter02/creatingfilesystem.xml	2005-02-09 20:43:42 UTC (rev 155)
+++ trunk/BOOK/chapter02/creatingfilesystem.xml	2005-02-09 21:28:34 UTC (rev 156)
@@ -0,0 +1,36 @@
+<?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" [
+  <!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"?>
+
+<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 HLFS partition, run the following:</para>
+
+<screen><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
+
+<para>Replace <replaceable>[xxx]</replaceable> with the name of the HLFS
+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>
+


Property changes on: trunk/BOOK/chapter02/creatingfilesystem.xml
___________________________________________________________________
Name: svn:keywords
   + "Author Date Revision Id"

Added: trunk/BOOK/chapter02/creatingpartition.xml
===================================================================
--- trunk/BOOK/chapter02/creatingpartition.xml	2005-02-09 20:43:42 UTC (rev 155)
+++ trunk/BOOK/chapter02/creatingpartition.xml	2005-02-09 21:28:34 UTC (rev 156)
@@ -0,0 +1,57 @@
+<?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" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+<sect1 id="space-creatingpartition">
+<title>Creating a New Partition</title>
+<?dbhtml filename="creatingpartition.html"?>
+
+<!--Edit Me-->
+<para>Like most other operating systems, HLFS 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 HLFS installation is recommended.  However, an HLFS system (in
+fact even multiple HLFS 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 HLFS 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 HLFS 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 HLFS 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 HLFS
+partition. Also remember the designation of the swap partition. These
+names will be needed later for the <filename>/etc/fstab</filename>
+file.</para>
+
+</sect1>
+


Property changes on: trunk/BOOK/chapter02/creatingpartition.xml
___________________________________________________________________
Name: svn:keywords
   + "Author Date Revision Id"

Added: trunk/BOOK/chapter02/mounting.xml
===================================================================
--- trunk/BOOK/chapter02/mounting.xml	2005-02-09 20:43:42 UTC (rev 155)
+++ trunk/BOOK/chapter02/mounting.xml	2005-02-09 21:28:34 UTC (rev 156)
@@ -0,0 +1,57 @@
+<?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" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+<sect1 id="space-mounting">
+<title>Mounting the New Partition</title>
+<?dbhtml filename="mounting.html"?>
+
+<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/hlfs</filename>, but the directory choice is up
+to you.</para>
+
+<para>Choose a mount point and assign it to the <envar>HLFS</envar> 
+environment variable by running:</para>
+
+<screen><userinput>export HLFS=/mnt/hlfs</userinput></screen>
+
+<para>Next, create the mount point and mount the LFS file system by
+running:</para>
+
+<screen><userinput>mkdir -p $HLFS
+mount /dev/<replaceable>[xxx]</replaceable> $HLFS</userinput></screen>
+
+<para>Replace <replaceable>[xxx]</replaceable> with the designation of the HLFS
+partition.</para>
+
+<para>If using multiple partitions for HLFS (e.g., one for <filename
+class="directory">/</filename> and another for <filename
+class="directory">/usr</filename>), mount them using:</para>
+
+<screen><userinput>mkdir -p $HLFS
+mount /dev/<replaceable>[xxx]</replaceable> $HLFS
+mkdir $HLFS/usr
+mount /dev/<replaceable>[yyy]</replaceable> $HLFS/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 <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 HLFS
+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>
+


Property changes on: trunk/BOOK/chapter02/mounting.xml
___________________________________________________________________
Name: svn:keywords
   + "Author Date Revision Id"




More information about the hlfs-dev mailing list