Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node68.html
2024-02-19 00:23:35 -05:00

154 lines
8.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>2.2.3 Linux partition requirements</TITLE>
</HEAD>
<BODY>
<meta name="description" value="2.2.3 Linux partition requirements">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html2561 HREF="node69.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html2559 HREF="node65.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html2553 HREF="node67.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html2563 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html2564 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html2562 HREF="node69.html">2.2.4 Repartitioning your drives</A>
<B>Up:</B> <A NAME=tex2html2560 HREF="node65.html">2.2 Preparing to Install </A>
<B> Previous:</B> <A NAME=tex2html2554 HREF="node67.html">2.2.2 Repartitioning concepts</A>
<BR> <HR> <P>
<H2><A NAME=SECTION00423000000000000000>2.2.3 Linux partition requirements</A></H2>
<P>
<A NAME=secinstallswap>&#160;</A>
<A NAME=secinstalllinuxreqs>&#160;</A>
<P>
Before we explain how to repartition your drives, you need to have an
idea of how much space you will be allocating for Linux. We will be
discussing how to create these partitions later, in
Section <A HREF="node73.html#secinstalllinuxfdisk">2.3.3</A>.
<P>
On UNIX systems, files are stored on a <b>filesystem</b>, which is
<A NAME=1022>&#160;</A>
essentially a section of the hard drive (or other medium, such as CD-ROM
or diskette) formatted to hold files. Each filesystem is associated with
a specific part of the directory tree; for example, on many systems,
there is a filesystem for all of the files in the directory <tt>/usr</tt>, another
for <tt>/tmp</tt>, and so on. The <b>root filesystem</b> is the primary
filesystem, which corresponds to the topmost directory, <tt>/</tt>.
<A NAME=1027>&#160;</A>
<A NAME=1028>&#160;</A>
<P>
Under Linux, each filesystem lives on a separate partition on the hard
drive. For instance, if you have a filesystem for <tt>/</tt> and another
for <tt>/usr</tt>, you will need two partitions to hold
the two filesystems.
<P>
Before you install Linux, you will need to prepare filesystems for
storing the Linux software. You must have at least one filesystem (the
root filesystem), and therefore one partition, allocated to Linux.
Many Linux users opt to store all of their files on the root filesystem,
which is in most cases easier to manage than several filesystems and
partitions.
<P>
However, you may create multiple filesystems for Linux if
you wish---for example, you may want to use separate filesystems for
<tt>/usr</tt> and <tt>/home</tt>. Those readers with UNIX system administration
experience will know how to use multiple filesystems creatively. In
Chapter <A HREF="node155.html#chapsysadmnum">4</A> we discuss the use of multiple partitions
and filesystems.
<P>
<A NAME=1034>&#160;</A>
Why use more than one filesystem? The most commonly stated reason is
safety; if, for some reason, one of your filesystems is damaged,
the others will (usually) be unharmed. On the other hand, if you store
all of your files on the root filesystem, and for some reason the
filesystem is damaged, then you may lose all of your files in one fell
swoop. This is, however, rather uncommon; if you backup the system
regularly you should be quite safe.<A NAME=tex2html239 HREF="footnode.html#1035"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>
<P>
Another reason to use multiple filesystems is to divvy up storage between
multiple hard drives. If you have, say, 40 megabytes free on one hard drive,
and 50 megabytes free on another, you might want to create a 40-megabyte root
filesystem on the first drive and a 50-megabyte <tt>/usr</tt> filesystem on the
other. Currently it is not possible for a single filesystem to span multiple
drives; if your free hard drive storage is fragmented between drives you
will need to use multiple filesystems to utilize it all.
<P>
<A NAME=1037>&#160;</A>
In summary, Linux requires at least one partition, for the root filesystem.
If you wish to create multiple filesystems, you will need a separate
partition for each additional filesystem. Some distributions of Linux
automatically create partitions and filesystems for you, so you may not need
to worry about these issues at all.
<P>
Another issue to consider when planning your partitions is swap space.
<A NAME=1038>&#160;</A>
If you wish to use swap space with Linux, you have two options. The
first is to use a <em>swap file</em> which exists on one of your Linux
filesystems. You will create the swap file for use as virtual RAM after
you install the software. The second option is to create a
<em>swap partition</em>, an individual partition to be used only as swap
space. Most people use a swap partition instead of a swap file.
<A NAME=1041>&#160;</A>
<P>
A single swap file or partition may be up to 16 megabytes in size. If
you wish to use more than 16 megabytes of swap, you can create multiple
swap partitions or files---up to eight in all. For example, if you need
32 megabytes of swap, you can create two 16-megabyte swap partitions.
<P>
Setting up a swap partition is covered in
Section <A HREF="node74.html#secinstalllinuxmkswap">2.3.4</A>, and setting up a swap file in
Chapter <A HREF="node155.html#chapsysadmnum">4</A>.
<P>
Therefore, in general, you will create at least two partitions for Linux:
one for use as the root filesystem, and the other for use as swap space.
There are, of course, many variations on the above, but this is the
minimal setup. You are not required to use swap space with Linux, but if
you have less than 16 megabytes of physical RAM it is strongly
suggested that you do.
<P>
Of course, you need to be aware of how much <em>space</em> these partitions
will require. The size of your Linux filesystems (containing the software
itself) depends greatly on how much software you're installing and
what distribution of Linux you are using. Hopefully, the documentation
that came with your distribution will give you an approximation of the
space requirements. A small Linux system can use 20 megabytes or less; a
larger system anywhere from 80 to 100 megabytes, or more. Keep in mind that
in addition to the space required by the software itself, you need to
allocate extra space for user directories, room for future expansion, and
so forth.
<P>
<A NAME=1045>&#160;</A>
The size of your swap partition (should you elect to use one) depends on
how much virtual RAM you require. A rule of thumb is to use a swap partition
that is twice the space of your physical RAM; for example, if you have 4
megabytes of physical RAM, an 8-megabyte swap partition should suffice.
Of course, this is mere speculation---the actual amount of swap space
that you require depends on the software which you will be running. If you
have a great deal of physical RAM (say, sixteen megabytes or more), you
may not wish to use swap space at all.
<P>
<b>Important note:</b> Because of BIOS limitations, it is usually not
possible to boot
from partitions using cylinders numbered over 1023. Therefore, when
setting aside space for Linux, keep in mind that you may not want to use
a partition in the <b>&gt;</b>1023-cylinder range for your Linux root filesystem.
Linux can still <em>use</em> partitions with cylinders numbered over
1023, however, you may not be able to <em>boot</em> Linux from such a
partition. This advice may seem premature, but it is important to
know while planning your drive layout.
<P>
If you absolutely must use a partition with cylinders numbered over
1023 for your Linux root filesystem, you can always boot Linux from floppy.
This is not so bad, actually---it only takes a few seconds longer to boot
than from the hard drive. At any rate, it's always an option.
<P>
<BR> <HR><A NAME=tex2html2561 HREF="node69.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html2559 HREF="node65.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html2553 HREF="node67.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html2563 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html2564 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html2562 HREF="node69.html">2.2.4 Repartitioning your drives</A>
<B>Up:</B> <A NAME=tex2html2560 HREF="node65.html">2.2 Preparing to Install </A>
<B> Previous:</B> <A NAME=tex2html2554 HREF="node67.html">2.2.2 Repartitioning concepts</A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>