You want to use the USB gadget to export the SD Card filesystem. This is similar to something I'm doing for an upcoming DEFCON talk. Here is the script for that talk:
#!/bin/bash # stop the GETTY service if needed if which 'systemctl' ; then systemctl stop [email protected] >/dev/null fi # unload current composite gadget modprobe -r g_multi # these variables are used to export all partitions fstr="" rostr="" # unmount the USB drive for d in $(ls /dev/sd*) ; do if echo "$d" | egrep '[1-9]$' >/dev/null ; then umount $d fstr+=",$d" rostr+=",1" fi done fstr=${fstr:1} # strip leading comma rostr=${rostr:1} # strip leading comma echo "$fstr" >/tmp/usbexports # save for later r/w export # now export it vend=$(( 0x1337 )) # pick your favorite vid/pid prod=$(( 0x1337 )) echo "$vend" >/tmp/usbvend # save vid/pid for r/w export echo "$prod" >/tmp/usbprod modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr \ removable=1 nofua=1 idVendor=$vend idProduct=$prod On Fri, Jul 10, 2015 at 9:26 AM <[email protected]> wrote: > I have a new BBB with Debian. I want the SD Card to appear on the USB port > (to Host) rather than the internal memory. I find references to uDev.txt > and modifying other files related to boot but it seems like it;s more for > the pre Debain stuff. I have the card formatted and when I ssh in, I can > see it mounted in /media so I am that far. I put a iDev.txt on that card. > What else do I change? > > Thanks > > -Jim > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
