0

I'm unable to read any SD card from Linux. I already tried both SD cards that I have here in different machines (windows and Linux) and they work flawlessly, I also booted from a live USB (the same kernel and distro I have installed) and they also work, so it must be something in my current Kali Linux install that is causing this.

First of all, these are the logs I receive when inserting the SD card:

Jan  4 22:41:42 matrix kernel: [ 2028.923668] mmc0: card lacks mandatory switch function, performance might suffer
Jan  4 22:41:42 matrix kernel: [ 2028.923685] mmc0: new SD card at address aaaa
Jan  4 22:41:42 matrix kernel: [ 2028.924358] mmcblk0: mmc0:aaaa DSC16 256 MiB (ro)
Jan  4 22:41:42 matrix kernel: [ 2029.006966]  mmcblk0: p1
Jan  4 22:41:42 matrix kernel: [ 2029.006980] mmcblk0: p1 size 31108096 extends beyond EOD, truncated
Jan  4 22:41:43 matrix kernel: [ 2029.611115] print_req_error: I/O error, dev mmcblk0, sector 524672
Jan  4 22:41:43 matrix kernel: [ 2029.746877] print_req_error: I/O error, dev mmcblk0, sector 524673
Jan  4 22:41:43 matrix kernel: [ 2029.882571] print_req_error: I/O error, dev mmcblk0, sector 524674
Jan  4 22:41:43 matrix kernel: [ 2030.017980] print_req_error: I/O error, dev mmcblk0, sector 524675
Jan  4 22:41:43 matrix kernel: [ 2030.153261] print_req_error: I/O error, dev mmcblk0, sector 524676
Jan  4 22:41:44 matrix kernel: [ 2030.288366] print_req_error: I/O error, dev mmcblk0, sector 524677
Jan  4 22:41:44 matrix kernel: [ 2030.424021] print_req_error: I/O error, dev mmcblk0, sector 524678
Jan  4 22:41:44 matrix kernel: [ 2030.559682] print_req_error: I/O error, dev mmcblk0, sector 524679
Jan  4 22:41:44 matrix kernel: [ 2030.966821] print_req_error: I/O error, dev mmcblk0, sector 524672
Jan  4 22:41:44 matrix kernel: [ 2031.101915] print_req_error: I/O error, dev mmcblk0, sector 524673
Jan  4 22:41:45 matrix kernel: [ 2031.913602] Buffer I/O error on dev mmcblk0, logical block 65584, async page read
Jan  4 22:41:48 matrix kernel: [ 2034.631681] print_req_error: 21 callbacks suppressed
Jan  4 22:41:48 matrix kernel: [ 2034.631686] print_req_error: I/O error, dev mmcblk0, sector 524679
Jan  4 22:41:48 matrix kernel: [ 2034.631701] Buffer I/O error on dev mmcblk0p1, logical block 64560, async page read

This is my the output of lspci -v, more specifically, the SD card reader:

02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
    Subsystem: Lenovo SD/MMC Card Reader Controller
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at e1301000 (32-bit, non-prefetchable) [size=4K]
    Memory at e1300000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: <access denied>
    Kernel driver in use: sdhci-pci
    Kernel modules: sdhci_pci

output of lsmod | grep mmc

mmc_block              45056  0
mmc_core              172032  4 sdhci,cqhci,mmc_block,sdhci_pci

dmesg boot output related to the mmc:

[    1.271406] mmc0: Unknown controller version (3). You may experience problems.
[    1.271639] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA

This is my kernel:

Linux matrix 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux

Things that I already tried:

  • Disable and enable sdhci with modprobe
  • Change debug_quirk value of shdci_pci (options sdhci debug_quirks=0x40)
  • 3
  • are you saying that the SD cards worked on other machines, but they do not work on yours? ..... maybe you have a hardware issue – jsotola Jan 5 at 5:39
  • This is not a hardware issue since I can boot the same distro/kernel linux via liveUSB and read the SD cards with no problem. – Jean Novak Jan 5 at 11:43
  • @RalfFriedl, Thank you for pointing out my lack of knowledge. I understand Kali linux is not a "newbie" distro but since I'm working in the netsec field, I tought about giving Kali a try as my daily OS and not only as specialized liveUSB distro. I'm no new to linux, I believe the point of the forum is to share knowledge and using your external point of view of the problem to advice a future solution. Thanks anyway, I read the post you linked and its a fair point. – Jean Novak Jan 5 at 11:50
  • Hi @A.B, thanks for your reply. Does not matter which sd card I insert, this output is shown everytime. If I try to read the same SD card in other computer, it works fine. If I boot my computer from a live USB and try reading the SD card again, it works as well. – Jean Novak Jan 5 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.