How can I delete all partion of my pen drive and create a single volume?

I have 8GB pendrive. The current configuration of my pendrive in shown in image. It shows 6.9 GB as a free space, 2.3 MB as a FAT drive which is shown when i open it.

I want to format drive but when I am going to format it, it shows an error message which is shown in Message.

"This partition cannot be modified because it contains a partition table; please reinitialize layout of the whole device. (udisks-error-quark, 11)"

I also tried to delete the volume and create a new volume but the message shows is

Please help me to delete all partion of my drive and create a single volume with 8 GB partion.


Well my proposed solution might sound harsh and will definitively delete everything on that pen-drive so make sure you use the right path. I write my answer now on that setup seen on your screen-shots.

Open a terminal by pressing ctrl+alt+t.

Then

# like said make sure you use the right path to your stick !! 
sudo umount /dev/sdd1
sudo dd if=/dev/zero of=/dev/sdd1 bs=4MB

Let this run for a while (it will take a moment to write zero on 8 GB doing 4 MB steps).

after that nothing should be on that drive anymore and you should be able to start over fresh.


This problem is caused caused by a low-level device tools writing blocks at the wrong size directly onto the device.

To fix this, you will have to re-write the device blocks to the appropriate size. To do this open terminal(Ctrl+Alt+T) and enter the following command

sudo dd if=/dev/zero of=/dev/sdX bs=2048 && sync

Rember to replace sdX with the actual device for your flash drive.
After doing this you can create a new partition using gparted or by terminal using
To format as fat32

sudo mkfs.vfat /dev/sdX1

To format ad ntfs

sudo mkfs.ntfs /dev/sdX1

To format as EXT4

sudo mkfs.ext4 /dev/sdX1

STEP 1: install GParted Partition Editor.

sudo apt-get install gparted 

STEP 2: open gparted and insert pendrive. Then click on Gparted > devices and select your device.

STEP 3: delete all partitions and submit.