mardi 23 février 2016

Cannot Mount SD card after it is removed without Umount

Good afternoon,

I have a project where the SD card may become momentarily disconnected due to a weak contact on the SD Detect pin. I want to be able to check if it has been unmounted and remount it in software.

My SD card partition is /dev/mmcblk1p1 It is originally mounted automatically when Linux boots up

If I execute a umount /mnt/storage command, then remove the SD card, I can re-insert it, and perform a mount /dev/mmcblk1p1 /mnt/storage without issues

However, if I remove the SD card first, without umount, executing mount /dev/mmcblk1p1 /mnt/storage results in

mounting /dev/mmcblk1p1 on /mnt/storage failed: No such device or address

I tried running

umount /mnt/storage
rmdir /mnt/storage
mkdir /mnt/storage

This error always comes up when the SD card is removed without unmounting

I'm using a Yocto distribution running on Imx6.

Aucun commentaire:

Enregistrer un commentaire