this post was submitted on 02 Oct 2023
60 points (98.4% liked)

Linux

45488 readers
2070 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I have a SanDisk 256GB extreme pro SD card for my camera. It works perfectly fine with the camera and with windows, but when I instert it into the card reader on linux (fedora 38) I can't copy any files from it:

cp: Fehler beim Lesen von '.../DCIM/112_FUJI/DSCF2001.RAF': Eingabe-/Ausgabefehler

Loosely translated:

cp: error while reading from '.../DCIM//112_FUJI/DSCF2001.RAF': input/output error

the card is automatically mounted and shows up in the file explorer.

The fdisk command return this:

Festplatte /dev/sdg1: 238,27 GiB, 255835766784 Bytes, 499679232 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0xf4f4f4f4

Gerät       Boot     Anfang       Ende   Sektoren Größe Kn Typ
/dev/sdg1p1      4109694196 8219388391 4109694196  1,9T f4 SpeedStor
/dev/sdg1p2      4109694196 8219388391 4109694196  1,9T f4 SpeedStor
/dev/sdg1p3      4109694196 8219388391 4109694196  1,9T f4 SpeedStor
/dev/sdg1p4      4109694196 8219388391 4109694196  1,9T f4 SpeedStor

I tried following this: https://www.reddit.com/r/raspberry_pi/comments/habv0q/fixing_linux_sd_card_reader_issues_inputoutput/
but it didn't change anything

Does anyone have any idea?

EDIT:
I used the wrong fdisk command. I used /dev/sdg1 as opposed to /dev/sdg which is the actual drive. Here is the output of fdisk -l /dev/sdg:

Festplatte /dev/sdg: 238,3 GiB, 255869321216 Bytes, 499744768 Sektoren
Festplattenmodell: STORAGE DEVICE  
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x00000000

Gerät      Boot Anfang      Ende  Sektoren  Größe Kn Typ
/dev/sdg1  *     65536 499744767 499679232 238,3G  7 HPFS/NTFS/exFAT

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 9 months ago (1 children)

@BentiGorlich
It's a bit weird, it looks like the output of fdisk -l /dev/sdg indicates that your SD card is formatted with an HPFS/NTFS/exFAT file system, which is not the typical format for camera SD cards. Camera SD cards are usually formatted as FAT32 or exFAT.
I recommend that you backup everything on that sd card and reformat it to exfat or fat32 yourself on a linux system.

[–] [email protected] 2 points 9 months ago (3 children)

I just reformatted it on my linux machine. So I choose exFAT again, because thats what it was before, that's what I know the camera can handle and I have the exact same problem... I think I just surrender and import my photos on my laptop all the time...

The partition type after a format is btw still NTFS/exFAT/HPFS. So that is just a compatibility thing for it to work on basically all systems I think...

[–] [email protected] 2 points 9 months ago (1 children)

Try wiping the drive and then reinserting it. If it still looks the same you either have a failing card or its been put in read only mode at a hardware level.

[–] [email protected] 1 points 9 months ago

The card is definitely not broken, if works on windows and in the camera....

[–] [email protected] 1 points 9 months ago

The value displayed by fdisk is actually just the textual representation of the numeric partition type you can set when partitioning (7 in this case).

[–] [email protected] 0 points 9 months ago (1 children)
[–] [email protected] 1 points 9 months ago

No I have not. Maybe I will in the next days. But as I said I kinda surrendered...