Enhance Storage on the Beaglebone Black

The BeagleBone Black has a standard 2 GB built-in flash memory, but depending on the installed operating system and programs that sometimes can be pretty small.
If you still want to push some data to be home-folder or would like to operate the BeagleBone as WebServer, you just need more memory.

The memory can be expanded to 2 ways:

  • The installation of a micro SD card
  • The installation of USB memory.

The USB storage can be either a USB flash memory or, if a little more storage is needed, an external USB hard drive.

SD-cards and USB-memory are automatically included by the operating system, but not exactly, where you want it.

So the file /etc/fstab ( fstab = File System Table) needs to be adjusted with an editor of your choice. I use the nano editor .. which is quite easy to use and is already installed anyway.

Now you only have to find out where the memory is mounted. Case of SD cards it is easy because the are getting involved to /dev/mmcblk0.

Using USB-memory is not that so simple. If it is the only USB-memory attached, it is normally included to /dev/sda, but this may vary.

The easiest way is to look at the file /etc/mtab ( mtab = Mounting table). All the mounted file systems are listed there.
Or you can use the command blkid.
This should look like this.

root@arm:~# blkid 
/dev/mmcblk1p2: LABEL="rootfs" UUID="cfd27b95-bd67-4fca-97cc-8643b5179305" TYPE="ext4" 
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL="boot" UUID="6298-33D0" TYPE="vfat" 
/dev/sda1: UUID="1417b3aa-82bb-4120-bdf9-df133e54f806" TYPE="ext3"

So here you can see that the hard drive is included on /dev/sda1.

Now you can tell the BeagleBone where to mount the memory.

So with

nano/etc/fstab

open the file.
It should look something like this

# /etc/fstab: static file system information.
#
# Auto generated by: beaglebone-black-copy-microSD-to-eMMC.sh
#
UUID=cfd27b95-bd67-4fca-97cc-8643b5179305  /  ext4  noatime,errors=remount-ro  0  1
UUID=6298-33D0  /boot/uboot  auto  defaults  0  0

Now you have to insert the mount points for the additional memory. If you want more memory for your web-pages and use it a SD-card, the new line should look like this.

# /etc/fstab: static file system information.
#
# Auto generated by: beaglebone-black-copy-microSD-to-eMMC.sh
#
UUID=cfd27b95-bd67-4fca-97cc-8643b5179305  /  ext4  noatime,errors=remount-ro  0  1
UUID=6298-33D0  /boot/uboot  auto  defaults  0  0
/dev/mmcblk0    /var/www     auto  rw        0  0

Or, in the case of a USB memory

# /etc/fstab: static file system information.
#
# Auto generated by: beaglebone-black-copy-microSD-to-eMMC.sh
#
UUID=cfd27b95-bd67-4fca-97cc-8643b5179305  /  ext4  noatime,errors=remount-ro  0  1
UUID=6298-33D0  /boot/uboot  auto  defaults  0  0
/dev/sda1    /var/www     auto  rw        0  0

Then restart the new BeagleBone and it should be done.

Schreibe einen Kommentar