Auto-mounting an SD card - 2020.2 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2020-11-24
Version
2020.2 English

Auto-mounting an SD Card during the Build

To auto-mount an SD card during the build, follow the instructions in https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842475/PetaLinux+Yocto+Tips#PetaLinuxYoctoTips-HowtoAutoMountSDcardinYoctoRecipes.

Auto-mounting SD Partitions after Linux is Running

To mount the SD partitions to a user-defined path, follow these steps:

  1. Boot the Linux prompt.
  2. Create the direct path, for example:
    mkdir /media/card
  3. Edit the file as shown below:
    vim /etc/fstab /dev/mmcblk0p2 /media/card ext4 defaults 0 1 4

    Save and exit.

    $ reboot
  4. Check the SD mount point using the mount command:
    root@xilinx-zcu102-2020_2:~# mount /dev/root on / type ext4 (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=1883804k,nr_inodes=470951,mode=755) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /var/volatile type tmpfs (rw,relatime) /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/mmcblk0p2 on /media/card type ext4 (rw,relatime) /dev/mmcblk0p1 on /media/sd-mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/mmcblk0p2 on /media/sd-mmcblk0p2 type ext4 (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)