1. List hard drives and partitions

To do this, simply use the command :

Bash

fdisk -l

In our case, we have two hard drives : - the first hard drive "/dev/sda" which was automatically partitioned at the installation of Debian. - the 2nd hard drive "/dev/sdb" which contains no partition. It's this hard drive that we will partition in this tutorial.

Then : - leave the default value for the first sector (this is where the partition will start on the hard drive) - and specify the desired size for the value "Last sector". The size can be specified in KB, in MB or in GB, but must be preceded by the character +.

2.2. Create an extended partition

An extended partition contains logical drives. Logical drives are almost identical to the partitions except that they are defined in the EBR instead of the MRB of the hard drive. Use extended partitions allows you to create more than 4 "partitions" by hard drive.

Note that extended partitions can contain only logical disks and not your data.

To create an extended partition, type "n" (new partition), and then "e" (extended partition). And leave the default partition number.

Then : - Leave the default value for the first sector (this is where the logical partition starts) - And specify the desired size for the "Last sector" value. The size can be specified in KB, in MB or in GB, but must be preceded by the character : +.