2

I'm trying to mount a usb harddrive on boot on my freshly installed raspbian. I added the following line to my /etc/fstab:

UUID=73a104af-6ada-4956-b1e2-90bfdc08aba5 /mnt/Platte ext4 defaults,noatime 0 0

However, the drive wont mount. I always have to run

sudo mount -a

for it to show up as mounted. Any ideas what i could possibly have done wrong?

1

Add the auto option, to say fstab to auto mount it at startup

    UUID=73a104af-6ada-4956-b1e2-90bfdc08aba5 /mnt/Platte ext4         defaults,noatime,auto 0 0
0

You could use crontab:

sudo crontab -e

then enter this at the bottom of the file:

@reboot sudo mount -a /dev/LOC /mnt/Platte

where LOC is the location of the partition, EX: sda1

The way to find the location is by removing all over flash drives and then enter:

sudo ls /dev/sd*1

which will return the location of the flash drive.

EDIT

You could still use the UUID to mount it.

0

I had a similar problem. I fixed mine in following way,

Get the uuid of the external hard drive with following command

sudo blkid

Add the entry into fstab so that when you restart the raspberry device it is auto mounted every time

sudo nano /etc/fstab

UUID=0A423D084xxxxxx /mnt/data ntfs defaults,noatime,auto 0 0

Some explanation for above command - I mounted it to /mnt/data directory. ( You need to create it first if doesn't exist with sudo mkdir /mnt/data ) Mine was a NTFS format. You might try only the defaults option. I added noatime and auto to experiment a few things. You can check more details about it on internet.

Some Raspberry device ( including mine ) needs one more addition ( optional, try only if above doesn't work ), after above command, add a 5 seconds delay to loading the device as sometimes the Raspberry OS loads faster than external drive and external hard drive loads a little slower and need more time to start, in this case the external drive isn't auto mounted and it is skipped with an error at the start. Add the following property/value to the end of your cmdline.txt inside /boot folder

sudo nano /boot/cmdline.txt

Add

rootdelay=5

Hope it helps!

Not the answer you're looking for? Browse other questions tagged or ask your own question.