HOW TO CREATE A PARTITION IN LINUX

In this tutorial we are going to learn how to create a partition in linux.

To create a partition  follow these steps:

  • To check
[root@localhost ~]# fdisk -l     

Disk /dev/sdd: 13.4 GB, 13445111808 bytes
255 heads, 63 sectors/track, 1634 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdd4               1        1634    13125073+   5  Extended
/dev/sdd5               1          62      497952   83  Linux
/dev/sdd6              63         124      497983+  83  Linux
Disk /dev/md0: 509 MB, 509804544 bytes
2 heads, 4 sectors/track, 124464 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
  • Now we will create
[root@localhost ~]# fdisk /dev/sdd
The number of cylinders for this disk is set to 1634.
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): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (125-1634, default 125):
Using default value 125
Last cylinder or +size or +sizeM or +sizeK (125-1634, default 1634): +800M


Command (m for help): p
Disk /dev/sdd: 13.4 GB, 13445111808 bytes
255 heads, 63 sectors/track, 1634 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdd4               1        1634    13125073+   5  Extended
/dev/sdd5               1          62      497952   83  Linux
/dev/sdd6              63         124      497983+  83  Linux
/dev/sdd7             125         222      787153+  83  Linux


Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

#partprobe (to save )
  • NOW IF YOU WANT TO USE THAT PARTITION WE HAVE TO MOUNT IT

[root@localhost ~]# mkdir    /linux ( to create a folder where we will mount )
[root@localhost ~]# mount    /dev/sdd5      /linux/     ( to mount newly created partition to use it).

[root@localhost ~]# df -Th    ( to check whether its been mounted or not )
Filesystem    Type    Size     Used    Avail   Use%  Mounted on
/dev/sdad5     ext3    500M  5.6M  455M     4%       /linux

CHECK OUT MY VIDEO . IF YOU GOT ANY PROBLEM

HOW TO DELETE A PARTITION IN LINUX

RAID6 AND ITS COFIGURTION

HOW TO HIDE A FILE IN LINUX

11 thoughts on “HOW TO CREATE A PARTITION IN LINUX

  1. I have been surfing online greater than three hours these days, but I never discovered any
    attention-grabbing article like yours. It’s beautiful price
    enough for me. In my view, if all website owners and bloggers made good content as you did, the web can be much more useful than ever before.

    Like

  2. Normally I do not read post on blogs, but I wish to say that this writeup very compelled me to try and do it! Your writing style has been surprised me. Thanks, quite great article.

    Like

  3. Pretty nice post. I just stumbled upon your
    blog and wished to say that I’ve really enjoyed browsing your blog posts.
    After all I will be subscribing to your rss feed and I hope you write again very soon!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s