partition | mountpoint | options | size (MB) | comments |
---|---|---|---|---|
P1 | /boot | noatime notail |
128 | minimum: 50 MB |
P2 | (extended) | P2 contains all other partitions | ||
E5 | / | noatime notail |
256 | (This is a File System Hierarchy specification) |
E6 | /usr | noatime notail |
512 | (This is an OpenNA specification) |
E7 | /chroot | noatime notail |
256 | (This is an OpenNA specification) |
E8 | /var | noatime notail |
512 | (This is an OpenNA specification) |
E9 | /tmp | noatime notail noexec nosuid |
512 | (This is an OpenNA specification modified for ServerAtSchool) |
E10 | (swap) | defaults | 512 or 1024 | 512 MB if RAM <= 512 MB, 1024 MB otherwise. (This is an OpenNA specification modified for ServerAtSchool) |
E11 | /var/lib | noatime notail |
33% of remaining space | (This is a ServerAtSchool specification) |
E12 | /home | noatime notail |
67% of remaining space | (This is a ServerAtSchool specification) |
You can use this scheme as a starting point for your own scheme. It is a good idea to take some time to consider the effects of the choices you are about to make. It is not so easy to change the size of partitions once the disk is partitioned.
One reason to split the disk in so many different partitions is to ensure
that the system itself will not stop working if some runaway
process causes the message No space left on device
to appear in the logfiles or on the console, i.e. after completely filling the
/home
partition or the /tmp
partition with data.
Another reason to use different partitions is to allow for different
options. As you can see in the table above, two of the partitions have extra
options (besides noatime
and notail
).
The /tmp
and /home
partitions do not honour
the set-userid-bit in file permissions. This is done to prevent you
(the 'root' user) from being tricked into changing the ownership of a file
which might then be executed by a regular user, using your
(root) privileges. This is a security measure.
The /tmp
partition also has the option
noexec
. This means that it is not possible to execute
binary programs located on that partition. This is done because
/tmp
is writeable by every user (by design). Writing as
such is OK, but executing programs is not.
If you simply put the entire system on a single large partition, you cannot use this fine degree of control.
partition | mountpoint | size (MB) | comments |
---|---|---|---|
P1 | /boot | 128 | |
P2 | (extended) | P2 contains all other partitions | |
E5 | / | 768 | (This is a File System Hierarchy specification) |
E6 | (swap) | 512 | |
E7 | /home | remaining space, about 8.5 GB |
Note that this scheme is far from ideal; the default ServerAtSchool scheme is much better. It is only intended to be used as an illustration of manual partitioning. You should invest some time in this subject and you should design your own partitioning scheme, tailor-made for your situation.
NOTICE:
We will be using cfdisk(8)
in the example below, because
that is the program used by the installation routine. If you
need to partition a disk later on (e.g. in section
11. REOBack in chapter
V. Configuring all ServerAtSchool
components), you can use either cfdisk(8)
or
fdisk(8)
.
We will now continue with the partitioning procedure. In the previous dialogue, you opted for manual
partitioning. When you press
the [OK]
button, the following dialogue appears:
You now have to select the target disk. In the example above, there is only a single disk available. However, there could be more disks present in the computer, in which case you would have to select the disk to use.
NOTICE:
You can find an example of a computer with three disks in section
section 7. Target drive in the
chapter III. Using the text mode installation
program.
We will be using the menu driven cfdisk(8)
program.
This program can be controlled through the cursor keys and the
[Enter]
key. You select a command by moving the highlight
with [Cursor Left]
or [Cursor Right]
and then
press [Enter]
to confirm your selection.
You can select a partition from the list of partitions using the
[Cursor Up]
and [Cursor Down]
keys.
The following commands are available.
[Bootable]
/boot
on /dev/hda1
.
[Delete]
[Help]
cfdisk(8)
program.
[Maximize]
[Print]
[Quit]
cfdisk(8)
program.
[Type]
83 Linux
. For a swap
partition you have to change the type to 82 Linux swap
.
[Units]
[Write]
Please delete any existing partitions by using the [Delete]
command. After all partitions have been deleted, or if you started
with an empty disk, you will see the following:
The cursor in the list of partitions is located on a line that says
'Pri/Log Free Space 10001.95'. This is the only line in the list. This
means that no partitions have been defined yet.
Use the [New]
command to create a new partition. The
following dialogue appears:
Here you can choose between creating a primary partition and creating a logical partition. We will be starting with the partition P1 (see the table at the top of this section). Select the option to create a primary partition. The following dialogue will be displayed:
Please enter the size of the partition (in MB). Type the number
128, then press the [Enter]
key.
NOTICE:
By default cfdisk(1)
shows you the remaining
space when defining the size of the new partition. In this example the
default remaining space is 10001.95 MB. If, instead of typing a new value,
you had simply pressed [Enter]
, you would have accepted
the default value. You can get rid of the default value by pressing
[Backspace]
or by simply starting to type the new value, 128.
The following dialogue will be displayed:
Place this partition at the beginning of the disk.
NOTICE:
Putting the partition at the beginning of the disk is especially handy
for the boot partition since some computer BIOSes have problems with
booting from a partition that is located above the 1023 cylinders
limit. By choosing a reasonable size (128 MB) and starting with this
boot partition as the first partition at the beginning of the disk
you will have no problems with this limit. If you want to make sure
that the partition is within the limit, you can use the
[Units]
command to display the size in cylinders rather
than MB's.
Use [Cursor Down]
to move the white menu bar to the line
that reads 'Pri/Log Free Space'. In the following dialogue you can see
that the first partition (/dev/hda1
) has been defined.
You should now repeat this procedure and add the second and third partitions.
The second partition should be a 'Logical' partition to be located at the 'Beginning'. The size should be 768 MB. This partition will become the root partition (also known as '/').
The third partition should also be a 'Logical' partition located at the 'Beginning'. The size should be 512 MB. This will become the swap partition.
Once you have defined the third partition, you will see the following dialogue:
Use the [Type]
command to change the
partition type. The following list of partition types will be displayed:
After pressing [Enter]
even more partition types will be
displayed:
Accept the default value of 82 by pressing
[Enter]
. This partition is indeed meant to be a swap
partition.
After this you should add one more partition. This will also be a
'Logical' partition. The partition can occupy the remainder of the
disk. You can therefore simply press [Enter]
to accept
the default size as shown in the image below.
This partition, too, should be located at the 'Beginning'.
Finally you should change the boot flag of the first partition. Move the menu bar to the first partition as shown in the image below.
Now select the [Bootable]
command. The word 'Boot' will
appear in the column labeled 'Flags'.
All partitions have now been defined. If you are satisfied with the
partition table as it is now, after perhaps checking it with
[Print]
, it is time to store the table on disk.
NOTICE:
Up to this point, nothing irreversible has been done to the disk. You
could even bail out now without changing anything on the
disk, by using the [Quit]
command.
If you are ready to save the partition table, select the
[Write]
command. If you do, the following dialogue will be
displayed:
As soon as you enter 'yes' here (not just the letter 'y' but a full 'yes'
followed by pressing [Enter]
), the new partition table
will be written to disk. When that is done, you can end the
cfdisk program by selecting [Quit]
.
You will be returned to the installation procedure.
[Quit]
command in
cfdisk(8)
ended the program. The following dialogue will now be displayed:
Press the [OK]
button to proceed. The swap partition that
was detected will now be formatted automatically. After a brief message to
that effect the following dialogue will be displayed:
Press the [EXIT]
button. The following dialogue will be displayed:
Here you must select the partition that will be used as the root
partition (also known as '/'). In this example /dev/hda5
will be the root partition. Select the correct partition and press the
[OK]
button to continue. The following dialogue will be displayed:
Here you should choose the 'slow' format with a check for bad blocks.
NOTICE: This so-called 'slow' format usually is not so very slow. Furthermore, the extra minutes (or maybe hours) spent now are insignificant compared with the uptime you hope to get (a year or even more). It is a good idea to check for bad blocks. Hard disks are imperfect mechanical devices. It is better to learn that a disk is bad during installation than to have it fail when the server is in full production.
Press the [OK]
button to confirm your choice. The
following dialogue will be displayed:
Select the file system you want to use on the partition. ReiserFS is
highly recommended but you are free to choose another one. Press the
[OK]
button to confirm your choice. Formatting of the
disk will begin.
During format a message will appear on screen that the partition is being formatted. After formatting, another message box will appear to inform you that the root file system has been mounted. After that the following dialogue will be displayed:
This dialogue shows that other Linux partitions were detected.
Select the partition /dev/hda1
and format it like
you did with the root partition, i.e. using a 'slow' format and
ReiserFS. When this partition is ready, the following dialogue will be
displayed:
In this dialogue you should specify the mount point for this
partition. From the table at the top of section 3. Partitioning with cfdisk above, it follows that this
partition is to be mounted at /boot
.
Please enter /boot
as the mountpoint and press the
[OK]
button to proceed.
Repeat the procedure of 'slow' formatting and ReiserFS for the
remaining partition, using the mount point /home
.
NOTICE:
This procedure can be repeated for all partitions that were detected,
even partitions that happen to exist on other disks. However, you do
not have to assign all partitions at this point. If you
select the option --- (done adding partitions,
continue with setup)
, you will leave the partitioning loop to proceed with
the next step.
NOTICE: If the second and third disks in the server have not yet been partitioned, they will not show up in these dialogues. You will have to perform the partitioning and formatting operations manually at a later stage. See sections 11.1 Creating a backup partition and mount point and 11.5.1 Preparing the buddies partition in chapter V. Configuring all ServerAtSchool components.
When all this is done, the folllowing dialogue with an overview of the defined partitions will be displayed:
At this point you can press the [EXIT]
button in order to
proceed. The installer will now continue with the
regular installation procedure and ask you which server to
install. This is shown below.
You will now be presented with the same list of options you would have been shown if you had chosen automatic partioning, for you to make your choice of server type.
NOTICE: By following the manual partition procedure as described in this appendix, you will be skipping section 7. Target drive, as that part will have been taken care of by the manual partitioning and formatting procedure.
NOTICE:
Due to the way this procedure for manual partitioning is implemented,
it is not possible to optimise the various options in the file system
table fstab
. Two standard options have been
added (noatime
and notail
) but if you require
other options you should add them later, after the server has been
booted for the first time.
You can now continue with the procedure in section 6. Type of installation (SAS) in chapter III. Using the text mode installation program.
Author: Peter Fokker <peter (at) berestijn.nl> $Id: partitioning.html,v 1.9 2006/03/31 18:16:08 peter Exp $