Auto Mount SD Card

2,056 views
Skip to first unread message

j...@arsoft-int.com

unread,
Oct 28, 2014, 12:37:20 PM10/28/14
to beagl...@googlegroups.com
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.
 

Robert Nelson

unread,
Oct 28, 2014, 12:41:21 PM10/28/14
to Beagle Board
Use a uuid:

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

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

meino....@gmx.de

unread,
Oct 28, 2014, 12:47:22 PM10/28/14
to beagl...@googlegroups.com
j...@arsoft-int.com <j...@arsoft-int.com> [14-10-28 17:40]:
> --
> 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...@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


j...@arsoft-int.com

unread,
Oct 29, 2014, 5:31:50 AM10/29/14
to beagl...@googlegroups.com
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.

j...@arsoft-int.com

unread,
Dec 4, 2014, 5:18:56 AM12/4/14
to beagl...@googlegroups.com
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.
 
@+

Robert Nelson

unread,
Dec 4, 2014, 9:45:04 AM12/4/14
to Beagle Board
> 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.

j...@arsoft-int.com

unread,
Mar 18, 2015, 5:37:28 AM3/18/15
to beagl...@googlegroups.com
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.

@+

j...@arsoft-int.com

unread,
Mar 25, 2015, 6:04:23 AM3/25/15
to beagl...@googlegroups.com
Hi,

After more test and search i found a solution with udev rules.  I was inspired by this thread :

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

@+
Reply all
Reply to author
Forward
0 new messages