Mount external Hard Drive with /etc/fstab on ubuntu 14.04 problems

25,490

Solution 1

The first error you got is because there is no such thing as sec=ntl. The available options are (from man mount.cifs):

sec=

Security mode. Allowed values are:

  • none - attempt to connection as a null user (no name)

  • krb5 - Use Kerberos version 5 authentication

  • krb5i - Use Kerberos authentication and forcibly enable packet signing

  • ntlm - Use NTLM password hashing

  • ntlmi - Use NTLM password hashing and force packet signing

  • ntlmv2 - Use NTLMv2 password hashing

  • ntlmv2i - Use NTLMv2 password hashing and force packet signing

  • ntlmssp - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message

  • ntlmsspi - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message, and force packet signing

So, the first approach (using the fstab) might work if you use one of the above. Presumably, you wanted sec=ntlm.


As for the 115 error, I found this very nice guide on the Gentoo forums that I suggest you read. Basically, it suggests adding a line like this to your /etc/hosts file (change 192.168.1.12 to the IP of your drive):

192.168.1.12    Seagate-XXXXX

Once that's done, you should be able to use Seagate-XXXXX instead of the IP to connect. The page provides some other troubleshooting tips (including using smbtree to make sure that the share is actually available). I really suggesty you read it.

Solution 2

Have you tried adding the mount command to /etc/rc.local ? /etc/rc.local is a file that is executed by root at boot time and normally doesn't do anything. However you can edit it and add your own stuff. Just make sure that you move the "exit 0" command that's already in there down below the commands you want it to execute.

That's how I auto-mount my USB connected external at boot. Just make a mount point with:

sudo mkdir /mnt/foo

Where foo is whatever name you want to give it. Then edit /etc/rc.local and add the mount command on a line anywhere above the exit command. Just be aware that when mounted this way, most desktop environments in my experience no longer detect it as an external device, so you won't have the fancy little icon, you'll actually have to navigate to and bookmark /mnt/foo in order to browse the drive.

I started auto-mounting mine with rc.local after having all sorts of issues editing fstab. Hope this helps, :-)

Edit:

Here are the entire contents of my rc.local file. I just thought I would share so you can see what I did. Prior to saving your rc.local and rebooting though, make sure that whatever mount point you specify in the mount command has actually been created. Also there is no need to add "sudo" to commands here, they are executed by the root user.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#Mounts Storage
mount /dev/sdb1 /mnt/Storage

exit 0
Share:
25,490

Related videos on Youtube

Banished geek
Author by

Banished geek

Updated on September 18, 2022

Comments

  • Banished geek
    Banished geek over 1 year

    I have been stuck for about two days trying to get this to work properly. I have done all of the following with still no luck.

    I'm trying to auto permanently mount to a 2 TB Seagate Central that is on my network, using Ubuntu 14.04 LTS Desktop and I updated all cifs before starting.

    I added the following line to /etc/fstab as root:

    #Mapping network drive
    //Ip-address/media/videos  /media/storage cifs username=username,password=password,iocharset=utf8,sec=ntl
    

    I also swapped out the ip-address for its name as well. Since I know this is not the most secure way, but I'm the only one using this Ubuntu-Desktop also tried the credentials document method without luck.

    In the terminal:

    sudo mount -a
    
    mount error(22): Invaild argument
    refer to mount.cifs(8) manual page (e.g. man mount.cifs)
    

    After seeing that I tried the following:

    sudo mount.cifs //Seagate-XXXXX/Media/videos /media/storage 
    

    I was then promoted for the password to the network storage and enter in correctly:

    Error:
    mount error(115): operation now in progress  
    Refer to mount.cifs(8) manual page (e.g. man mount.cifs)
    

    I got it to work one time, but i had to reinstall Ubuntu after that, and can't seem to get it back working.

    I've looked up many different videos and forums and I'm doing this so I can set up my Plex server to see my media folder on a external hard drive.

    I have red and watched the following links/videos to no avail [Please Help!]:

  • Banished geek
    Banished geek about 10 years
    What is the Link to that page?
  • terdon
    terdon about 10 years
    @user280186 ouch, sorry, I forgot it. Here you go and I also added it to the answer.
  • Banished geek
    Banished geek about 10 years
    Yeah i tried, but no luck either