You are not logged in.
Hi Arch users,
I have a 59.4 GB SD card that I cannot format in Arch Linux — tools like
wipefs,
mkfs.vfat, and GParted fail with I/O errors.
System info
OS: Arch Linux x86_64
SD card reader: SanDisk SDCARD
Problem description
When I try to format
/dev/sdb, I get:
sudo wipefs -a /dev/sdb
wipefs: /dev/sdb: failed to erase dos magic string at offset 0x000001fe: Input/output errorlsblk output
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:16 1 59.4G 0 diskhdparm output
$ sudo hdparm -r /dev/sdb
/dev/sdb:
readonly = 0 (off)dmesg tail after trying to write
[ 1926.190613] I/O error, dev sdb, sector 0 op 0x1:(WRITE) flags 0x800
[ 1926.202642] unable to read partition tableI also tried
ddrescueto recover data, but sector 0 immediately fails.
Additional info
The card was previously formatted successfully in my Android phone and worked for a while.
Now, it fails to format on PC, but still formats successfully on my phone.
Question:
Is there any way to force-repair or remap sector 0 in Arch Linux, or is the card permanently damaged and only replaceable?
Thanks in advance.
Offline
Do you have access to another card reader?
Offline
Do you have access to another card reader?
Thanks for your reply.
I found that the SD card itself is working fine in both my phone and laptop as long as it is formatted as exFAT. The problem only happens when I try to reformat it to FAT32 or any other filesystem/partition type — I get the same I/O error in Arch Linux.
The reason I’m trying to reformat is because my Micromax TV doesn’t support exFAT, only FAT32. I also tried making the SD card bootable (flashing an ISO), but that fails with the same error.
So the situation is:
exFAT format: works perfectly on phone and laptop
FAT32/bootable format: fails with I/O error in Arch Linux
I need FAT32 for TV compatibility and for making the card bootable
Is there any known way to fully erase/repartition such a card in Linux when sector 0 errors appear, or is this a sign that the card is partially failing?
Offline
Just to be clear: the card reads and writes fine but you've so far not been able to write sector 0 on any system?
(Specifically testing a different card reader)
Can you write the MBR on other SD cards in that reader w/o problems?
Have you researched the specific card? The vendor might have fused the MBR, but
I also tried ddrescue to recover data, but sector 0 immediately fails.
sounds concerning - is that only after trying to write the sector? How can you use the card at all if you cannot access the MBR?
Offline