External Hard Drive not mounted on reboot

After last update I have a problem with my external hdd. If I reboot diet pi, hdd wont automount, I need to mount it manually after reboot. I’ve tried to reinstall dietpi, but it not helped. Any ideas?

Hi,

Can you share your /etc/fstab pls

Now another thing, after fresh install now I’m getting this error

root@DietPi:~# /etc/fstab
-bash: /etc/fstab: Permission denied

I did everything same like always, why now I don’t have permissions?

Because this is a configuration file and not something you can execute :wink:

Just do cat /etc/fstab

Ok, good to know )

# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1938M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------


#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=e8af6eb2-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=e8af6eb2-01 /boot vfat noatime,lazytime,rw 0 2
UUID=94BA918FBA916F0C /mnt/94BA918FBA916F0C fuseblk noatime,lazytime,rw,nofail,noauto,x-systemd.automount

Your disk should be mounted to /mnt/94BA918FBA916F0C correct?

What happen if you try to access /mnt/94BA918FBA916F0C right after reboot

After each reboot instead of /mnt/94BA918FBA916F0C it’s looks like this. Sorry, I’m a newbie on this, if need detailed information, please write which command I need to type
https://paste.pics/CD98T

I’m totally confused now. You are showing a picture from dietpi-software. Did you tried to access your HDD like cd /mnt/94BA918FBA916F0C after reboot. Did it show your data?

After reboot

root@DietPi:~# cd /mnt/94BA918FBA916F0C
-bash: cd: /mnt/94BA918FBA916F0C: No such device

Can you share ls -la /mnt

root@DietPi:~# ls -la /mnt
total 20
drwxr-xr-x  6 root   root   4096 May  2 18:01 .
drwxr-xr-x 18 root   root   4096 Mar 25 19:59 ..
drwxr-xr-x  2 root   root      0 Feb 14  2019 94BA918FBA916F0C
lrwxrwxrwx  1 root   root     37 May  2 18:01 dietpi_userdata -> /mnt/94BA918FBA916F0C/dietpi_userdata
drwxrwxr-x  2 dietpi dietpi 4096 Mar 25 19:38 ftp_client
drwxrwxr-x  2 dietpi dietpi 4096 Mar 25 19:40 nfs_client
drwxrwxr-x  2 dietpi dietpi 4096 Mar 25 19:40 samba

Can you share following

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
blkid
root@DietPi:~# lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
NAME FSTYPE LABEL   SIZE RO TYPE MOUNTPOINT PARTUUID                             UUID
sda                 5.5T  0 disk                                                
├─sda1
│                   128M  0 part            2b0235dc-2d32-4ea1-a25e-c47e1e4f1ae2
└─sda2
     ntfs   Seagate
                    5.5T  0 part            703a1435-f51e-49b4-9b87-c1c61883b252 94BA918FBA916F0C
sdb               119.2G  0 disk                                                
├─sdb1
│    vfat   boot    256M  0 part /boot      e8af6eb2-01                          DC3E-E470
└─sdb2
     ext4   rootfs
                    119G  0 part /          e8af6eb2-02                          a7adb26a-8b87-4729-99c8-9f5ac069d51e
root@DietPi:~# blkid
/dev/sda2: LABEL="Seagate" UUID="94BA918FBA916F0C" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="703a1435-f51e-49b4-9b87-c1c61883b252"
/dev/sdb1: LABEL_FATBOOT="boot" LABEL="boot" UUID="DC3E-E470" TYPE="vfat" PARTUUID="e8af6eb2-01"
/dev/sdb2: LABEL="rootfs" UUID="a7adb26a-8b87-4729-99c8-9f5ac069d51e" TYPE="ext4" PARTUUID="e8af6eb2-02"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="2b0235dc-2d32-4ea1-a25e-c47e1e4f1ae2"
root@DietPi:~#

I don’t know why, but last three reboots was ok and hdd mounted automatically. Hopefully problem is gone

ok let’s fingers cross it is gone. At least from config point of view it seems to be fine.

Hmm, looks like I was celebrating to early. At Diepti-software after reboot it’s showing proper path to User data location instead of just USB drive. But it’s still not mounted after reboot. Yesterday I did fresh install but I’m still using same external hdd for data, is it possible what kind of configs are on external hdd and causing this problems? After last update I installed Home Automation software, maybe this software caused this problems. After fresh install I’m not installed this software anymore, but problem still persist.

can you do a reboot and try to access the drive. Once done let’s check for kernel error messages

cd /mnt/94BA918FBA916F0C
dmesg -l err,crit,alert,emerg

It’s no errors

root@DietPi:/mnt/94BA918FBA916F0C#

And it’s changed directory to hdd, but it’s still not mounted according Drive Manager

let’s put drive manage aside.

Just do

cd /mnt/94BA918FBA916F0C #to access the drive
ls -la #to display the content
df -h #to check drives and file systems

After reboot

root@DietPi:~# cd /mnt/94BA918FBA916F0C #to access the drive
root@DietPi:/mnt/94BA918FBA916F0C# ls -la #to display the content
total 8
drwxr-xr-x 2 root root 4096 May  2 18:00 .
drwxr-xr-x 6 root root 4096 May  2 18:01 ..
root@DietPi:/mnt/94BA918FBA916F0C# df -h #to check drives and file systems
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       118G  2.4G  110G   3% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G  1.1M  1.9G   1% /dev/shm
tmpfs           1.9G   11M  1.9G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs            50M   36K   50M   1% /var/log
tmpfs           1.9G  4.0K  1.9G   1% /tmp
/dev/sdb1       253M   50M  203M  20% /boot

When mounted

root@DietPi:/mnt/94BA918FBA916F0C# cd /mnt/94BA918FBA916F0C #to access the drive
root@DietPi:/mnt/94BA918FBA916F0C# ls -la #to display the content
total 19493
drwxrwxrwx 1 root   root          0 May 30  2019 '$RECYCLE.BIN'
drwxrwxrwx 1 root   root       4096 Apr 29 09:54  .
drwxr-xr-x 6 root   root       4096 May  2 18:01  ..
-rwxrwxrwx 2 root   root     396818 Sep 19  2018  .VolumeIcon.icns
-rwxrwxrwx 2 root   root     318246 Sep 19  2018  .VolumeIcon.ico
-rwx------ 1 root   root         74 May  5  2018  .___var.txt
-rwx------ 1 root   root          0 May  5  2018  .___var.txt.74
-rwx------ 1 root   root         74 May  5  2018  .__admin_var.txt
-rwx------ 1 root   root          0 May  5  2018  .__admin_var.txt.74
-rwx------ 1 root   root         23 May  5  2018  .__folder_list.txt
-rwx------ 1 root   root          0 May  5  2018  .__folder_list.txt.23
-rwxrwxrwx 2 root   root       4096 Sep 19  2018  ._)
drwx------ 1 root   root          0 Jun  7  2019  .minidlna
-rwxrwxrwx 1 root   root         33 Sep 19  2018  Autorun.inf
-rwxrwxrwx 2 root   root   18033016 Sep 19  2018  Start_Here_Win.exe
drwx------ 1 root   root       4096 Jun  6  2019 'System Volume Information'
-rwxrwxrwx 1 root   root    1172289 Sep 19  2018  Warranty.pdf
drwxrwxr-x 1 dietpi dietpi     4096 May  3 08:31  dietpi_userdata
root@DietPi:/mnt/94BA918FBA916F0C# df -h #to check drives and file systems
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       118G  2.4G  110G   3% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G  1.1M  1.9G   1% /dev/shm
tmpfs           1.9G   11M  1.9G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs            50M   36K   50M   1% /var/log
tmpfs           1.9G     0  1.9G   0% /tmp
/dev/sdb1       253M   50M  203M  20% /boot
/dev/sda2       5.5T  1.9T  3.7T  34% /mnt/94BA918FBA916F0C