Disk Drive Partitioning with RedHat Linux 6.0
(Copyright Jerry Winegarden, WCE, 1999)
BEFORE YOU INSTALL - questions to answer
1) What do you have already installed on your computer? More
specifically, what is your current partitioning? Do you have more than
one disk drive? Are they IDE drives or SCSI?
If you don't know the answers to these questions, it's OK. The
instructions below will give you a cookbook to follow. However, if you
know the answers to those questions, the installation may be easier for
you.
Ready for the INSTALLATION COOKBOOK
(In the following instructions, you will need to use the arrow keys to
select a choice at some questions, hit TAB key for others, hit ENTER to
accept the choice. Your mouse won't work until after the system
restarts.) Also, ==> will mean "select" or "type-in" the value or the
"button" mentioned after the "arrow".
Disk Drive setup is next. LINUX, wants the hard drives
organized into separate pieces called "partitions".
If you already have Microsoft Windows 95/98/NT installed
on your PC, then there are already some (at least one)
partition defined on your disk drive. The LINUX
installation will ask you which tool you want to use to
create the LINUX disk partitions and then it will have
you use that tool to create those partitions. If you
already know what partitions you want to use, that's
fine. If not, we will suggest what to use.
Disk Setup
Which tool would you like to use to partition your hard drive
for LINUX?
==> Disk Druid fdisk
(Note: if you know how to use fdisk, go ahead. However, Disk Druid is
much simpler and thus much quicker than fdisk. Unless your
disk partitioning needs to be extremely complicated, you are better off
using Disk Druid.)
Disk Druid now displays your current disk partition information.
Linux requires at least 3 partitions ("/boot","/",and "swap"), but you
will want to create 5 linux partitions ("/boot","swap","/usr","/","/home")
(note: you may consider adding a sixth partition: "/usr/local" as a
location to install software that doesn't come with the original Linux
installation (linux will install all of it's stuff into "/" and "/usr").
Then, if you want to do a re-installation of linux (e.g. a totally
different version), you don't have to remove the other stuff in /home,
/usr/local, since those are not automatically created by a linux
installation.
If you are a more experienced user or setting up a more complicated
system such as a web server - then use about 7 Linux partitions:
"/boot","swap","/usr","/","/home", "/usr/local","/var").
You will be guided through the process of creating these partitions
using the Disk Druid, with suggested sizes for each of these partitions.
Disk Druid Disk drive partition information display looks like:
Current Disk Partitions
Mount Point Device Requested Actual Type
hda1 2047M 2047M DOS 16-bit >=32
Drive Summaries
Drive Geom[C/H/S] Total Used Free
hda [784/255/63] 6194M 6141M 8M [##########]
ADD EDIT DELETE OK BACK (buttons)
To accomplish the task, use the TAB key to cycle through the function
choices and to select a disk drive or a partition to perform the
function on. If you only have one disk drive, you don't have to worry
about selecting the correct drive; if you have more than one hard disk
drive, they will show up in the Drive Summaries List. To Add, Edit, or
Delete partitions, you have to first select the disk drive (unless you
have just one drive). To Edit or Delete, you have to first select the
Partition you want to edit or delete. To add, if doesn't matter what
partition you have selected. Use TAB to "get up into" the partition and
drive information area of the display (as opposed to selecting a button
to push). Then use the arrow keys to move up and down through the
partition information table. Remember that if there are sufficient
number of partitions, you may have to scroll up and down in through the
table. Also, if you are creating a partition, but give incorrect
information (e.g. not enough space left for the amount you requested),
you will get an error message, BUT THE PARTITION GETS CREATED ANYWAY. To
change it, select it, then tab down to Edit and make the change, or
select it, then tab down to Delete (and then re-add it back correctly).
If you have IDE disk drives (most PC's have IDE drives), your disk
drives will have the names: hda (1st IDE drive), hdb (2nd IDE hard
drive). If you have any SCSI disk drives, they will be referred to in
the Disk Druid partition information table as: sda (1st SCSI disk
drive) and sdb (2nd SCSI hard disk drive).
There are a few different types of PC disk partitions (which you may
know if you've used the DOS fdisk partitioning tool to make partitions
for Windows.) You can have up to 4 "primary" partitions. In addition,
there can be one "extended" partition. This "extended" partition
doesn't really hold anything itself. It just gets subdivided into
additional partitions called "logical" partitions ("logical drives" in
DOS lingo). There can be up to 12 "logical" partitions. Thus you can
really have up to 16 (4 + 12) partitions. In practice you won't have
anything near that.
If you already have Windows 95/98 installed, then you will have at least
one partition already created, which is what you see in the sample
partition table above, listed as Device "hda1". This means that the
1st primary partition of the first IDE hard drive is a partition
(of size 2 GB, with Windows installed in it: Type = DOS 16-bit>=32)
Windows/DOS would refer to this first partition as C:; the next DOS
(Windows) partition that it sees would be known by Windows as D:, and
so forth. Your disk drive may already by partitioned into 2 GB pieces.
In that case, in My Computer, you see C:, D:, E:, and so forth. You
may actually be using D: and even E: for Windows files. If you are not,
or if you don't care about E: or even D:, then those partitions can be
removed and the space used for Linux partitions. If you want to
continue to use D: and E: for windows stuff (a place to store you
mp3 files, e.g.) that's OK. Windows partitions can be accessed from
Linux and Windows, depending on which operating system you've booted.
If you have additional Windows partitions (D:, E:,...) they will show
up as device hda2, hda3, ...You may even already have an hda5 created
(the first logical drive). The Disk Druid can be used to Delete any of
these already existing DOS partitions. (It can even be used to create
new ones). Thus, you can delete any old Windows partitions you're not
using. If you're not sure, leave it alone. Your existing Windows
partitions are safe. You won't touch them! (Well if you're drunk and not
careful,...but then you can do worse with Windoze ;-)
The Disk Druid is used to create Linux partitions, too.
When a partition is Added, by default, Disk Druid will create it as
device name hda5, hda6, ... (starting with the 1st available logical
partition). Thus it's easy to keep track of your Windows partitions
and your linux partitions. Let the Disk Druid do its thing.
What about sizes for each partition? We have some recommendations, but
they depend on how much space you have available for installing Linux.
If you have 1GB or less free, you will need to make some (downward)
adjustments to the partition sizes. If you have 2GB or more, then the
following recommended partition sizes will work. They can also be
adjusted upward if you have more available. There are many opinions as
to the "perfect" partitioning of a drive under Linux, but in reality
there is no perfect way to do it. The recommendations below should work
for most people. If you decide later that you need more space in one
partition and can give up space from another, it is possible, although
not necessarily without pain, to be able to temporarily move files out
of the way, delete and re-add a partition or two with larger or smaller
sizes. However, if is not something done routinely (unless you want
to just start all over again three months from now when you've started
to know a little bit about what you want to do with Linux on your
computer. So, it is best to plan ahead here. In the recommendations
below we'll present estimated minimums required. In a few cases,(e.g.
if you have less than 1 GB of free space available for Linux) it
might be best to simply have the 3 required partitions ("/boot"=16MB,
"swap"=128MB (if you have 64MB or more of RAM; "swap"=64MB if you have
less;"/"="all the rest").
Recommended Linux partitions and sizes:
Small system (<=32MB RAM), not much free disk space (<2GB):
Mount_point Size(in MB) Partition_Type Grow_to_fill?
/boot 16 Linux native
swap 64 Linux swap
/ 100 Linux native *
(you will need more than 100 MB to install the normal stuff, but if
you specify 100 MB and then Grow to fill, you will get all the rest
of the available space.)
The above partitioning is what you get if you specify that you
want to do a "Workstation" install instead of a "Custom"
(you also won't have a choice of software packages).
This partitioning is ok if you just want to learn a little bit about
Linux. Sometime later, when you've learned more, you may want to
repartition (but you might as well re-install).
The one suggested modification to the above: add one more partition:
/home 500MB Linux native
Note: use 500 MB or whatever you think you can spare. This will be used for
user's home directories. This partition doesn't need to be touched
when a re-installation or re-partioning is done later.
Also, remember, if you have Windows already installed, you will leave
it's partition(s) alone.
For most systems, recommended Linux partitions and sizes:
Mount_point Size(in MB) Partition_Type Grow_to_fill?
/boot 16 Linux native
swap 128 Linux Swap
/usr 1000 Linux native
/ 500 Linux native
/home 500 Linux native *
(you could also add:
/usr/local 500 Linux native)
The above sizes assume that you have a little over 2 GB free.
If you don't, then adjust the size of / and /home down, perhaps 500MB
each. usr could be a little smaller, (but if you installed everything
available it would be almost 1 GB (1000 MB)). If you have more space
available (and you don't want it ALL to go to /home (with Grow_to_fill))
then give more to / or /usr.
The device name will be automatically created by the Disk Druid. Let it be!
It will be the next available logical drive. Thus the partitions will
be: hda5, hda6, hda7, ...
(remember to scroll down to see the whole list after it's created a few).
OK, time to use the Disk Druid.
First, Select and DELETE any unnecessary or unwanted partitions.
(Tab until a line in the table is "highlighted" ("selected") (you are
now "up in the table"; use the arrow key to move between partitions
selected - i.e. move the "highlighted line" on top of the partition you
want to Delete (or Edit). With the appropriate line selected, then TAB
to highlight the "Delete" button. (Note: TAB key does not change the
partition and drive selected; it changes between "buttons". Likewise,
the arrow key does NOT get you from the buttons up into selecting
partitions; the arrows simply move up and down through the list of
partitions.
Next, ADD partitions. To Add a partition, just TAB to "Add" button,
and hit . (Note: if you have more than one physical disk drive,
you will see more than one Disk drive show up in the Drive Summary table
(below the Partition Information Table, above the buttons); you must
select the correct disk drive to Add to first, or the partitions will
get added to the one that is selected already. To select a drive,
TAB to "select mode", move highlighted line down to the appropriate
drive using the arrow key). After TAB to "Add" button, and hit ""
key to Add, the Add partition Window will open up.
There are four "fields" in this Window to be filled in, with the OK
button to be "pressed" when info is correct and ready to be added.
Use TAB key to go between these fields. Use arrow keys to move up and
down the list of "File System Types" (Linux native, Linux swap are the
only two you will use and Linux native should be the default). The
device name (partition name such as hda5) will be filled in
automatically. The four fields are: "Mount point", "Size (in MB)",
"Grow to Fill Available space []", and "Type" (a list to choose from).
Leave the "Grow to Fill" blank for every one except the last one you
add. For that one, tab to the field and hit the SPACE bar to have a
"*" show up there (meaning, "Yes"). The "size" should be specified in
Megabytes (MB) (remember, 1000 MB = 1 GB). The default size is 1 MB,
in case you forget to change this field and the partition gets created.
(If this happens, select the partition, TAB to Edit, and tab to the
size field and change it (to 500 or 128 or 1000 or 2000,...))
The "Mount Point" is the Linux directory name that it will be the
"top" (or "root") of the directory (upside-down) tree structure in
that partition. (There are separate trees in each file system in Linux.
Each partition has a separate file system created in it.)
The "mount point" is just the full path name of the directory that will
be the start of the file system in that partition. In the discussion above,
we used "/boot", etc, but you never specify things with quotes in the
names that way in linux and you don't do it here. Instead, for Mount Point
you will specify:
/boot
swap
/usr
/
/home
When you are done adding partitions, then TAB to OK
and you will go on to the next phase of the installation.