Mounting an SD Card
Due to limited onboard resources, external files are usually recommended to be stored on an SD card. This chapter describes how to mount an SD card.
Create the SD card mount point
mkdir -p /sd_cardView the SD card device node
ls /dev/mmc*Expected output:
mmcblk1 mmcblk1p1Where:
- /dev/mmcblk1 represents the entire MMC/SD card device.
- /dev/mmcblk1p1 represents the first partition on this card.
Mount the SD card
mount /dev/mmcblk1p1 /sd_cardCheck whether the mount succeeded
df -h | grep sd_cardExpected output:
/ # df -h | grep /sd_card /dev/mmcblk1p1 14.8G 56.1M 14.8G 0% /sd_card / #If the output contains
/sd_card, the mount succeeded. You can now copy external files into this directory for storage and use.Unmount the SD card
After finishing file read/write, unmount the SD card before removing the media to avoid data corruption.
umount /sd_cardTo remount, run the mount command again.
