Does it possible to mount and refresh broken SD card?
i had SD card, which doesn't readable by the system.
It was happened while testing process, i had write to card files 1GB value, and after about 255 or 260 such a file, it was crashed and becomes unreadable while it still attached to the system as mass storage device.
I had tried e2fsck, testdisk, badblocks and even chkdsk - they aren't find that device. While dmesg show that it attached:
[ 5340.561375] /dev/sdb: Can't open blockdev [ 6323.715239] usb 1-4.4: USB disconnect, device number 7 [ 6341.104941] usb 1-4.4: new full-speed USB device number 8 using xhci_hcd [ 6341.209213] usb 1-4.4: not running at top speed; connect to a high speed hub [ 6341.210268] usb 1-4.4: New USB device found, idVendor=14cd, idProduct=1212, bcdDevice= 1.00 [ 6341.210276] usb 1-4.4: New USB device strings: Mfr=1, Product=3, SerialNumber=2 [ 6341.210278] usb 1-4.4: Product: Mass Storage Device [ 6341.210280] usb 1-4.4: Manufacturer: Generic [ 6341.210282] usb 1-4.4: SerialNumber: 121220160204 6341.211397] usb-storage 1-4.4:1.0: USB Mass Storage device detected [ 6341.211684] scsi host2: usb-storage 1-4.4:1.0 [ 6342.221559] scsi 2:0:0:0: Direct-Access Mass Storage Device 1.00 PQ: 0 ANSI: 0 CCS [ 6342.221876] sd 2:0:0:0: Attached scsi generic sg1 type 0 [ 6342.370929] sd 2:0:0:0: [sdb] Media removed, stopped polling [ 6342.371360] sd 2:0:0:0: [sdb] Attached SCSI removable disk lm@debian:~$ use any commands - the device is present, but unreadable
lm@debian:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 238.5G 0 disk ├─sda1 8:1 0 300M 0 part ├─sda2 8:2 0 16M 0 part ├─sda3 8:3 0 58G 0 part ├─sda4 8:4 0 522M 0 part ├─sda5 8:5 0 1M 0 part ├─sda6 8:6 0 8.4G 0 part [SWAP] └─sda7 8:7 0 55.9G 0 part / sdb 8:16 1 0B 0 disk lm@debian:~$ sudo badblocks -s -p 2 -f -e 15 /dev/sdb badblocks: No medium found while trying to determine device size lm@debian:~$ sudo mount /dev/sdb /media/32 mount: /media/32: mount point does not exist. dmesg(1) may have more information after failed mount system call. lm@debian:~$ sudo e2fsck -b 32768 /dev/sdb e2fsck 1.47.0 (5-Feb-2023) e2fsck: No medium found while trying to open /dev/sdb
lm@debian:~$ sudo testdisk /log /dev/sdb TestDisk 7.1, Data Recovery Utility, July 2019 Christophe GRENIER <[email protected]> https://www.cgsecurity.org Unable to open file or device /dev/sdb: No medium found lm@debian:~$ sudo ntfsfix -d /dev/sdb Mounting volume... Error opening '/dev/sdb': No medium found FAILED Attempting to correct errors... Error opening '/dev/sdb': No medium found FAILED Failed to startup volume: No medium found Error opening '/dev/sdb': No medium found lm@debian:~$ sudo mkfs.vfat -F 32 /dev/sdb mkfs.fat 4.2 (2021-01-31) mkfs.vfat: unable to open /dev/sdb: No medium found lm@debian:~$ ls -l /dev/sd* brw-rw---- 1 root disk 8, 0 Sep 16 01:09 /dev/sda brw-rw---- 1 root disk 8, 1 Sep 16 01:09 /dev/sda1 brw-rw---- 1 root disk 8, 2 Sep 16 01:09 /dev/sda2 brw-rw---- 1 root disk 8, 3 Sep 16 01:09 /dev/sda3 brw-rw---- 1 root disk 8, 4 Sep 16 01:09 /dev/sda4 brw-rw---- 1 root disk 8, 5 Sep 16 01:09 /dev/sda5 brw-rw---- 1 root disk 8, 6 Sep 16 01:09 /dev/sda6 brw-rw---- 1 root disk 8, 7 Sep 16 01:09 /dev/sda7 brw-rw---- 1 root disk 8, 8 Sep 16 01:09 /dev/sda8 brw-rw---- 1 root disk 8, 16 Sep 16 01:09 /dev/sdb lm@debian:~$