Re: usb-storage: how to ruin your hardware(?)

From: Peter Werner
Date: Tue Sep 09 2003 - 05:00:31 EST


> overwriting the drive with zeroes doesn't harm it. but in the meantime,
> I found out how I managed to confuse the drive. as I wrote in a previous
> email, I tried to make the drive look like it has a "real partition table",
> I just copied the one from /dev/hda. Then, I did an mke2fs. Of course,
> my harddisk is larger then the flashdisk, but I expected an error-message
> and not the behaviour I see. So, one can say, trying to access the drive
> beyond its physical limits "ruins" it. But it's always possible to repair
> such a drive with the vendor supplied formating utility, which is windows
> only, which is why I didn't notice it until three days ago. (First time I
> use such a thing).

AFAIK NAND flash devices have bad sectors and a bad-block table usually at
the end of the device. That could be the reason why you can ruin your
device writing beyond the reported capacity. The formatting tool can reset
this area. You can try to save the area beyond the reported capacity,
overwrite it &c. as you did with the beginning of the drive. It's not
really kernel related. The point, as you pointed out, is that the kernel
should handle this failure better.

Peter Werner
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/