Creating Partitions !
Creating Partitions !


+91 9983340133, +91 9001997175


Creating Partitions !

Hello friends, I’m NIKHIL JAIN from GRRAS SOLUTION PVT. LTD. and I’m here to introduce another feature of linux which is how to create any partition in linux from hard drive.

In linux, if we want to create partition then we have to login with ROOT user because NORMAL user not have authority to deal with partition.

Now, We can create partition in our system with some following steps which are-

Step-1. fdisk -l
-> By this command, we can check that how many and which hard drive attached with our system and how many partition we have from hard drive.
-> In this command, “l” option is for listing all information about hard drive.

Step-2. fdisk (path of hard drive)
-> In this command, “fdisk” is command to create partition and “/dev/sda” is path of hard drive in which we have to create our partition with given requirement.

Step-3. Press “n”
-> When we press “n” then it give option to create partition with required type of partition like “Primary partition” or “Extended partition”.

Step-4. Press “p”
-> When we press “p” then it will select partition type “Primary partition” to create physical partition.

Step-5. Press “enter button”
-> By pressing enter button, Default partition number will assign to new partition.

Step-6. Press “enter button”
-> By pressing enter button, Default first sector of partition size will automatically assign to new partition.

Step-7. +size{ K, M, G }
-> In this step, we assign size of new partition in form of last sector, sectors or size of partition and press enter to assign size to new partition. We can assign size of partition in kilobytes, megabytes or gigabytes like +2K, +2M or +2G.

Step-8. Press “w”
-> When we press “w” then it will create a new partition with entered size of partition.

Step-9. mkfs.file_system_type (path of newly created partition)
-> By this command, we’ll format newly created partition with required file system type. In this command, mkfs is command to format or assign file system to new partition and with mkfs command, we also write type of file system and also give path of new partition.

Step-10. blkid
-> This command show uuid of formatted partitions and we have to copy newly formatted partition because we have to fill entry in “/etc/fstab” file for permanent mounting.

Step-11. vim /etc/fstab
-> Now by this command, we have to fill some entry of newly created partition because by this entry, permanent mounting will done and after reboot, partition will automatically mounted and that entry must be in following manner-

/dev/sdax_OR_UUID_of_formated_partition /mountpoint file_system_type defaults 0 0


Step-11. mount /dev/sdax /mountpoint
-> By this command, we can mount any newly created partition on any created directory but this is temporary process of mounting.
-> In “/dev/sdax”, “x” is basically a number of partition which is assigned on that time, whenever partition created.


  • Nikhil Jain, RHCSA, RHCE, CCNA

Leave a Reply

Your email address will not be published. Required fields are marked *