I have a Raspberry PI 2 running the newest version of Raspbian Stretch Lite in Command Line environment. Out of the box my external USB hard/flash drives are not auto-mounted when plugged into the Raspberry Pi.
The ultimate goal is to have any USB drive to auto-mounting when plugged into the Raspberry PI 2. If it is not possible to achieve this for all drives, then as a worst case scenario I would be ok to auto-mount specific HDDs by specifying their UUIDs.
I have been looking into this for hours, but I could not find a solid and simple solution online. I would truly appreciate if someone could please post a working solution in here. Moreover, below you can see the output of my sudo blkid. In this case I want the USB hdd assigned to /dev/sda1 to be auto-mounted when I plug it into my Raspberry pi 2.
Code: Select all
pi@raspberrypi:~ $ sudo blkid /dev/mmcblk0p1: LABEL="boot" UUID="CDD4-B453" TYPE="vfat" PARTUUID="896c5641-01" /dev/mmcblk0p2: LABEL="rootfs" UUID="72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2" TYPE="ext4" PARTUUID="896c5641-02" /dev/mmcblk0: PTUUID="896c5641" PTTYPE="dos" /dev/sda1: UUID="93ddc2e0-48e1-457c-9d59-f6a34596e6e1" TYPE="ext4" PARTLABEL="SSD-120GB" PARTUUID="9eea6391-2399-4983-889c-d5a651c73952"