I hope, I understand properly what you want.
Recently, I had a similar issue. It was after making a bootable USB drive for installing ubuntu. Therefore, I used the dd command: sudo dd if=*.iso of=/dev/sdb . Afterwards I could not access the full storage capacity of my drive (that means: also after formatting my device, further, programs like fdisk did not show its capacity).
Further, applying gparted, I could only reduce the visible amount of usable disk-space, but not restore ist to the maximum of appr 8 GB. Also, gparted wouldn't show me the 8 GB but 4, 3, 2..., whatever I reduced it to. At least using Windows, I could not solve the problem (but I didn't try extensively nor did I have admin privileges). What I did then was to delete all partitions on my usb-stick with fdisk and rebooted the computer. Then the storage capacity shown was around 8 GB again, as I expected.
Your usage of dd command sudo dd if=/dev/zero of=/dev/sdc bs=1024k count=2
won't write zeros onto the whole drive.
You said, you cannot format your usb drive. Further you said you deleted all of your partitions. So my suggestion is, that you run the following command to format your drive (Maybe you will have to do this using the sudo
command):
mkfs.vfat -I -F 32 /dev/sdX
where X has to be replaced for the letter of your drive. You can try to write a new partition/partition-table onto your drive before, using sudo fdisk /dev/sdX
(d to delete partitions, n to make a new partition [e.g. over the whole device] and with t you could change the type of the partition table; with p you can check the partitioning of your device). But anyway, you wrote, you already used fdisk.
I searched on google, I didn't find information, that linux mint is using a different command for formatting than at least most other linux distributions.
Best Answer
Your usb stick has failed.
Some drives return different sizes when they fail, although I've only read about this with regard to "SSDs", which have more complex controllers.
To double-check the size of the drive as a whole, I would use
lsblk
or look in the kernel logdmesg
. (The size of partitions within the device could be completely bogus depending on the partition table; you could contrive this without having a hardware failure).If the size was OK, there are ways you could try to recover important data. But it doesn't sound like you need to - you still have access to the Kali ISO file.
Simple usb sticks aren't designed with any extra hardware diagnostics[*]. Once you know the hardware has failed, that's it. Either of the size of the drive as a whole going wrong, or the drive not returning the data you wrote to them (suggested by failure of
fdisk
), would be enough to indicate such failure.[*] I think they're not even designed for uses where the maximum expected re-write cycles of flash storage becomes an issue. They're much more likely to just break, or be lost.