Score:0

Why my SD Card not marked as removable?

br flag

My SD card in the card reader detected as mmcblk0

/sys/block/mmcblk0 -> ../devices/pci0000:00/0000:00:01.3/0000:01:00.0/rtsx_pci_sdmmc.0/mmc_host/mmc0/mmc0:0001/block/mmcblk0

but it's not marked as removable

$ cat /sys/block/mmcblk0/removable
0

I have found a lot of issues across the internet related to this because the drive is not recognized as removable but unable to find a solution.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy

$ lsmod |egrep 'mmc|sdhci|ricoh'
rtsx_pci_sdmmc         36864  0
rtsx_pci              106496  1 rtsx_pci_sdmmc

$ ls -la /sys/block/mmcblk0/
загалом 0
drwxr-xr-x 9 root root    0 мар 22 21:46 .
drwxr-xr-x 3 root root    0 мар 22 21:46 ..
-r--r--r-- 1 root root 4096 мар 22 21:46 alignment_offset
lrwxrwxrwx 1 root root    0 мар 22 21:46 bdi -> ../../../../../../../../../virtual/bdi/179:0
-r--r--r-- 1 root root 4096 мар 22 21:46 capability
-r--r--r-- 1 root root 4096 мар 22 21:46 dev
lrwxrwxrwx 1 root root    0 мар 22 21:46 device -> ../../../mmc0:0001
-r--r--r-- 1 root root 4096 мар 22 21:46 discard_alignment
-r--r--r-- 1 root root 4096 мар 22 21:46 diskseq
-r--r--r-- 1 root root 4096 мар 22 21:46 events
-r--r--r-- 1 root root 4096 мар 22 21:46 events_async
-rw-r--r-- 1 root root 4096 мар 22 21:46 events_poll_msecs
-r--r--r-- 1 root root 4096 мар 22 21:46 ext_range
-rw-r--r-- 1 root root 4096 мар 22 21:46 force_ro
-r--r--r-- 1 root root 4096 мар 22 21:46 hidden
drwxr-xr-x 2 root root    0 мар 22 21:46 holders
-r--r--r-- 1 root root 4096 мар 22 21:46 inflight
drwxr-xr-x 2 root root    0 мар 22 21:46 integrity
drwxr-xr-x 3 root root    0 мар 22 21:46 mq
drwxr-xr-x 2 root root    0 мар 22 21:46 power
drwxr-xr-x 3 root root    0 мар 22 21:46 queue
-r--r--r-- 1 root root 4096 мар 22 21:46 range
-r--r--r-- 1 root root 4096 мар 22 21:46 removable
-r--r--r-- 1 root root 4096 мар 22 21:46 ro
-r--r--r-- 1 root root 4096 мар 22 21:46 size
drwxr-xr-x 2 root root    0 мар 22 21:46 slaves
-r--r--r-- 1 root root 4096 мар 22 21:46 stat
lrwxrwxrwx 1 root root    0 мар 22 21:46 subsystem -> ../../../../../../../../../../class/block
drwxr-xr-x 2 root root    0 мар 22 21:46 trace
-rw-r--r-- 1 root root 4096 мар 22 21:46 uevent

It's a built-in card reader in the hp pavilion notebook

I'm not sure which additional information I can provide.

UPD 2023-03-23: such behavior prevents normal operation of some programs which should work with removable media only, for example key storages, or bootable flash writers which relies on this flag.

David avatar
cn flag
A good start to any question is what commands you have tried and the results of the commands.
Yaroslav avatar
br flag
@David all commands I have tried is in the code block, but it's more getting information. Unfortunately I have no idea how can I change this behavior. I suspect, then, there is a configuration file somewhere with rules for determining which drives are removable and which are not but I can't find nothing about that.
kanehekili avatar
zw flag
I've never checked my inserted SD cards. Does it prevent any operation? Like read or write?
Yaroslav avatar
br flag
@kanehekili such behavior prevents normal operation of some programs which should work with removable media only, for example key storages, or bootable flash writers which relies on this flag.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.