I'm using Kali Linux x64 2017. When I insert USB flash drive (16 GB) computer can't recognize it. I want to format it and erase all data. I've already tried on Windows and the problem is same (usb flash drive is not recognized). I suppose the problem started when I tried to create bootable usb with persistency and I accidentally changed filesystem to ext4.

Is there any possible way to reformat it back to FAT32 or NTFS format? In Kali Linux, when I enter "Disks" see the pictures below: enter image description here

It says "no media". When I click on settings, all options are gray except one (see picture below):

enter image description here

And the I enter "Edit mount options" (see picture below): enter image description here

Is possible to retrieve USB flash drive to FAT32 or NTFS format? I don't need to keep data, I only want to format it to FAT32 or NTFS format?

This is answer to @foobaru: The output is too long to put it here so I will post a link:
For dmesg: https://pastebin.com/85wXCN3b
For fdisk -l: https://pastebin.com/656mA7Dv

When I try to reformat to FAT32 I can't find the device name: enter image description here

4 Answers 4


The (no media) indication may mean that the flash memory is worn out: the flash memory controller built into the flash drive is detecting that the actual flash memory is no longer in usable condition, and it reports this to the computer in the same way a USB-connected CD-ROM drive would report that there is no disc in drive.

You would need special diagnostic software (probably available only from the flash memory controller manufacturer) to override the "no media" indication.

If you aren't a hardware hacker, throw it into trash. If it contained private data, put it into a plastic bag and then hit it with a hammer a few times first (the bag is there to contain the shrapnel).


When you plug in the device, useful information might be output to dmesg.

I'd check out the partition table (if you have one) with fdisk or, if you prefer, cfdisk or one of the myriad of tools for this task.

Finally, you may need to reformat the device to FAT32 using mkfs.vfat for example.

  • I updated my question as a reply to your comment (see above) ^ ^ ^ @foobaru
    – user219258
    Oct 26, 2017 at 11:31

This has happened to me a few times as well. First, I would use dmesg or fdisk -l to see what dev/ the USB is on and then proceeding to use dd to overwrite everthing with 0s, thus cleaning the disk :

dd if=/dev/zero of=/dev/[yourUSB] bs=1024

Once the disk is completely overwritten, it is usually safe to use parted or mkfs.vfat in order to re-format it as needed.

The advantages of wiping the disk with dd to zero is a clean slate, so most if not all challenges should be mitigated.

  • what shoud I insert in the part where you said [yourUSB], because I don't know the name of the usb flash drive after I do fdisk -l. You can see the output of fdisk -l in this link: pastebin.com/656mA7Dv. P.S. The brand of usb flash drive is PNY 16 GB.
    – user219258
    Oct 26, 2017 at 14:31

From your terminal and without the pendrive inserted execute


(sudo gparted if you are not root). In the dropdown on the top right of the Gparted GUI you will see the available devices.

Plug in your usb and select Refresh Devices from the Gparted menu and you should see that a new device (probably sdb, judging from your screenshot) has appeared.

Select the new device, create a new partition table, create new partitions and filesystems and you are good to go.

Just be very very sure that you select the correct device although, since your device is not partitioned and has no filesystem, it should be easy enough to tell it apart from other devices in use.

  • 1
    I did that and again I can't find the usb. See pictures below
    – user219258
    Oct 31, 2017 at 11:42

You must log in to answer this question.