I'm running raspbian on a raspberry pi 2. I have an external USB hard drive plugged in (mains powered), and I can manually mount the drive, but I can't seem to get it to automatically mount.

I followed this guide: http://www.modmypi.com/blog/how-to-mount-an-external-hard-drive-on-the-raspberry-pi-raspian

I'm trying to mount the drive at /mnt/external rather than /mnt as in the guide above. I've also tried a few other guides, all to no avail.

The partition I want to mount is on sda2, this is the results of sudo fdisk -l

/dev/sda2       102402048  1953523711   925560832   83  Linux

When I run sudo mount /dev/sda2 /mnt/external it works as expected I can copy files to the hd (and see the light flickering so it definitely writing to the right device).

I've change the permissions as the guidde said, here's the results of ls -l

drwxrwx--- 2 root root 4096 Mar  8 16:54 external

I've sudo'd into fstab and edited to:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p5  /boot           vfat    defaults          0       2
/dev/mmcblk0p6  /               ext4    defaults,noatime  0       1
#### a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swapfile swap[on|off]  for that
/dev/sda2       /mnt/external   ext4    defaults        0       0

This gives me a permsission denied error if I try to cd in /mnt/external from boot. But if I manually mount the partition it works fine again.

I've tried changing the options to uid=1000,gid=1000,umask007 as per other guides this also doesn't work.

  • Questions about automounting are actually not pi specific and belong on our larger sibling site, Unix & Linux. As per Millway's comment on your answer, you either did not follow the posted links properly or they were wrong in the first place. – goldilocks Jun 4 '15 at 20:41

I managed to fix it by specifying the UUID instead of /dev/sda2 not sure why, but it worked, the line from fstab is now

UUID=<<<uuid here>>> /mnt/external ext4 defaults 0 0

  • 1
    You obviously did not follow the guide. Your /mnt/external has no permissions for Other users. – Milliways Mar 8 '15 at 23:31

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