SD card ejecting and changing - solution

Post Reply
Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

SD card ejecting and changing - solution

Post by Arwen »

My initial tests with the SD card found that I could not get Linux OS to recognize
when I changed it out. A reboot was required. This was not much of a problem since
I intended the SD card to be a backup and alternate boot media. (In case I had boot
problems with my mSATA drive.)

However, I decided to research the issue to see if I could "fix" this problem. It's a bit
clumsy, but works;

Code: Select all

root@fitlet:/# blockdev --getsize64 /dev/mmcblk0
31486640128
root@fitlet:/# readlink /sys/block/mmcblk0
../devices/pci0000:00/0000:00:14.7/mmc_host/mmc0/mmc0:0007/block/mmcblk0
root@fitlet:/# echo 0000:00:14.7 >/sys/bus/pci/drivers/sdhci-pci/unbind
~~ change card ~~~
root@fitlet:/# echo 0000:00:14.7 >/sys/bus/pci/drivers/sdhci-pci/bind
root@fitlet:/# blockdev --getsize64 /dev/mmcblk0
64054362112
The problem maybe because it's a PCIe device and not a USB device.

Eventually I will see if I can get the "eject" command to deal with it properly. Then
have "udev" recognize when I insert a SD card.
Arwen Evenstar
Rivendale, Middle Earth

ausppc
Posts: 3
Joined: Sun Aug 09, 2015 1:06 am

Re: SD card ejecting and changing - solution

Post by ausppc »

Sometimes I've had to manually mount and unmount certain media with the Disks programs in Linux Mint.

Post Reply

Return to “Linux on MintBox Mini / Linux on fitlet”