HOW TO DELETE A PARTITION IN LINUX

In this tutorial we are going to learn how to delete a partition.

follow these steps :

IF YOUR DISK IS MOUNTED WE HAVE TO UNMOUNT IT FIRST.

  • df -h   ( to check where your disk(sd5) is mounted )
  • #umount   /linux    ( unmount your folder where your disk is mounted )
  • To check how many partition we already have.
[root@localhost ~]# fdisk -l

Disk /dev/sdc: 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/sdc4               1        1634    13125073+   5  Extended
/dev/sdc5               1          62      497952   83  Linux
/dev/sdc6              63         160      787153+  83  Linux
  • Now we will delete partition.
[root@localhost ~]# fdisk /dev/sdc

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): d
Partition number (1-6): 6


Command (m for help): d
Partition number (1-5): 5


Command (m for help): p
Disk /dev/sdc: 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/sdc4               1        1634    13125073+   5  Extended


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

#partprobe  (to save)

CHECK OUT MY VIDEO .

HOW TO CONFIGURE RAID OVER LVM

HOW TO CONVERT YOUR DRIVE FROM FAT32 TO NTFS WITHOUT DATA LOSS

HOW TO CREATE UNDETECTED VIRUS

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