BeagleBone Black using MicroSD for extended storage

35 views
Skip to first unread message

Powertourg .

unread,
Sep 22, 2019, 12:11:23 AM9/22/19
to beagl...@googlegroups.com
Hi everyone,

I was wondering if there is a clear-cut way to make a microSD card extended storage for the BBB. I would like to boot from eMMC, if possible (for quicker boot up), and have a microSD setup for extra storage. The microSD card I have is 16GB and I am currently running the iot version of 9.5. Thanks in advance!

Dennis Bieber

unread,
Sep 22, 2019, 1:07:33 PM9/22/19
to BeagleBoard


On Sunday, September 22, 2019 at 12:11:23 AM UTC-4, Powertourg . wrote:
Hi everyone,

I was wondering if there is a clear-cut way to make a microSD card extended storage for the BBB. I would like to boot from eMMC, if possible (for quicker boot up), and have a microSD setup for extra storage. The microSD card I have is 16GB and I am currently running the iot version of 9.5. Thanks in advance!

Mount it somewhere in the file system, format it (or does one have to format first -- you'll likely want it to be in ext3 or ext4 rather than native FAT32 so Linux protection and modes are active). Depending upon what you need storage for, you might move all of /home to the SD card, or partition it for /home and /var, and mount those partitions over the original.

You'd want to make the mounting operation automatic via lines added to the fstab file. Maybe need to set privileges so user accounts can access.

debian@beaglebone:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
/dev/mmcblk1p1  /  ext4  noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  defaults  0  0

debian@beaglebone:~$ ls /media/
debian@beaglebone:~$ sudo mkdir /media/sdcard
[sudo] password for debian:

debian@beaglebone:~$ ls /dev
apm_bios         i2c-1               null       tty    tty27  tty46  tty8      vcs2
autofs           i2c-2               ppp        tty0   tty28  tty47  tty9      vcs3
bc_example       iio:device0         ptmx       tty1   tty29  tty48  ttyGS0    vcs4
block            initctl             ptp0       tty10  tty3   tty49  ttyO0     vcs5
btrfs-control    input               pts        tty11  tty30  tty5   ttyO1     vcs6
bus              kmem                pwm        tty12  tty31  tty50  ttyO2     vcsa
char             kmsg                random     tty13  tty32  tty51  ttyO3     vcsa1
console          log                 rfkill     tty14  tty33  tty52  ttyO4     vcsa2
cpu_dma_latency  loop-control        rtc        tty15  tty34  tty53  ttyO5     vcsa3
cuse             mapper              rtc0       tty16  tty35  tty54  ttyS0     vcsa4
disk             mem                 shm        tty17  tty36  tty55  ttyS1     vcsa5
dri              memory_bandwidth    snapshot   tty18  tty37  tty56  ttyS2     vcsa6
fd               mmcblk1             snd        tty19  tty38  tty57  ttyS3     vhci
full             mmcblk1boot0        spi        tty2   tty39  tty58  ttyS4     watchdog
fuse             mmcblk1boot1        spidev1.0  tty20  tty4   tty59  ttyS5     watchdog0
gpiochip0        mmcblk1p1           spidev1.1  tty21  tty40  tty6   ubi_ctrl  watchdog1
gpiochip1        mmcblk1rpmb         spidev2.0  tty22  tty41  tty60  uhid      zero
gpiochip2        mqueue              spidev2.1  tty23  tty42  tty61  uinput
gpiochip3        net                 stderr     tty24  tty43  tty62  urandom
hwrng            network_latency     stdin      tty25  tty44  tty63  vcs
i2c-0            network_throughput  stdout     tty26  tty45  tty7   vcs1

{Insert SD card -- mine has a copy of the full OS since I normally boot from it}

debian@beaglebone:~$ ls /dev
apm_bios         initctl             pts        tty14  tty36  tty58     uhid
autofs           input               pwm        tty15  tty37  tty59     uinput
bc_example       kmem                random     tty16  tty38  tty6      urandom
block            kmsg                rfkill     tty17  tty39  tty60     vcs
btrfs-control    log                 rtc        tty18  tty4   tty61     vcs1
bus              loop-control        rtc0       tty19  tty40  tty62     vcs2
char             mapper              shm        tty2   tty41  tty63     vcs3
console          mem                 snapshot   tty20  tty42  tty7      vcs4
cpu_dma_latency  memory_bandwidth    snd        tty21  tty43  tty8      vcs5
cuse             mmcblk0             spi        tty22  tty44  tty9      vcs6
disk             mmcblk0p1           spidev1.0  tty23  tty45  ttyGS0    vcsa
dri              mmcblk1             spidev1.1  tty24  tty46  ttyO0     vcsa1
fd               mmcblk1boot0        spidev2.0  tty25  tty47  ttyO1     vcsa2
full             mmcblk1boot1        spidev2.1  tty26  tty48  ttyO2     vcsa3
fuse             mmcblk1p1           stderr     tty27  tty49  ttyO3     vcsa4
gpiochip0        mmcblk1rpmb         stdin      tty28  tty5   ttyO4     vcsa5
gpiochip1        mqueue              stdout     tty29  tty50  ttyO5     vcsa6
gpiochip2        net                 tty        tty3   tty51  ttyS0     vhci
gpiochip3        network_latency     tty0       tty30  tty52  ttyS1     watchdog
hwrng            network_throughput  tty1       tty31  tty53  ttyS2     watchdog0
i2c-0            null                tty10      tty32  tty54  ttyS3     watchdog1
i2c-1            ppp                 tty11      tty33  tty55  ttyS4     zero
i2c-2            ptmx                tty12      tty34  tty56  ttyS5
iio:device0      ptp0                tty13      tty35  tty57  ubi_ctrl

debian@beaglebone:~$ sudo mount /dev/mmcblk0p1 /media/sdcard
debian@beaglebone:~$ ls /media/sdcard
bbb-uEnv.txt  boot  etc   ID.txt  lost+found  mnt           opt   root  sbin  sys  usr
bin           dev   home  lib     media       nfs-uEnv.txt  proc  run   srv   tmp  var

debian@beaglebone:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              220096       0    220096   0% /dev
tmpfs              49496    5508     43988  12% /run
/dev/mmcblk1p1   3704040 2293176   1202992  66% /
tmpfs             247476       0    247476   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             247476       0    247476   0% /sys/fs/cgroup
tmpfs              49492       0     49492   0% /run/user/1000
/dev/mmcblk0p1   7572696 2296812   4917124  32% /media/sdcard
debian@beaglebone:~$

Reply all
Reply to author
Forward
0 new messages