[Solved] Ubuntu 14.04 auto-mounting drive not actually "mounted" until opened

Hello all! quick question! (which i would have asked on the ubuntu forums but for the life of me i couldn't find the register button)

"Server" situation:
750GB HDD - Running Ubuntu 14.04 LTS (desktop version)
2TB HDD - NTFS drive holding backup and shared data for local network via samba share(whole drive)
Both connected via internal sata.

Every time the computer restarted, i couldnt access the 2TB drive via samba share. Usually the error was directory not found or insufficient permissions to view.

I discovered the problem was the drive wasn't automatically mounting on startup. (which i fixed via the disks panel by turning on auto mount)

Now when the computer restarts, the drive says that its mounted (when i right click the drive it gives the unmount option instead of mount).

HOWEVER... same problem. Cannot access it via samba on another computer. UNLESS i open the drive first on the ubuntu machine.(literally, just double click it to see the files) After that, I can access it and all works fine over the network etc.on all my devices.

Did I break something while fiddling with the terminal and disks panel? Or did I miss something?

(I'm still learning linux and will be installing to debian later, but i want to figure out why this issue has happened first)

Thanks for any help!

Rather than using the gui I'd add the mount options to your /etc/fstab file. It should look something like this:

//server/share /media/mount cifs credentials=/path/to/credentials/file,auto,users,uid=user 0 0

Where //server/share is the path of the samba share, /media/mount is the path of the mount point (you'll need to create this first, just make a directory and put the path to it here). Use your user name in place of user in the uid=user part, otherwise it will mount as root. And for the credentials file create a file that contains these two lines:


This is the user and password for the samba shares. If you don't use authentication then just remove the credentials part.

That should mount it automatically on boot.


Thanks! Ill hopefully be able to try that tomorrow

This can be a very stupid fix that was based on a problem at install.

Did you give the drives a root tag. Like /home is a root tag. /store1 /store2 etc. If not you have to manually open them on boot. It works like this on desktop so I ask for that reason.

sounds like it is not auto mounting. what does /etc/fstab say

Gah i only just got some free time to try

From my fstab file, the disks utility did indeed set it up correctly.

Yet i still need to physically open the drive on ubuntu before the samba share starts working.

For all intents and purposes, ubuntu believes the drive to be mounted at startup, yet the above problem still keeps happening

fstab for the drive in question:

/dev/disk/by-uuid/EE9833EA9833AFC7 /mnt/EE9833EA9833AFC7 auto nosuid,nodev,nofail,x-gvfs-show 0 0

can you tell me your drive number? /dev/sdX

woops you replied as I was editing

fstab for the drive in question:

/dev/disk/by-uuid/EE9833EA9833AFC7 /mnt/EE9833EA9833AFC7 auto nosuid,nodev,nofail,x-gvfs-show 0 0

what does


Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00086fce

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1460957183 730477568 83 Linux
/dev/sda2 1460959230 1465147391 2094081 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 1460959232 1465147391 2094080 82 Linux swap / Solaris

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0005ee77

Device Boot Start End Blocks Id System
/dev/sdb1 2048 3907026943 1953512448 7 HPFS/NTFS/exFAT

replace the fstab line with this

when i did that, the drive seemed to un-mount and was completely inaccessible.

when i reverted back to the original fstab line for it, the drive re-mounted by itself.

The samba share for the drive itself also seems to be completely gone now (cannot access at all over network and the samba server on ubuntu no longer lists its directory)

I'm gonna try this again from scratch tomorrow and see what happens.

Thanks for the help so far!

if all else fails you could make a script that runs at startup to mount the drive manually.

Thats a possibility. I doubt many servers need such scripts to get their drives mounted properly

Its just that this issue seems so weird where the drive is "pseudo" mounted in ubuntu and the samba share just doesnt work until i open it up...

Ive had plans to install mint on the PC, so if all else fails i'll do the distro switch and try this again.

Granted I've been a pure windows user for... ever... (not even touched apple ios etc.) So this is a trial and error experience for me. (although such methods worked fine for me with windows)

well holy bleep it works as intended now

Here's what happened:

  1. I accidentally restarted the PC instead of shut down, and during boot it tried to boot from the wrong drive suddenly
  2. After fixing the boot order, it turned on fine and the drive was accessible via its samba share
  3. Restarted multiple times and each time it works as intended.

The weird-er thing is... all settings etc were the same as they were when I first made this thread.

I'm utterly confused about what was causing the problem now... but things seem to work!

1 Like

good to hear, will mark this as solved now.