Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RPI3 sd lockups?



Michael Cheponis <michael.cheponis%gmail.com@localhost> writes:

> Is there a preferred way to determine which sectors are bad on the old SD
> card?    Plugged in a USB-to-SDcard adaptor with the presumed bad uSD:

As I understand it, these behave like disks so if you read and it can't
you get a medium error and then when you write it reallocates to a new
sector.  If there are no new ones then you get a write error.  And it
may reallocate sectors on read if it can read them but they are starting
to go.

So basically run dd if=/dev/rsd0d of=/dev/null and see how it goes.

> Jul  3 04:11:55 S /netbsd: [ 370462.5581262] umass2: using SCSI over Bulk-Only
> Jul  3 04:11:55 S /netbsd: [ 370462.5581262] scsibus2 at umass2: 2 targets, 1 lun per target
> Jul  3 04:11:55 S /netbsd: [ 370462.5781259] sd2 at scsibus2 target 0 lun 0: <Generic-, USB3.0 CRW   -SD, 1.00> disk removable
> Jul  3 04:11:56 S /netbsd: [ 370463.6182434] sd2: fabricating a geometry
> Jul  3 04:11:56 S /netbsd: [ 370463.6182434] sd2: 30528 MB, 30528 cyl, 64 head, 32 sec, 512 bytes/sect x 62521344 sectors
> Jul  3 10:09:54 S /netbsd: [ 370463.6382510] sd2: fabricating a geometry
>
> Then ran this:
>
> # nice dd if=/dev/rsd2 of=/dev/null
> 62521344+0 records in
> 62521344+0 records out
> 32010928128 bytes transferred in 30505.600 secs (1049345 bytes/sec)

That's very slow, but ok for 512 byte transfers.

> No errors were reported in /var/log/messages
>
> So now I'm wondering: was I hacked?  Or is dd not the best way to test for
> bad sectors?  Or, has the SD card somehow re-mapped the bad sectors?  Or?

Or you have having problems from some other bug.

(Perhaps the intruder planted a bug that makes your MUA wrap log output
:-) I fixed it above.)

I would recommend fsck, and see if there is anything else amiss.


Home | Main Index | Thread Index | Old Index