Auto mount at boot - GruszekG/nanny GitHub Wiki

1. Connect your drive to BBB.

2. Check UUID of your drive:

blkid /dev/mmcblk0p1: LABEL="rootfs" UUID="11be5f32-4769-473a-a746-355aa0132f0f" TYPE="ext4" PARTUUID="3244345d-01" /dev/mmcblk1p1: LABEL_FATBOOT="BEAGLEBONE" LABEL="BEAGLEBONE" UUID="5147-0BFF" TYPE="vfat" /dev/mmcblk1p2: LABEL="Angstrom" UUID="80ea61a2-9213-4ed9-b29e-61228cfdcaac" TYPE="ext4" /dev/sda1: UUID="0b5d1556-fbb4-45ca-b25e-a030d9302b06" TYPE="ext4" PARTUUID="062ec3d5-01"

3. Edit your 'fstab' file:

  • open /etc/fstab with nano,
  • add new line to 'fstab' file

UUID=0b5d1556-fbb4-45ca-b25e-a030d9302b06 /mnt/usb_pendrive ext4 defaults 0 2

4. Verify your 'fstab' file

findmnt --verify

5. Try use 'fstab'

mount -a

5. Check if drive is mounted correctly

df | grep /dev/sda1 /dev/sda1 14816136 1528880 12514904 11% /mnt/usb_pendrive

6. Reboot your BBB

sudo reboot

7. Check if your drive is mounted after reboot

df | grep /dev/sda1 /dev/sda1 14816136 1528880 12514904 11% /mnt/usb_pendrive

References:

https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+and+set+auto-mount+at+boot