We already learned from "Structure of a hard disk " what partitions are used for; and you initially set up your partitions during the installation process. DiskDrake allows you, to some extent, to resize your partitions, move them, etc.
![]() | DiskDrake is a very powerful, and therefore dangerous tool. Misuse of it can very easily lead to data loss in your hard drive. Consequently, you are advised to take some protective measures before using it:
|
DiskDrake enables you to configure each physical hard drive on the machine. If you only have one IDE disk, you will see a single hda tab below the filesystem types. This tab is in fact repeated for each hard drive, reproducing the Linux name of that drive. The tool available here allows you to control the partitioning of each drive.
The window (figure 16-28) is divided into four zones:
on the top. The structure of your hard drive. When you launch DiskDrake it shows the current structure of the drive, and is modified in real time when you modify your partitions. Note however that changes are not made effective on the drive until you press the
button;on the left. A menu relevant to the partition currently selected in the above diagram.
on the right. A description of the selected partition.
at the bottom. Buttons for taking general actions. Note that the
button allows you to access expert (even more dangerous) functions.This is what the current /home partition looks like (figure 16-29), before any modification. We chose to shrink this partition in order to create the new one on the free some space.
![]() | In order to perform this example, you must log directly as root, not using your user account. |
First of all, you need to unmount the /home partition by selecting it, then pressing the
button.As you may have guessed, just click on the figure 16-30), in which you will choose a new size for that /home partition.
button. A dialog will appear (When this is done, you will notice that the graphic representation of your hard drive has changed. The /home partition is smaller, and an empty space appears on the right. Click on that empty space and then on the figure 16-31) where you can choose the parameters for the new partition pops up. Change the start sector if you want to leave a new free space between the /home and /home/ftp partitions. Define the needed size, choose the filesystem you want (generally Linux native) and then enter the mount point of that partition, in our case /home/ftp.
button that just appeared. A dialog (This is what our projected partition table looks like now (figure 16-32).
![]() | Up until now, we did not really modify the partition table, we just redesigned and rejected it. Further steps will effectively make our changes active, so if you do not intend to modify your system, click on the button until you come back to the beginning. |
You finally need to format (prepare to host files) the newly created partition: click on it, then on the
button. Confirm the writing of the partition table, and then the formating of the partition. You may be asked to reboot the computer to make changes effective.Among many available features, the save and restore from file is one of the more interesting ones. It allows you to save the current partition table to a file on a disk (floppy for example) and then restore it in case you totally messed up your partition table. It can prove useful as long as you do not reformat partitions, otherwise data will be lost.