detect and disable bad sectors on an USB Flash?

Npl

Veteran
I got an 8GB Kingston USB Stick as gift, but it reliably produces errors... like deleting and copying a file again will result in the very same fault in the file.
So I assume it has bad blocks, is there any way to detect and mark these as "don`t use"?

Ps. A friend who bought bought himself a Kingston USB Stick experiences the same problems, 2 out of 2 Kingston Sticks broken :???:
 
chkdsk /F

Chkdsk corrects disk errors only if you specify the /f command-line option. Chkdsk must be able to lock the drive to correct errors.

/r : Locates bad sectors and recovers readable information. The disk must be locked.
 
Hmm, I dont want to repair data or the filesystem, I want to mark defect sectors as unuseable so files aint instantly corrupted if I copy them over one of these blocks.
Not sure if FAT32 even has support for that?
 
I got an 8GB Kingston USB Stick as gift, but it reliably produces errors... like deleting and copying a file again will result in the very same fault in the file.
So I assume it has bad blocks, is there any way to detect and mark these as "don`t use"?

Ps. A friend who bought bought himself a Kingston USB Stick experiences the same problems, 2 out of 2 Kingston Sticks broken :???:

I have seen sticks that produce this kind of error on front panel USB sockets, but not on the back panel USB sockets that are connected directly to the motherboard. I'm guessing that there are issues with some of the cabling or interference with some front ports on cases. Either that or the USB 2 sticks aren't properly backwards compatible with USB 1.1

The same sticks would work perfectly on more up to date motherboards/cases, so it may be an incompatibility issue, rather than a faulty memory stick.
 
I remember coming across dysfunctional panel USB ports, too. They were fine for a gamepad but not much else, so that had to be some terrible cabling quality or something. using the same motherboard's port on a rear bracket worked.

one weird way to deal with that USB drive, if your BIOS supports a "USB legacy storage" option that make the drive usable under DOS ;) : boot a win98 floppy (i.e. win98 DOS) in some way and launch scandisk in "minutious" mode. it looks nice and colored. This is how we marked bad sectors in the good old times :)

another way would be, boot a linux install, or live CD, or live USB, and run fsck.vfat -t
 
Last edited by a moderator:
Hmm, I dont want to repair data or the filesystem, I want to mark defect sectors as unuseable so files aint instantly corrupted if I copy them over one of these blocks.
Not sure if FAT32 even has support for that?
Not possible with flash memory at all (the controller should detect defects itself and physical blocks doesn't correspond to addressing blocks). Are they from a reputable dealer? Lots of "hacked" USB sticks around where the file system reports more space than is actually there and files will corrupt once filled with more than the actual capacity.
 
If there's some kind of wear leveling employed in this flash stick then marking sectors on a filesystem level won't help. When you start writing to it data will just move around to wear all flash pages more or less evenly. thus moving the filesystem sectors marked as bad to new cells...

As zaphod mentioned the controller should deal with this. Theoretically anyway. Could be just a cheap flash stick.

I'd put it in to be recycled, then buy a new fresh stick. If cells are bad on it right off the bat chances are it'll just keep on corrupting your data no matter what you do. Flash sticks are so cheap, it's not worth the trouble faffing with a partially borked one. You don't need the headaches if it garbles any important data for you.
 
As zaphod mentioned the controller should deal with this. Theoretically anyway. Could be just a cheap flash stick.
Its a cheap one I guess.. I dint pay for it so I dont know :D

There seems to be no sort of wear-leveling, the same blocks always get damaged if I copy files over. And running it on a port on the backisde of the PC makes no difference.
 
Sounds like a "hacked" one to me. You could try a utility that will fill it write/verifying a series of files to check whether the size has been faked (or just do in manually with large files). Here's a guide that also has instructions on how to revive it (down to actual size) if it's been capacity faked.
 
Back
Top