SD card ejecting and changing - solution
Posted: Thu Jun 11, 2015 7:23 am
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;
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.
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
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.