SlackwareThis Forum is for the discussion of Slackware Linux.
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.
How is your IP address handled? I ran into issues in the past if I didn't have it handled directly with rc.inet1 (instead of wicd, at the time), because the network would get started too late and the initial mount would fail.
Have you tried running a mount -a after you're booted and connected to the network to see if it fails there? It would help narrow down if it's something with the fstab or something with the boot process.
(in place of {} write a percent sign, seems like the forum software is cutting it off)
in the mount options could be useful also to specify to which local user/group map the ownership of the files: in case of the default user/group for the first user defined on a Slackware install, add just after the user=... part
(in place of {} write a percent sign, seems like the forum software is cutting it off)
Didier pointed out that you can't use percent signs (%) when using the quick reply/edit functions, but it should work fine if you use the "advanced editor".
But as far as the fstab, I know that the username=username,password=password used to work (I don't have a need for smb mounts in my fstab anymore, so I can't verify it still works). But I did eventually move my username/password to a separate file for security reasons. You can create a file like /etc/smbcredentials and then reference it in the fstab
1. Replaced comma with percentage sign
2. Replaced username and password with /etc/smbcredentials file
Quote:
Originally Posted by bassmadrigal
How is your IP address handled? I ran into issues in the past if I didn't have it handled directly with rc.inet1 (instead of wicd, at the time), because the network would get started too late and the initial mount would fail.
I have the below entry in my rc.inet1. Is this the best way to handle my IP address.
Code:
# Config information for ath0
IFNAME[1]="ath0"
IPADDR[1]="XXX.XXX.X.X"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]="XXXXXX"
GATEWAY="XXX.XXX.X.X"
Quote:
Originally Posted by bassmadrigal
Have you tried running a mount -a after you're booted and connected to the network to see if it fails there? It would help narrow down if it's something with the fstab or something with the boot process.
You mean just type mount -a in the command line? I get:
Code:
mount: devpts already mounted or /dev/pts busy
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Ok, so the portion in your /etc/fstab is leading to the permission denied. I wonder if your options being at the end of the command are the problem. Try the following and see if you get an error with it.
Code:
sudo mount -t cifs -o username=XXXXXX,password=XXXXXX //192.168.0.7/NetBackup /mnt/SynologyNAS
If you do, the mount command was probably disregarding your username/password and you were probably mounting your samba share as a guest. Then when you throw a username and password at it, it fails because that user isn't set up properly on the samba server.
Depending on your distribution, you might have to add _netdev to the mount options in fstab.
This is a systemd thing, as it seems to not be able to recognize a network device, and doesn't wait until the network is up (and functional) before trying to perform the mount without it.
Also, if your system is shared (or even if not), the /etc/fstab should not be readable by anyone but root as your password is now in plaintext for anyone to read.
Slackware doesn't have systemd, and I'm not sure if _netdev is used in non-systemd systems (couldn't seem to find info on it one way or the other, but I didn't try too hard).
Slackware's boot process does prevent mounting network drives before rc.inet1 and rc.inet2 are sourced. In rc.S, it explicitly states, "Mount non-root file systems in fstab, but not NFS or SMB because TCP/IP is not yet configured." Later on, in rc.M, it will perform a mount -a after it sources rc.inet1 and rc.inet2 (however, it is run before it attempts to start rc.wicd or rc.networkmanager, so if you use those to connect to your network, your network drives in /etc/fstab won't be mounted on boot without adding something later, like in rc.local).
jpollard is correct that the line you provided in your latest post is incorrect. As best as I can tell, you can remove the _netdev option, as it doesn't seem to apply to Slackware (and it doesn't seem to be mentioned in the man page for mount on Slackware). Keep the username/password as they are and then just make sure you have at least one space or tab between the options and the first zero (you can have as many spaces as you want, just make sure theres at least one... I tend to add a lot to mine to make everything line up for readability purposes, but it isn't necessary).
Slackware mount recognizes the _netdev option but I think it ignores it. The boot script on Slackware specifically excludes mounting nfs, smbfs, and cifs. This is the traditional excluding method - the newer would be the option "no_netdev" which would exclude any fstab entry with "_netdev". I expect it will eventually be used as it simplifies the boot option, and makes it possible to put other network based filesystems available without having to update the boot script.
It is in my slackware 13 man pages under mount:
Code:
-O, --test-opts opts
Used in conjunction with -a, to limit the set of filesystems to
which the -a is applied. Like -t in this regard except that it
is useless except in the context of -a. For example, the com-
mand:
mount -a -O no_netdev
mounts all filesystems except those which have the option _net-
dev specified in the options field in the /etc/fstab file.
It is different from -t in that each option is matched exactly;
a leading no at the beginning of one option does not negate the
rest.
The -t and -O options are cumulative in effect; that is, the
command
mount -a -t ext2 -O _netdev
mounts all ext2 filesystems with the _netdev option, not all
filesystems that are either ext2 or have the _netdev option
specified.
I didn't even think about NetworkManager being in the mix. If it is the one controlling the interfaces then you do need the mount put in rc.local
Crap, I don't know how I missed netdev in the mount options. I think since I was just accessing it on my phone with an ssh app, I ended up mistaking another option for the typical end of the man page. I see it now. But considering netdev support has been there since at least Slackware 13, it doesn't seem like Pat is in any hurry to add it to the startup scripts. I could see him rearranging things so it attempts the mount -a after wicd/networkmanager are started up, but many times, I've heard users need to start up the GUI before it connects anyway. I don't use either, so I don't know how well they work.
But it certainly is ugly to have that stupid underscore in front of netdev. I wonder whose brilliant idea that was...
Crap, I don't know how I missed netdev in the mount options. I think since I was just accessing it on my phone with an ssh app, I ended up mistaking another option for the typical end of the man page. I see it now. But considering netdev support has been there since at least Slackware 13, it doesn't seem like Pat is in any hurry to add it to the startup scripts. I could see him rearranging things so it attempts the mount -a after wicd/networkmanager are started up, but many times, I've heard users need to start up the GUI before it connects anyway. I don't use either, so I don't know how well they work.
But it certainly is ugly to have that stupid underscore in front of netdev. I wonder whose brilliant idea that was...
No biggie.
One of the things NetworkManager is supposed to do is reprocess the fstab file for network mounts. I have no idea if that is actually being done yet or if that is still something systemd is doing. It may be something that is supposed to be done by plugins... Personally, I think that is one of the problems with NetworkManager - there is no easy way to know what it is doing, or even if what it does makes sense.
Fixing issues about when things start is what systemd was supposed to do. Personally, it just made things more complex. Faster, yes - but when things get complicated it just made them a LOT more complicated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.