Page 1 of 1

SD card ejecting and changing - solution

Posted: Thu Jun 11, 2015 7:23 am
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.

Re: SD card ejecting and changing - solution

Posted: Sun Aug 09, 2015 4:17 am
by ausppc
Sometimes I've had to manually mount and unmount certain media with the Disks programs in Linux Mint.