LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-06-2003, 06:20 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Startup Scripts and Kernel Modules


Hello.

Now before I get into my first question, let me clarify that I have done some research on this. I've found all the rc.6, etc. startup files as well as the two places to launch the SAMBA daemons... I'm just not sure which runs first or where I need to put these commands.

Basically, every time my computer starts up, I want it to do the following:

ifconfig eth0 192.156.0.2
smbd -D
nmbd -D

Where should I set these SAMBA commands and where should I put the ifconfig so that the ifconfig runs first? If nmbd gets run before ifconfig, it won't start properly, and I'm not sure the startup order of things.

Second, I thought I'd just throw in a quick question about kernel modules. I assume vfat is already built into the default Slack 9 kernel because I am able to access my windows partition just fine (even though the /etc/rc.d/rc.modules #/sbin/modprobe vfat line is still commented out). However, I am trying to mount a smbfs... on my connected Windows computer to access files there, and it tells me I don't have smbfs support in my kernel. I tried uncommenting the line in rc.modules, but it can't find it. modprobe and insmod both tell me it can't be found. I have the Slack 9 kernel source installed in /usr/src/linux with all that stuff in there, but its not finding the smbfs modules in there. Is there any way I can compile this module or something and make it so modprobe will find it?

Thanks,
JMagi
 
Old 10-06-2003, 07:03 PM   #2
ocularbob
Member
 
Registered: Nov 2002
Location: brooklyn NYC
Distribution: gentoo
Posts: 212

Rep: Reputation: 30
on slack there is /etc/rc.d/rc.local this is one good place to add things to your startup. commands in this file are executed in line order. im pretty sure that rc.local is the last script run for each runlevel so you can probably leave the ifconfig out since networking will be all setup before rc.local get run.
 
Old 10-06-2003, 07:04 PM   #3
ocularbob
Member
 
Registered: Nov 2002
Location: brooklyn NYC
Distribution: gentoo
Posts: 212

Rep: Reputation: 30
oh and this really has nothing to do with kernel modules.
unless im not understanding properly
 
Old 10-06-2003, 07:59 PM   #4
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok, so rc.local looks like the place to put that. There are two other files where you can start samba daemons, and I was just wondering if those are a better place to start them (and, if so, if those files get run before or after rc.local).

The reason I need ifconfig to run is that it is not automatically being assigned on startup. ppp and one other interface are assigned, but eth0 isn't. How do I get this to automatically configure itself on startup?

I'm not sure if you understood my second question, since I'm pretty sure it has to do with kernel modules. I type mount -t smbfs etc. to try to mount my remote windows share and I get an error saying smbfs file system is not supported by the kernel.

-JMagi
 
Old 10-06-2003, 09:37 PM   #5
ocularbob
Member
 
Registered: Nov 2002
Location: brooklyn NYC
Distribution: gentoo
Posts: 212

Rep: Reputation: 30
ok,

so you need to add "smbfs" to /etc/modules.conf that should solve the error on mount. i guess you seem to know whats up with all your networking so try it out with:

ifconfig eth0 192.156.0.2
smbd -D
nmbd -D

in /etc/rc.d/rc.local
and

smbfs

in /etc/modules.conf
 
Old 10-06-2003, 10:57 PM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Well, good ideas, but they didn't work for one reason or another. I tried doing all of the above, and I ended up getting a couple of errors. The /etc/modules.conf line just gave me a bunch of errors that I was using the wrong syntax when I started up. The rc.local lines said that eth0 didn't exist or something along those lines... I think that script gets run too early. I know a place where I can get the samba daemons to start up automatically, but before I do that I need to find a way to get my eth0 to bind to the interface automatically... and there has to be a way to do that without putting an ifconfig in one of the rc files. Is there?

-Jmagi
 
Old 10-06-2003, 11:19 PM   #7
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
In Slackware, modules are loaded (with modprobe or insmod) in: /etc/rc.d/rc.modules. Slack doesn't seem to use /etc/modules.conf

To configure eth0 settings, edit /etc/rc.d/rc.inet1 and follow the instructions in the comments.

To start samba at boot, edit /etc/rc.d/rc.inet2 and follow the instructions in the comments.
 
Old 10-06-2003, 11:43 PM   #8
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Thank you very much for the rc.inet1 and 2 info. I haven't checked yet but that looks like it is exactly what I am looking for. As far as modules though, I have uncommented the smbfs line in rc.modules, but it still doesn't work. I don't think the module was compiled in the first place, but I still don't completely understand how it all works. Any other suggestions?
 
Old 10-07-2003, 07:34 PM   #9
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Sorry, forgot to mention /etc/rc.d/rc.samba which enables your smbd and nmbd servers. Also, ensure that your smb.conf is set up (under /etc/samba ? I don't use samba).
 
Old 10-07-2003, 07:50 PM   #10
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I got all that working now, thanks a lot for all your help.

I still am a little confused about the module issue. When I use mount -t smbfs or smbmount or anything like that, I get the error that smbfs is not compiled into my kernel. However, I can use smbclient to successfully browse files on my other computer. Its not a huge issue now since I don't need to do much on the other computer from here, but I'd eventually like to be able to print to its shared printer so I'd like all the smbfs tools to work properly.

-JMagi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
loading modules at kernel startup linux_lover2005 Linux - Software 2 12-21-2004 10:43 AM
startup scripts doralsoral Linux - Software 6 01-12-2004 03:46 PM
Startup Scripts? gauge73 Linux - Newbie 3 12-12-2003 02:03 AM
kernel modules at startup? e1000 Linux - General 2 10-29-2003 08:43 AM
X Startup Scripts JHuizingh Linux - General 1 09-18-2001 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration