Ext4 USB stick gets corrupted again and again

0

I installed Debian Wheezy (No GUI/Desktop) on a 4GB USB stick (because the harddrive of the machine was defective, currently the slot is empty), but shortly after, I got an “Input/Output error” when starting programs/opening files.

Running TestDisk on the stick on another machine fixed the problem, only to have it again after a few reboots… This continues til now.

EDIT: It mostly corrupts mid-session!

So, as the USB stick is new, and the issues are 100% fixable, I dont think the stick is defective, but rather some driver/program corrupting it…

EDIT: After formatting it(after backing up) FAT32(for my Windows machine to read it), I tested with H2testw, which returned no errors

System details:

  • Medion Akoya E1222 Netbook
  • Intel Atom n450 64bit CPU
  • 1GB RAM

Would running the 32-bit version of ZSNES on a 64bit OS cause such things?(Cause thats what i did all the time)

Wuerfel_21

Posted 2015-02-19T14:32:37.327

Reputation: 29

Answers

0

I'd run a program to test if the USB flash drive isn't faulty or counterfeit, such as f3 or h2testw, to be completely sure it isn't the problem.

Explanation

In some cases faulty, low capacity drives and controller chips for higher capacity get smuggled out of factories by employees, for selling them as genuine products at a higher price, e.g. A 2GiB drive with a 32GiB drive controller is sold and presents itself as a 32GiB, when in fact only 2GiB are writable.

For the sake of simplicity, suppose we have 4 writable memory cells with the following addresses:

00
01
10
11

And the memory reports a higher capacity, 8 writable memory cells with the following addresses:

000
001
010
011
100
101
110
111

Notice how the first 4 memory cells and the last 4 memory cells overlap with the actual memory cells as follows: If we try to write the first reported cell, address 001, the memory will write the address 01. As the memory actually has 2 wires in order to support 2 bits for addresses, the driver has 3, and as a counterfeit memory is just shoehorning these two together, exactly one wire will be grounded at some point, the value of the most significative (first) bit. It won't matter what its value is, in this case it's 0, so there aren't any issues.

Now, if we try to write the fifth reported cell, address 101, it will actually write address 01, the two last digits, and the first digit now has a voltage that must be grounded at some point, heating the drive.

What these utilities do is write the entire writable space of the drive with patterns and verify their integrity to make sure the files aren't lost, corrupted or overwritten. If this happens it's very likely that only the real capacity of the drive will be read (with overwritten contents) and the rest will be lost.

TL;DR: if your memory is counterfeit there is a possibility that its contents are being overwritten at some point.

ibelcomputing

Posted 2015-02-19T14:32:37.327

Reputation: 38

Im pretty shure it is actually a 4GB one, but i will try scanning it, if i find a reasonable backup tool... – Wuerfel_21 – 2015-02-19T18:51:51.733

So, after backing up, formatting it FAT32(For the Windows machine to read it), i tested with H2testw, which reported no errors. So its a software failure then? – Wuerfel_21 – 2015-02-19T19:55:16.823

Yes, if everything that was written was read correctly, then now we can definitely assume it is some piece of software that's jumbling up the data on the drive. Does the issue happen when using a less write-intensive filesystem, such as ext2? – ibelcomputing – 2015-02-20T18:44:35.750

Is there a way to change the formatting of the root filesystem? – Wuerfel_21 – 2015-02-21T10:54:53.783