cvs commit: LFS/newxml/chapter03 creatingfilesystem.xml creatingpartition.xml creatingfs.xml creatingpart.xml

matthew at matthew at
Sun Mar 7 03:14:03 PST 2004

matthew     04/03/07 04:14:03

  Added:       newxml/chapter03 creatingfilesystem.xml
  Removed:     newxml/chapter03 creatingfs.xml creatingpart.xml
  Fixing errors reported by Anderson - CVS doesn't like me!
  Revision  Changes    Path
  1.1                  LFS/newxml/chapter03/creatingfilesystem.xml
  Index: creatingfilesystem.xml
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "">
  <sect1 id="space-creatingfilesystem">
  <title>Creating a file system on the new partition</title>
  <?dbhtml filename="creatingfilesystem.html"?>
  <para>Now that we have a blank partition, we can create a file system on it.
  Most widely used in the Linux world is the second extended file system (ext2),
  but with the high-capacity hard disks of today the so-called 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=""/>.</para>
  <para>To create an ext2 file system on the LFS partition run the following:</para>
  <screen><userinput>mke2fs /dev/xxx</userinput></screen>
  <para>Replace <filename>xxx</filename> with the name of the LFS partition
  (something like <filename>hda5</filename>).</para>
  <para>If you created a (new) swap partition you need to initialize it as a
  swap partition too (also known as formatting, like you did above with
  <userinput>mke2fs</userinput>) by running:</para>
  <screen><userinput>mkswap /dev/yyy</userinput></screen>
  <para>Replace <filename>yyy</filename> with the name of the swap
  1.1                  LFS/newxml/chapter03/creatingpartition.xml
  Index: creatingpartition.xml
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "">
  <sect1 id="space-creatingpartition">
  <title>Creating a new partition</title>
  <?dbhtml filename="creatingpartition.html"?>
  <para>In order to build our new Linux system, we will need some space:
  an empty disk partition. If you don't have a free partition, and no room
  on any of your hard disks to make one, then you could build LFS on the
  same partition as the one on which your current distribution is installed.
  This procedure is not recommended for your first LFS install, but if you
  are short on disk space, and you feel brave, take a look at the hint at
  <ulink url=""/>.</para>
  <para>For a minimal system you will need a partition of around 1.2 GB.
  This is enough to store all the source tarballs and compile all the packages.
  But if you intend to use the LFS system as your primary Linux system, you
  will probably want to install additional software, and will need more space
  than this, probably around 2 or 3 GB.</para>
  <para>As we almost never have enough RAM in our box, 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 more urgent stuff.
  The swap partition for your LFS system can be the same one as for your host
  system, so you won't have to create another if your host system already uses
  a swap partition.</para>
  <para>Start a disk partitioning program such as <userinput>cfdisk</userinput>
  or <userinput>fdisk</userinput> with an argument naming the hard disk upon
  which the new partition must be created -- for example
  <filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
  partition and a swap partition, if needed. Please refer to the man pages of
  <userinput>cfdisk</userinput> or <userinput>fdisk</userinput> if you don't yet
  know how to use the programs.</para>
  <para>Remember the designation of your new partition -- something like
  <filename>hda5</filename>. This book will refer to it as the LFS partition.
  If you (now) also have a swap partition, remember its designation too. These
  names will later be needed for the <filename>/etc/fstab</filename> file.</para>

More information about the lfs-book mailing list