17 October, 2020
MBR -----> Master Boot Record.
P -----> primary partition
Extended -----> Extended partition
L -----> logical partition
Free -----> Free space
F disk -----> Disk partitioning utility
parted -----> Another Disk partitioning utility
Different types of disks will be having different initials in Linux
IDE drive will be shown as /dev/had
SCSI/SATA drive will be shown as /dev/sda
the virtual drive will be shown as /dev/vda
Note: The first two letters represent whether the disk is a SCSI (sd) (or) IDE (hd) disk. The third letter represents which disk it actually is If there is a number after the three letters, it is the number of the partition
To view information about the current partition layout,
#cat /proc/partitions / grep hd For IDE
#cat /proc /partitions / grep sd For SCSI / SATA
You need to view their current partitions to see if any exist.
Syn: fdik [options] [device]
Note: There are some limitations when it comes to working with partitions. You can have only four partitions to a physical disk with one exception. If you want to make more than the four, you need to create three primary partitions and one extended partition, although the primary partitions aren’t required for extended partition, creation. The extended partition can then hold 11 logical partitions (5-16) on it.
Step 1): # f disk /dev/sda
Step 2): view all the options available to you
command (m for help): m
P-----> print the partition table
n -----> add a new partition
d -----> delete a partition
m -----> print this menu
q -----> quit without saving changes
t-----> change a partition’s system-id
w -----> Write the table to disk and exit
Inclined to build a profession as Linux Developer? Then here is the blog post on, explore Linux Training
#f disk /dev/sad
First Cylinder (1-1044, default 1 ) :
Using default value 1
Last cylinder or + size ………..(1-1044,……..) : + 500M
Syn: part probe [options] [device]
a) d does not actually inform the operating system
b) s prints a summary of contents.
#parted / dev/ sda
partition type? Primary/extended/ logical?
File system type? [ex:2]?
Deleting a partition is much easier than creating one because you need to specify only the partition number that you want to delete.
:p-----> printout the current partition
:d-----> Delete a partition
:6-----> want to delete 6th partition
:w -----> write changes to disk
#part probe /dev/sda
(parted) rm 5
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .