How to Configure SD Card for External Storage on a BBB

Home > Guides

Since the BBB on-board memory is limited to 4GB it may be useful to set up a micro SD card as an external storage device.

NOTE: Make sure to clear the contents of the SD card and format it prior to this, especially if you are using the same card that you flashed the BBB with.


    1. To begin:

      • Insert SD card into your laptop.
      • Right-click on the SD card in the left column of the File Explorer and select ‘Format’. Make sure that the ‘File System’ entry is set to ‘FAT32’.
        • REMINDER: Formatting the SD card will erase all data on it.
      • Eject the SD card after formatting.

    2. Insert the SD card into the micro SD card slot on the BBB and type:

      sudo fdisk -l
      This shows the accessible disks. The SD card will have a 'Disk' entry and a 'Device' entry as shown:

      Take note of the difference between disks and devices that are needed for the Debian image and to boot the BBB and the disks/devices that correspond to your SD card:

      Take note of the device name for your SD card. It should be something like '/dev/XXXX'.

    3. Create a mount point for the SD card by typing:

      sudo mkdir /mnt/SD
      '/mnt/SD' is an arbitrary name for a directory. Feel free to name it whatever you like.

    4. Mount the SD card to the mount point by typing:

      sudo mount -t vfat /dev/XXX /mnt/SD
      '/dev/XXX' is the SD card's device name.

    5. Check that the SD card has been mounted by typing:

      df -k
      This should output a list of the mounted devices. Check that your device name shows up and that it is mounted to the directory that you made in step 3.

    6. Create the storage file on the SD card:

      Make an empty file by typing:
      sudo vi /mnt/SD/storage.txt
      Here, '/mnt/SD' is the directory name created in step 3 and 'storage' is an arbitrary name for the file. Note that you should only create files with a .txt extension.

    7. Write some content to this file so that it can be recognized as the working file in that directory:

      • Press 'i' to change to Insert mode.
      • Type whatever you want into the file. This can be arbitrary since it will be deleted later.
      • Press 'ESC' to return to Command mode.
      • Press ':' followed by 'x' to exit and save the file.

    8. Check that the file you created is the working file in that directory and type:

      sudo ls /mnt/SD/
      This should display the working file of that directory. Again, '/mnt/SD' is the directory that you created in step 3.
      You should see the following output:

      'storage.txt' is the name of the file that you created in step 6.

    9. Clear the contents of the file you created in step 6. Follow the same procedure that you did in step 7, but this time, delete the content that originally wrote there. Confirm that this file is still the working file in the directory by repeating step 8.

NOTE: The newer distributions of Debian DO NOT automount SD cards on boot, so the SD card will have to be mounted every time the BBB is turned on. You only need to run the mount command from step 4 on startup. Check that the SD card is mounted by repeating step 5.