fstab entries not being mounted on startup

im using knetwork manager to manage my wlan0 connection, however, it doesn’t seem to start the network until after the machine has booted and logged into suse 11 (kde3.5). problem is, that means the entries in fstab (well, the network based ones) are not mounting on startup.

fyi the fstab entries have a “_netdev” option so won’t attempt to mount until the lan is up.

i have cifs-mount and samba-client installed.

does anyone have any ideas please? although it’s not life-threatening or anything, it’s a chore to have to keep launching konsole, su, mount -a exit exit when we want to use the laptop.


I am guessing that you are running KDE4, so here goes. Not around a PC with openSUSE on it, so guessing at the path, so check the case of the letters in your path.

In /home/User_Name/.kde4/Autostart you have to create a script. Call it mount.sh and set the permissions on it so that it is executable. You only need one command in the script. mount -a

Open YAST and go to SUDoers and add an entry for yourself with root permissions and point it to the script you just created. Now logout and login again. The script will run with root authority and mount all drives.

sorry WP, it’s kde3.5

Look at your path and edit that line to match.

hmm, i’m not sure what you mean “path”; even if I did create the script, the network doesn’t seem to start until after i log in :frowning:

(and yes, yast > network says to “start on boot”)

For completeness, you could save a couple of steps by using the command ‘sudo
mount -a’, but I know you want more.

Create the following script (named delayed_mount) in /root:

/bin/sleep 60
/bin/mount -a

After the script is prepared, make it executable with a ‘chmod u+x
delayed_mount’. Now edit /etc/init.d/boot.local and add the line
‘/root/delayed_mount &’ to it. You could adjust the 60, which is the number of
seconds to delay, to find the minimum value that works. On my system, I’m
currently using 120 seconds to mount a couple of nfs volumes, but I suspect that
is much longer than needed.

A second possibility is to add a crontab entry with the ‘/bin/mount -a’ command,
but as this would need to be run very frequently, it would spam the logs.


although a script seems like a good work-around; anybody know or can help figure out why it’s not starting the network on boot as it should? i guess the clue may be in the "K"network manager (ie, it’s a KDE tool, ie it has to be logged in to work)

By path, I mean adding the SUDoer, you can’t browse to the script file. It won’t show the hidden folder .kde3, so you will have to browse to it in Dolphin using Show Hidden Files and copy and paste that path into SUDoer.

I would not expect KNetworkManager to start till KDE starts, so you may have to dump it and go back to ifup to get the network started earlier. Even then, I still have to run the script to get mine mounted.

Better security and maybe less fuss if you just add a line to the root crontable like this:

@reboot sleep 10;mount -a

That will cause root to execute “mount -a” 10 secs after boot. Change 10 to whatever you need. 10 works for me with cifs mounts. Ref

hey guys, thanks for the replies; scripting x seconds after boot won’t work, there is no guarantee we’ll be logging in within x seconds; i guess i will try again with ifup … although the last time i tried it refused to play at all!!


Dec 13 20:57:39 bgrlaptop ifup:     wlan0     device: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
Dec 13 20:57:39 bgrlaptop ifup-wireless: command 'iwconfig wlan0 nick bgrlaptop' returned
Dec 13 20:57:39 bgrlaptop ifup-wireless:  Error for wireless request "Set Nickname" (8B1C) :
Dec 13 20:57:39 bgrlaptop ifup-wireless:     SET failed on device wlan0 ; Operation not supported.


badger fruit wrote:
> hey guys, thanks for the replies; scripting x seconds after boot won’t
> work, there is no guarantee we’ll be logging in within x seconds; i
> guess i will try again with ifup … although the last time i tried it
> refused to play at all!!

As you didn’t say differently, I expected that you were using auto-login. There
is a way to set NM 0.7 to start up as system, not as a user, i.e. at boot - the
gotcha is that I don’t know how to do it. If you are using 11.0, you should be
able to find out how to do it by posting to the mailing list at
networkmanager-list@gnome.org. I read that list, and I think I saw a howto come
by in the past week, but I deleted it.


ah, sorry, no i don’t use auto-login.
i shall ask google first but post into the mailing list if i don’t get any luck

cheers guys :slight_smile:

Can you set the run level for KNetworkManager to start it before KDE? Having not done that before, I have to ask, is it that simple?

Well, I can tell you one thing for sure: placing a line


in /etc/init.d/boot.local is still very slow. The really cool thing with (k)networkmanager is that among the services and utilities that autostart at bootup, it’s always the last one to start. In this regard it’s almost as good as the Windows network applet… Now, I have the habit of always starting my KDE3.5.9 with all the windows of my previous session open; among these, there are always 4-6 Konqueror windows with 20-30 tabs (sites) each. Needless to say, knetwork manager is always so slow to start that these tabs simply translate into 80-180 “Page not founds”. Imagine the joy of having to go through 180 tabs, hitting Refresh at each tab… It sorta completely defeats the purpose of saving your previous desktop session…:frowning: