Linux에서 SD 카드를 읽을 수 없습니다. 나는 서로 다른 컴퓨터(Windows 및 Linux)에서 두 SD 카드를 모두 사용해 보았고 완벽하게 작동했습니다. 또한 라이브 USB(내가 설치한 것과 동일한 커널 및 배포판 사용)에서 부팅했으며 역시 작동하므로 뭔가 뭔가 있어야 합니다. 현재 Kali Linux 설치에서 이 문제가 발생하고 있습니다.
먼저, SD 카드를 삽입할 때 수신되는 로그는 다음과 같습니다.
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
이것은 lspci -v의 출력, 보다 구체적으로 SD 카드 리더의 출력입니다.
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
lsmod grep MMC의 출력 |
mmc_block 45056 0
mmc_core 172032 4 sdhci,cqhci,mmc_block,sdhci_pci
mmc와 관련된 Dmesg 시작 출력:
[ 1.271406] mmc0: Unknown controller version (3). You may experience problems.
[ 1.271639] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA
이것은 내 커널입니다.
Linux matrix 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux
내가 시도한 것들:
- modprobe를 사용하여 sdhci를 비활성화 및 활성화합니다.
- shdci_pci의 debug_quirk 값을 변경합니다(옵션 sdhci debug_quirks=0x40).