2

I'm trying to copy files from an USB stick to another drive. At least the file names appear to be corrupt, ls shows them as:

'ZHECMIv'$'\027''.PDF'
'ZHEKMI>2.P─F'
 ZHENIL~1.PDF
'эeloѤyfɯrɥvdr.2uOroä䁲igez_o_聴eŢe'$'\340\240\256''Ű聤f'
'ၙan­P⁩ѥòѳen-ၐoint-M䁯rѴ&`df'

Copying fails with errors like these:

cp: error reading '/media/pg/VERBATIM/2012/03/MVANES~0.PDF': Input/output error
cp: cannot create regular file '/media/pg/Elements SE/verba/2012/03/ERANmS~3.P'$'\004''B': Invalid argument
cp: cannot stat '/media/pg/VERBATIM/2014/09/f5'$'\004''7'$'\004''0'$'\004''.': No such file or directory

On the chance that only the filenames are corrupt, I tried this:

pg@TREX:~$ cp /media/pg/VERBATIM/2012/02/'YQ83A1'$'\177''0.╨DF' ./1.pdf
cp: error reading '/media/pg/VERBATIM/2012/02/YQ83A1'$'\177''0.╨DF': Input/output error

fsck.vfat -n shows:

fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.
FATs differ but appear to be intact.
  Using first FAT.
Cluster 113918 out of range (67222785 > 1968189). Setting to EOF.
Cluster 113928 out of range (2211211 > 1968189). Setting to EOF.
Cluster 113929 out of range (67222860 > 1968189). Setting to EOF.
Cluster 113937 out of range (2211092 > 1968189). Setting to EOF.
...
Cluster 657871 out of range (1). Setting to EOF. (Several)
...
Cluster 1940714 out of range (1342259Internal error: next_cluster on bad cluster
52 > 1968189). Setting to EOF. (once)

fdisk -l output:

pg@TREX:~$ sudo fdisk -l /dev/sde
Disk /dev/sde: 30.05 GiB, 32262586368 bytes, 63012864 sectors
Disk model: STORE N GO      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type /dev/sde1 32 63012863 63012832 30G c W95 FAT32 (LBA)

Are these files lost for good, or is there a tool I can try to recover them with?

  • Debian Bullseye fully up to date
  • $LANG is set to en_US.UTF.8
  • USB stick 32GB, VFAT
  • Data added to drive with Win10 Pro
Peregrino69
  • 2,417

1 Answers1

8

cp: error reading <filename>: Input/output error indicates there is corruption in locations other than filenames too.

The fdisk output is normal for a GPT-partitioned external disk. The size does not match the 32 GB you said, but 1.82 TiB is consistent with the disk model Elements SE 25FD reported by fdisk: are you really targeting the correct disk with your fdisk command?

Based on the cp commands output, it looks like you listed the fdisk output of the disk you are recovering files to, rather than the USB stick you are recovering them from.

I would suggest using ddrescue to image the failing USB stick and working on the copy, and/or using PhotoRec to try and recover the files since it is designed for rescuing files from failing flash-type media.

telcoM
  • 96,466
  • Oopsie. Yes, I mixed the drives with fdisk and fsck.vfat. The problematic one is /dev/sde. Question edited. Thanks for the suggestion, ddrescue and PhotoRec are till now unknown to me, trying that path now. – Peregrino69 Jul 18 '22 at 10:28
  • The files are all PDFs, sheet music collected over years. PhotoRec can't open any of the ones I tested. Looks like the whole thing is borked, probably killed by heat as ArtemiS suggested. I anyway got the image created, and at least some of the files are still readable, so solution accepted. Thanks a bunch again. – Peregrino69 Jul 18 '22 at 16:46