Auto Mount SD Card

Dear all,

I want auto mount a SD card, with fstab no problem.

But when i boot with a SD card in slot, the device is assigned to /dev/mmcblk0p1 and if i boot without SD card, the device is assigned to /dev/mmcblk1p1 after i insert SD card.

In my project I do not know if the SD card are in the slot during the boot. What is the best way for auto mount an SD card ? (With and Without SD card in slot during the boot)
Thanks.

Best Regards.

Use a uuid:

https://wiki.debian.org/Part-UUID

Regards,

jr@arsoft-int.com <jr@arsoft-int.com> [14-10-28 17:40]:

Dear all,

I want auto mount a SD card, with fstab no problem.

But when i boot with a SD card in slot, the device is assigned to
/dev/mmcblk0p1 and if i boot without SD card, the device is assigned to
/dev/mmcblk1p1 after i insert SD card.

In my project I do not know if the SD card are in the slot during the boot.
What is the best way for auto mount an SD card ? (With and Without SD card
in slot during the boot)
Thanks.

Best Regards.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

just a shot in the dark:

use lsusb -v as root to examine the "attributes" (correct
word?...sorry I am no native english speaker...) of the usb port
of the hub on the beaglebone.

Then build an udev rule to assign it a constant name additonally to
the already given one (mmcblk*) in case of other programs use that
one.

Good luck!
Best regards,
mcc

Thanks for your help !

For the uuid i don’t know that, I’ll go see it…

For Meino....@gmx.de i don’t use an usb card reader, i use the sd card slot of bbb. It is not visible with lsusb…

Otherwise, is it possible to force the assignment of the eMMC on /dev/mmcblk0p1 or /dev/mmcblk1p1 with uEnv.txt ?

Best Regards,
Julien.

Hi Robert,

Can you give me an exemple of use uuid with SD card ? Because the uuid change when i change the SD card…

It’s not possible to force mount emmc on mmcblk0 and SD on mmcblk1 ? (With uEnv.txt)

I look for a solution for mounting the card on /media/sd if it into the slot or not, and when it hot plug. What is the best way ?

Thanks for your help.

@+

Hi Robert,

Can you give me an exemple of use uuid with SD card ? Because the uuid
change when i change the SD card...

It's not possible to force mount emmc on mmcblk0 and SD on mmcblk1 ? (With
uEnv.txt)

I look for a solution for mounting the card on /media/sd if it into the slot
or not, and when it hot plug. What is the best way ?

Write a script to auto mount it then.

Regards,

Hi Robert,

Can you give me an example or a method to automatically mount ?

How i can execute a script after SD is inserted ? (Such as /etc/network/if-up.d/ for the network…)

I tested a script at startup who edit fstab file depending if SD card is in slot at startup. It work but when i remove (if it is in slot) and insert the SD, the SD was not mount. For mount it i need to execut mount -a command and it’s not autonomous…

Thanks for your help.

@+

Hi,

After more test and search i found a solution with udev rules. I was inspired by this thread :
http://unix.stackexchange.com/questions/44454/how-to-mount-removable-media-in-media-label-automatically-when-inserted-with

I modified the scripts for detect if the point is the sd card…

@+