how to partition a hard disk in LinuxFollow @ggarron
If you got a new disk and want to use it in Linux, you will first need to partition it and then to format it, this how to will show you how to partition it, the next one will show you how to format the Linux disk
First you should know if you are using an (P)ATA or SATA disk or maybe even SCSI or USB, well the first one is identified by hdX where X is letter that will differentiate one drive from other. SATA, SCSI or USB are identified as sdX, we will use
fdisk to create the partition on our drive.
Time to start, type:
sudo fdisk /dev/hda
Be sure to replace hda with the corresponding id of your disk.
You will something like this:
laptop:~# fdisk /dev/hda The number of cylinders for this disk is set to 4864. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help):
You can press now p to print the current partition table, now if you want to delete the partition press d and you will be asked for the partition number
Command (m for help): d Partition number (1-5)
Once you have deleted all partitions (if you want), you can create the new one (If it was a new disk, you can start from here).
To create a new partition press n, and you will be asked to create a primary or extended, and if there is an Extended partition you will be have also the option to create a logical partition, if it is an empty disk you will have to create a primary, as logical should be on an extended partition, so press p, and you will be asked for a partition number, press 1, if there is a partition already, press 2, and so on, till 4, because only for primary partition could exist on a drive, then you will be asked, where the partition will start (the first available cylinder is the default) so press enter, the you will be asked where the partition ends, (the maximum size is the default) so you can once again press enter or enter the size like or use the options you are given:
Last cylinder or +size or +sizeM or +sizeK
Now you have created the partition is time to format it.