Can't mount a permanently installed USB flash drive to the mount point of my choosing with Raspian 10

125 Views Asked by At

I want my Raspberry Pi 4B, running Raspian 10, to boot up with a permanently-inserted USB flash drive mounted to /srv/www. The flash drive will never be removed. I formatted the flash drive with an ext4 filesystem. I can manually mount the drive to /srv/www and perform normal file operations.

When I add an entry to /etc/fstab like this:

/dev/sda1  /srv/www  ext4  0  0

or like this:

UUID=651003ce-5261-4b00-9940-6207625a5334  /srv/www  ext4  0  0

the mount does not succeed when the system boots. I've been at this for hours, trying various suggestions for configuring systemd and see a variety of errors in system logs such as "/dev/sda does not contain a filesystem" but fsck tells me it does. Before I go spend more hours, is what I'm trying to do possible and where am I going wrong?

1

There are 1 best solutions below

0
Ed S. On

Unable to find a fstab-related solution, I solved the problem by placing these two lines in /etc/rc.local

sleep 5s
mount /dev/sda1  /srv/www