mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Applied Alex patch rewriting the chapter
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2174 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
b60ca14d6c
commit
8b5830ceca
@ -2,19 +2,19 @@
|
|||||||
<title>Creating a file system on the new partition</title>
|
<title>Creating a file system on the new partition</title>
|
||||||
<?dbhtml filename="creatingfs.html" dir="chapter04"?>
|
<?dbhtml filename="creatingfs.html" dir="chapter04"?>
|
||||||
|
|
||||||
<para>Once the partition is created, we have to create a new file system on
|
<para>Now the partition has been made, we can create a file system on it.
|
||||||
that partition. The standard file system used these days is the ext2 file
|
Most widely used in the Linux world is the second extended file system (ext2),
|
||||||
system, but the so-called journaling file systems are becoming increasingly
|
but with the high-capacity hard disks of today the so-called journaling file
|
||||||
popular too. We'll assume that you wish to create an ext2 file system.
|
systems are becoming increasingly popular. Here we will create an ext2 file
|
||||||
However, build instructions for other file systems may be found at
|
system, but build instructions for other file systems can be found at <ulink
|
||||||
<ulink url="http://beyond.linuxfromscratch.org/view/cvs/postlfs/filesystems.html"/>.</para>
|
url="http://beyond.linuxfromscratch.org/view/cvs/postlfs/filesystems.html"/>.</para>
|
||||||
|
|
||||||
<para>To create an ext2 file system, use the mke2fs command. The LFS partition
|
<para>To create an ext2 file system on the LFS partition run the following:</para>
|
||||||
is used as the only option to the command and the file system is created.</para>
|
|
||||||
|
|
||||||
<para><screen><userinput>mke2fs /dev/xxx</userinput></screen></para>
|
<para><screen><userinput>mke2fs /dev/xxx</userinput></screen></para>
|
||||||
|
|
||||||
<para>Replace "xxx" by the partition's designation (like hda11).</para>
|
<para>Replace <filename>xxx</filename> with the name of the LFS partition
|
||||||
|
(something like <filename>hda5</filename>).</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -2,42 +2,37 @@
|
|||||||
<title>Creating a new partition</title>
|
<title>Creating a new partition</title>
|
||||||
<?dbhtml filename="creatingpart.html" dir="chapter04"?>
|
<?dbhtml filename="creatingpart.html" dir="chapter04"?>
|
||||||
|
|
||||||
<para>It is possible to build LFS on only one partition - the partition
|
<para>In order to build our new Linux system, we will need some space:
|
||||||
in which your original distribution is installed. While this is not
|
an empty disk partition. If you don't have a free partition, and no room
|
||||||
recommended for your first LFS installation, it may be useful if you
|
on any of your hard disks to make one, then you could build LFS on the
|
||||||
are short on disk space. If you feel brave, take a look at the
|
same partition as the one on which your current distribution is installed.
|
||||||
<emphasis>Install LFS next to existing systems on the same
|
This procedure is not recommended for your first LFS install, but if you
|
||||||
partition</emphasis> hint at <ulink
|
are short on disk space, and you feel brave, take a look at the hint at
|
||||||
url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>
|
<ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>
|
||||||
|
|
||||||
<para>Before we can build our new Linux system, we need an empty
|
<para>For a minimal system you will need a partition of around 1 GB.
|
||||||
Linux partition where we can build it. We recommend a partition size
|
This is enough to store all the source tarballs and compile all the packages.
|
||||||
of at least 1 GB. This provides enough space to store the tarballs and
|
But if you intend to use the LFS system as your primary Linux system, you
|
||||||
compile all of the packages. You will probably need more space if you
|
will probably want to install additional software, and will need more space
|
||||||
intend to install additional software and use the LFS system as your
|
than this, probably around 2 or 3 GB.</para>
|
||||||
primary Linux system. If a Linux native partition is already available,
|
|
||||||
this subsection can be skipped.</para>
|
|
||||||
|
|
||||||
<para>Since your system memory can only hold a limited amount of data
|
<para>As we almost never have enough RAM in our box, it is a good idea to
|
||||||
at one time, we recommend that disk space be set aside for swap files.
|
use a small disk partition as swap space -- this space is used by the kernel
|
||||||
A swap file is a place where items in memory may be stored until they
|
to store seldom-used data to make room in memory for more urgent stuff.
|
||||||
are called for. This disk space may be shared between your host system
|
The swap partition for your LFS system can be the same one as for your host
|
||||||
and your LFS system. If you already have a swap partition, then you
|
system, so you won't have to create another if your host system already uses
|
||||||
probably don't need to create another one. Otherwise, you should create
|
a swap partition.</para>
|
||||||
a swap partition via an fdisk program. Regardless, you need to remember
|
|
||||||
the designation of the swap partition (such as hda2) as it will be needed
|
|
||||||
when we create the <filename>/etc/fstab</filename> file.</para>
|
|
||||||
|
|
||||||
<para>The cfdisk program (or another fdisk-like program) should be
|
<para>Start the <filename>cfdisk</filename> program with as argument the name
|
||||||
started with the appropriate hard disk as the argument (like /dev/hda
|
of the hard disk upon which the new partition must be created -- for example
|
||||||
if a new partition is to be created on the primary master IDE disk).
|
<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
|
||||||
Using this program, create a Linux native partition. Please refer to
|
partition, and if needed a swap partition. Please refer to the man page of
|
||||||
the documentation of your fdisk program (the man pages are often a
|
<filename>cfdisk</filename> if you don't yet know how to use the program.</para>
|
||||||
good place to start) for information about creating Linux native
|
|
||||||
partitions and writing partition tables.</para>
|
|
||||||
|
|
||||||
<para>The designation of your new partition should be remembered.
|
<para>Remember the designation of your new partition -- something like
|
||||||
It might be something similar to hda11. This newly created partition
|
<filename>hda5</filename>. This book will refer to it as the LFS partition.
|
||||||
will be referred to as the LFS partition in this book.</para>
|
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>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
<?dbhtml filename="introduction.html" dir="chapter04"?>
|
<?dbhtml filename="introduction.html" dir="chapter04"?>
|
||||||
|
|
||||||
<para>In this chapter, the partition which will host the LFS system is
|
<para>In this chapter the partition which will host the LFS system is
|
||||||
prepared. We will create the partition itself, make a file system on it,
|
prepared. We will create the partition itself, make a file system on it,
|
||||||
and mount it.</para>
|
and mount it.</para>
|
||||||
|
|
||||||
|
@ -1,39 +1,40 @@
|
|||||||
<sect1 id="ch04-mounting">
|
<sect1 id="ch04-mounting">
|
||||||
<title>Mounting the new partition</title>
|
<title>Mounting the new file system</title>
|
||||||
<?dbhtml filename="mounting.html" dir="chapter04"?>
|
<?dbhtml filename="mounting.html" dir="chapter04"?>
|
||||||
|
|
||||||
<para>Now that we have created a file system, it is ready for use. All we have
|
<para>Now that we've created a file system, we want to be able to access it.
|
||||||
to do to be able to access the partition (as in reading data from and writing
|
For that, we need to mount it, and have to choose a mount point.
|
||||||
data to) is mount it. If it is mounted under /mnt/lfs, this partition can
|
In this book we assume that the file system is mounted under
|
||||||
be accessed by cd'ing to the /mnt/lfs directory. This book will assume
|
<filename>/mnt/lfs</filename>, but it doesn't matter what directory
|
||||||
that the partition was mounted under /mnt/lfs. It doesn't matter which
|
you choose.</para>
|
||||||
directory is chosen, just make sure you remember what you chose.</para>
|
|
||||||
|
|
||||||
<para>Create the /mnt/lfs directory by running:</para>
|
<para>Choose a mount point and assign it to the LFS environment variable
|
||||||
|
by running:</para>
|
||||||
|
|
||||||
<para><screen><userinput>mkdir -p /mnt/lfs</userinput></screen></para>
|
<para><screen><userinput>export LFS=/mnt/lfs</userinput></screen></para>
|
||||||
|
|
||||||
<para>Now mount the LFS partition by running:</para>
|
<para>Now create the mount point and mount the LFS file system by running:</para>
|
||||||
|
|
||||||
<para><screen><userinput>mount /dev/xxx /mnt/lfs</userinput></screen></para>
|
<para><screen><userinput>mkdir -p $LFS &&
|
||||||
|
mount /dev/xxx $LFS</userinput></screen></para>
|
||||||
|
|
||||||
<para>Replace <quote>xxx</quote> by the partition's designation (like hda11).</para>
|
<para>Replace <filename>xxx</filename> with the designation of the LFS
|
||||||
|
partition.</para>
|
||||||
|
|
||||||
<para>This directory (/mnt/lfs) is the LFS variable you have read about
|
<para>(If you decided to use multiple partitions for LFS (say one for
|
||||||
back in Chapter 2. If you were planning to make use of the LFS environment
|
<filename>/</filename> and another for <filename>/usr</filename>), mount
|
||||||
variable, <userinput>export LFS=/mnt/lfs</userinput> has to be executed
|
them like this:</para>
|
||||||
now.</para>
|
|
||||||
|
|
||||||
<para>If you decided to create multiple partitions for LFS (say $LFS and
|
<para><screen><userinput>mkdir -p $LFS &&
|
||||||
$LFS/usr), mount them like this:</para>
|
mount /dev/xxx $LFS &&
|
||||||
|
mkdir $LFS/usr &&
|
||||||
|
mount /dev/yyy $LFS/usr</userinput></screen></para>
|
||||||
|
|
||||||
<para><screen><userinput>mkdir -p /mnt/lfs &&
|
<para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
|
||||||
mount /dev/xxx /mnt/lfs &&
|
with the appropriate partition names.)</para>
|
||||||
mkdir /mnt/lfs/usr &&
|
|
||||||
mount /dev/yyy /mnt/lfs/usr</userinput></screen></para>
|
|
||||||
|
|
||||||
<para>Of course, replace /dev/xxx and /dev/yyy with the appropriate
|
<para>Now that we've made ourselves a place to work in, we're ready to begin
|
||||||
partition designations.</para>
|
assembling the temporary tools in the next chapter.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user