0

My microsd card no longer automounts when i plug it in. I can manually mount it via sudo and reformat it and it still shows in fstab:

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 250085375 250083328 119.3G  b W95 FAT32

when i run dmesg i get

[   25.672188] usb 1-4: new high-speed USB device number 5 using xhci_hcd
[   25.825200] usb 1-4: New USB device found, idVendor=05e3, idProduct=0741, bcdDevice= 2.20
[   25.825205] usb 1-4: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[   25.825208] usb 1-4: Product: USB Storage
[   25.825211] usb 1-4: Manufacturer: Generic
[   25.826940] usb-storage 1-4:1.0: USB Mass Storage device detected
[   25.827115] scsi host1: usb-storage 1-4:1.0
[   26.850090] scsi 1:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0220 PQ: 0 ANSI: 0
[   26.850793] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   27.273553] sd 1:0:0:0: [sdb] 250085376 512-byte logical blocks: (128 GB/119 GiB)
[   27.274541] sd 1:0:0:0: [sdb] Write Protect is off
[   27.274545] sd 1:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[   27.275490] sd 1:0:0:0: [sdb] No Caching mode page found
[   27.275497] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   30.203737] sd 1:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   30.203742] sd 1:0:0:0: [sdb] tag#0 Sense Key : Aborted Command [current] 
[   30.203746] sd 1:0:0:0: [sdb] tag#0 Add. Sense: Data phase CRC error detected
[   30.203751] sd 1:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[   30.203753] print_req_error: I/O error, dev sdb, sector 0
[   30.203760] Buffer I/O error on dev sdb, logical block 0, async page read
[   30.207818] ldm_validate_partition_table(): Disk read failed.
[   30.207827] Dev sdb: unable to read RDB block 0
[   30.210722]  sdb: unable to read partition table
[   30.213614] sd 1:0:0:0: [sdb] Attached SCSI removable disk

Is there anyway to fix the card or is it dead?

  • Why is your microSD card in fstab? – user68186 Feb 2 at 17:28
1

From dmesg seems like is unable to read the partition table, so let's recreate it. // Are comments and not part of the commands

sudo fdisk /dev/sdb //Here you're using fdisk utility on /dev/sdb disk 
d //d stands for delete partition
g //g is for recreating GPT table
n //n stands for new
p //p stands for primary partition
ENTER //Press enter key
ENTER
ENTER
w //w means write changes on disk
sudo mkfs.ext -F 32 -I /dev/sdb1 //Command that formats the partition you created in EXT32, must be run outside fdisk

After that if you want to add it in fstab, first grab the new UUID: sudo blkid /dev/sdb1

And add an entry in /etc/fstab like this:

UUID=(UUID) /folder/where/to/automount vfat defaults 0 0
  • what does the ENTER mean – Gregg Horton Feb 2 at 23:24
  • ``` ➜ ~ sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.32). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. fdisk: cannot open /dev/sdb: Input/output error ➜ ~ sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.32). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): d Selected partition 1 Partition 1 has been deleted. ``` – Gregg Horton Feb 2 at 23:30
  • Command (m for help): g Created a new GPT disklabel (GUID: CCA0EBF6-77A7-BB49-AD31-E24E35992169). Command (m for help): n Partition number (1-128, default 1): First sector (2048-250085342, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-250085342, default 250085342): Created a new partition 1 of type 'Linux filesystem' and of size 119.3 GiB. – Gregg Horton Feb 2 at 23:30
  • Command (m for help): p Disk /dev/sdb: 119.3 GiB, 128043712512 bytes, 250085376 sectors 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: gpt Disk identifier: CCA0EBF6-77A7-BB49-AD31-E24E35992169 Device Start End Sectors Size Type /dev/sdb1 2048 250085342 250083295 119.3G Linux filesystem – Gregg Horton Feb 2 at 23:31
  • Command (m for help): ENTER E: unknown command Command (m for help): Command (m for help): Command (m for help): Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. ➜ ~ sudo mkfs.ext -F 32 -I /dev/sdb1 sudo: mkfs.ext: command not found ➜ ~ sudo mkfs -F 32 -I /dev/sdb1 mkfs.ext2: invalid inode size - /dev/sdb1 – Gregg Horton Feb 2 at 23:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.