Step 4 (Creating the /boot partition)
If you do have, "PRI/LOG Free Space ", listed in your list of partitions, make sure you have adequate space by looking at the numbers at the far right of this item; in the "Size (MB)" column. Remember to have at least 2GB since anything less limits the fun you can have with Debian. Anything above 2000.00 should be fine.
Now, assuming you have the space, we need to create several partitions. First, we need a small /boot partition. We will create this partition first, and make sure it is at the beginning of the drive (unless you have another OS installed). We do this by highlighting the "PRI/LOG Free Space " partition using the up and down arrows, and selecting [New] from the menu at the bottom of the screen using the left and right arrows.
You will notice the menu at the bottom of the screen has now changed. It has three items, [Primary], [Logical], and [Cancel]. Select [Primary] and press Enter.
Next, it will ask you to enter a size for the new partition. At the "Size (in MB):" prompt, enter the number 10.
Next, you will be presented with a new menu, [Beginning], [End], and [Cancel]. Select [Beginning] and press Enter.
The partition we just created will hold the boot information. By creating this partition (at least on a drive without another OS on it), we ensure that the boot information will never reside above the 1024th cylinder.
We now must make this new partition bootable. To do that, highlight the partition you just created and select the [Bootable] option from the menu at the bottom of the screen.
Step 5 (Creating the Swap Partition)
Next, we need to create the swap partition. The usual method for doing this is to create a partition that is double the amount of RAM on your machine in size. For example, if you have 128MB of RAM, you would want to create a swap partition that is 256MB in size. I only follow this formula up to 256MB of RAM. If I have more than that, I just make my swap partition 512MB in size.
To create the swap partition, highlight "PRI/LOG Free Space " in your partition list and select [New], then [Primary], and then enter the size of your swap file using the method mentioned above to calculate the correct size. For example, enter the number "256" if you have 128MB of RAM. Next you will need to select [Beginning], and then you will be back at the main menu.
Now you need to set the filesystem of this partition to Linux Swap, or Linux can't use it as a swap partition. To do so, highlight the partition you just created (the Linux partition that does not have the BOOT flag set), and select [Type] from the menu at the bottom of the screen.
Once you press Enter on the [Type] menu, you will be presented with three columns of hexadecimal values followed by a description. If you look towards the bottom of the middle column, you will see "82 Linux Swap". 82 is the hex value we need to choose during this step in order to make our swap partition work. We cannot actually enter this value on this screen, however, so follow the directions at the bottom of this screen, and "press any key to continue".
On the next screen, you will see three columns of filesystem types again, and at the bottom of the screen you will see the prompt "Enter file system type:" with a default value of 82, which is exactly the number we need to enter. Just press the Enter key here to input the value 82. You should now be back at the main menu.
Look at the partition list, and notice that the smaller of your Linux partitions has an FS Type (filesystem type) of "Linux", and has its boot flag turned on, and the larger of the partitions now has an FS Type of "Linux Swap".
Step 6 (Creating the root partition)
There are many other partitions that you could create, which I will describe briefly below. However, to keep things simple, I am going to only create one more partition; the root partition.
To create the root partition, highlight "PRI/LOG Free Space " in the partition list again, and select the [New] menu, then select [Primary], then accept the default size at the "Size (in MB):" prompt (it should be the remaining free space on your hard drive). Now you will be back at the main menu.
Step 7 (Writing the partition changes to the disk)
You have now created all your partitions. However, they have not been written out to the hard drive yet. To write your changes to the hard drive, you must select [Write] from the menu at the bottom of the screen.
Once you have selected [Write], you will see the following prompt, "Are you sure you want to write the partition table to disk (yes or no):". At this prompt you should type "yes" (just typing 'y' wont work), and press the Enter key. There will be a brief pause as the partition table on your hard drive is updated, and then you will be returned to the main cfdisk menu again.
Step 8 (Identify the partitions)
You have now finished creating the partitions and writing them out to your hard drive. Before we exit the cfdisk program, however, we need to prepare in advance for the next step in the install process. Once we exit cfdisk, we will be asked to identify our partitions so Linux knows how to access them. We wouldn't want a 10GB boot partition and a 10MB root '/' partition, or Linux won't install. Therefore, we need to write down which partition will be the boot partition and which will be the root (Debian's installer takes care of the swap partition automatically). For example, in my installation, I have a small boot partition at /dev/hda1 and a large root '/' partition at /dev/hda3 (although they are not actually called that yet).
Once you have identified each partition, select [Quit] from the menu at the bottom of the screen.
A note on partitions: As I mentioned earlier, there are many different ways to partition your machine for running Linux. Here we did a very simple partitioning, which will work fine for most users. However, there are other partitions you may wish to create in the future. Here are a few examples:
Why would you want to create these other partitions? Well, for example, Linux stores log files under the /var directory, and the Debian apt package manager program caches downloaded packages there as well. If you install Linux as we did, using just a root '/' partition, it is possible for someone to attack your machine and fill your root filesystem up with logs in the /var directory and bring your system to a screeching halt. If, on the other hand, you have a separate /var partition, they will only be able to fill that partition up and your root '/' partition will be safe.
I usually create a separate /home partition as well in order to keep my personal files sequestered from the rest of the system.
The /usr directory is where programs are installed. I place my /usr directory in a separate partition if I am spanning two hard drives. I'll put my /boot, /, /home and /var partitions on one drive, and the /usr partition on the other.
Many Linux books will go into excruciating detail about these directories/partitions if you'd like to read more about it.
- "Introduction and how to get hold of Debian"
- "Getting to the main installation"
- "Going through the main installation cycle - Part I"
- "Going through the main installation cycle - Part II"
- "Going through the main installation cycle - Part III"
- "Going through the main installation cycle - Part IV"
- "System Configuration - Part I"
- "System Configuration - Part II"
- "Installing XFree86 - Part I"
- "Installing XFree86 - Part II"
- "Synaptic, Mozilla, Conclusion"