When first tinkering around with my Raspberry Pi 2 I just booted from the SD card and got my USB drive, which I'm using to host GIT repositories, to automatically mount on startup.
In order to get more space I'm now using an external HDD as root filesystem. Since I managed to get things running correctly I'm unable to automount my USB drive on startup altough it's listed in my /etc/fstab:
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 #!!! next line is the HDD raspbian is running on !!! /dev/disk/by-uuid/f9922113-a0fc-44b9-b3bb-7c2f7da670c4 / ext4 defaults,noatime 0 1 /dev/sda1 /mnt/usbdrive auto uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0
I also tried to mount it by label and UUID (like my HDD) but to no avail. Is there some kind of "mounting order" to consider since my HDD is /dev/sdb1 and by USB drive /dev/sda1?
Regarding the UUID I forgot to mention something strange. I basically got the UUID by using blkid resulting in
/dev/sda1: LABEL="GIT" UUID="3a20b6ab-f7cb-44a4-9437-23b8ba33fef2" TYPE="ext4"
When I take a look at the UUIDs in /dev/disk/by-uuid I get the following
lrwxrwxrwx 1 root root 10 Jan 1 1970 66a72c4f-1a9b-47ad-99b7-3040ab1f79f6 -> ../../sda1
Of course I tried both UUIDs for automount but expectably neither worked. Maybe this discrepancy is the root cause.
Thanks to the guys over at Unix & Linux StackExchange blkid and /dev/disk/by-uuid now are in sync again. Unfortunately this hasn't fixed my automount problem. Any further ideas what the cause might be?