Chapter 7. Storage
7.1. Devices Which Can Be Used as Storage
The devices shown in Table 7.1, “Storage Devices” can be used as storage on Armadillo-440.
Table 7.1. Storage Devices
Device Type
Disk Device
First Partition
USB Flash Memory
/dev/sd*
/dev/sd*1
microMMC / microSD Cards
/dev/mmcblk*
/dev/mmcblk*p1
7.2. Using Storage
Using a microSD card as an example, the following explains how to use storage.
On Linux all accessible files and directories are brought together in one tree structure. Adding the filesystem of a storage
device to this tree structure is called mounting. The mount command used to perform this mounting.
The typical format used with the mount command is as shown in Figure 7.1, “mount Command Format”.
mount -t fstype device dir
Figure 7.1. mount Command Format
The filesystem is specified following the
-t
option
[1]
.
vfat
is specified for FAT32 filesystems
[2]
, and
ext3
for EXT3
filesystems.
The device file name of the storage device is specified for
device
. For partition 1 on a microSD card, this will be
/
dev/mmcblk0p1
, and for partition 2 it will be
/dev/mmcblk0p2
.
The directory where the filesystem on the storage device is to be mounted is specified for
dir
.
When the command shown in Figure 7.2, “Mounting Storage” is executed while a microSD is in the microSD slot, the
filesystem on the microSD card is mounted to the /mnt directory. The files on the microSD will now be visible under the /
mnt directory.
[armadillo ~]# mount -t vfat /dev/mmcblk0p1 /mnt
Figure 7.2. Mounting Storage
In order to safely remove storage it must be unmounted. The umount command is used to perform the unmounting. The
directory where the device to unmount is mounted is specified as its option.
[1]
The filesystem option may be omitted. When it is omitted, the mount command attempts to guess the filesystem type. As this guess may not always be
correct, it is best to specify it when the filesystem type is known.
[2]
Normally, purchased microSD cards come formatted with a FAT32 filesystem.
Armadillo-440 LCD Model Development Set Startup Guide
Storage
52