Can't find in /etc/fstab error, unable to mount the drive.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't find in /etc/fstab error, unable to mount the drive.
Hello! First posting on LinuxQuestions.
Im using ubuntu 10.04.2-desktop-amd64 on my virtual machine. I created a directory called ~/SambaMount and when i try to mount the drive i get this /etc/fstab error. Here is the command I typed.
$sudo mount -t cifs -o username=alex,uid=100,gid=1000 //server1/SambaMount
$sudo mount -t cifs -o username=alex,uid=100,gid=1000 //server1/SambaMount
You're missing the directory to mount it on.
So then mount will try to find that directory in the /etc/fstab file and when no entry for that shared drive is present there you get an error.
Either specify the directory (which MUST already exist) or create a line for it in the /etc/fstab (which will also save you the trouble of specifying the options).
The first issue cleared up with the corrected command. Now I'm getting an error that says couldn't chdir to SambaMount no such file or directory. I created a directory called SambaMount prior to attempting the command.
Corrected command
username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
It's been a while since I windows or samba'd, but shouldn't that be \\ not // ?
AKA \\server1\SambaMount
It's the reason I favor keyboards with the \ + | key above the enter key. Even though I haven't coded for windows in more than a decade.
It might not matter, but did you chown the /SambaMount before mounting?
$ sudo chown alex:alex /SambaMount
Otherwise you might be limited to chdir of subdirectories under /SambaMount. Not that I fiddle in that land much. Also if you're not concerned with security, or shooting your own foot off, you could use umask=#### where #### is the permissions you don't want. With 0222 being no write access, and 0000 being universal access to anyone and all things relative to the mount point. Perhaps only useful for shortening your mount command at a risk.
$ sudo mount -t cifs -o umask=0000 \\server1\SambaMount /SambaMount
Perhaps samba in linux is as / \ insensitive as windows is case insensitive. Never really dwell-ed there much since I don't do windows and NFS or just nc files between computers depending on the lazy attributes of any given day.
The first issue cleared up with the corrected command. Now I'm getting an error that says couldn't chdir to SambaMount no such file or directory. I created a directory called SambaMount prior to attempting the command.
Corrected command
username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
So you ran these commands:
Code:
mount -o username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
cd /SambaMount
The first command succeeded, and the second one failed with the error message. Correct?
If so, this is very strange, and I wonder if you omitted the slash when trying to change to the /SambaMount directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.