PDA

View Full Version : Making modules persistant at boot -STILL OPEN



gowator
02-01-2004, 10:43 PM
I had a lot of probs trying to keep my ethernet modules loaded at boot and not having to manually modprobe them after...

OR# Place your local directives here.
alias eth0 nvnet

# This line loads the part of the modprobe configuration managed with
# update-modules(8) and built from the contents of /etc/modprobe.d/.
include /lib/modules/modprobe.conf


So I did as instructed and
# more modprobe.conf
# This file is automatically generated by update-modules, please do not
# edit it directly.
# If you want to change or add anything here please read /etc/modprobe.conf,
# the files in /etc/modprobe.d/ and the manpage for update-modules(8).
#

However this didnt work....
Its a real mess all the servers fail at boot like DCHP and BIND etc.

So I just went back and ignored the directiver NOT to edit the file and it seems to be working....

Can anyone explain this or is this a relict of the liveCD on the HD install.
Or will it screw up later ???

Stephen
02-02-2004, 12:05 AM
I had a lot of probs trying to keep my ethernet modules loaded at boot and not having to manually modprobe them after...

OR# Place your local directives here.
alias eth0 nvnet

# This line loads the part of the modprobe configuration managed with
# update-modules(8) and built from the contents of /etc/modprobe.d/.
include /lib/modules/modprobe.conf


So I did as instructed and
# more modprobe.conf
# This file is automatically generated by update-modules, please do not
# edit it directly.
# If you want to change or add anything here please read /etc/modprobe.conf,
# the files in /etc/modprobe.d/ and the manpage for update-modules(8).
#

However this didnt work....
Its a real mess all the servers fail at boot like DCHP and BIND etc.

So I just went back and ignored the directiver NOT to edit the file and it seems to be working....

Can anyone explain this or is this a relict of the liveCD on the HD install.
Or will it screw up later ???

You should add that line (alias eth0 nvnet) to the file /etc/modutils/aliases then use the update-modules program to update the /etc/modules.conf file and have the information used in the next reboot or if you rmmod nvnet then insmod nvnet the new information should be used. You should also add the nvnet to a new line in the /etc/modules file, all these steps as root.

gowator
02-02-2004, 11:12 AM
Stephen, thanks again :d
Actually I did run the update modules, it just didn't change the file its meant to....

In actual fact this example is from the first machine but its actually the second machine thats really important.

Perhaps it would be easier to explain what Im trying to do !!!

For reasons so complex and intertwined I think I forgot myself it becuame imperative to get rid of my old server/gateway/router which was running SME server (modified REDHAT)
Perhaps the main reason being is it does what its meant to well but it is a pain to convince it to do something extra and at the momnet I need to install vtun....

I had a spare machine, A celeron 400 with 64MB RAM.... (I bought my dad a new PC for XMAS and liberated his old one) that desperately needed a real OS installing :D and Id been very impressed with knoppix so off I went. Meanwhile Id used the existing WinBlows install for configuring some wireless cards and it had both ethernet and wireless NIC's in....

So off we go, it runs from the Cd which is a good sign although KDE is a bit challenging! So I try an knoppix-install.
This keeps failing, RIGHT at the beginning on the script. Instead of opening the pop-up it lists out std out. Not detered I dismiss this as lack of memory and try the older knx-hdinstall ... from RL3 which successfully installs :D

The first thing I need is two NIC's and since the MAC add is locked on my DSL modem I have to take them out of my running server.... or at least one of them, the second is unreliable so I replace that too. (Its just the RJ45 connection that is unreliable)

So now we have 3 NIC's, one of which isn'ty supported or detected because its 802.11G (NG WG-311)

Now the hardware detection at boot is gone I have to load the modules by hand which I do taking care to note the order. The 3c59x is loaded first then the tulip for the netgear ...

netcard detect then finds the 3c as card0 and the ng as card1
eth0 gets a static ip in a class C RFC range, eth1 I l leave and config with wlcardconfig to access the DSL.

This creates ppp0, which with the right credentials connects :D

Next I set up a DHCP server on eth0 and use the knoppix installed dhcp3-server. It takes a bit of editing the module config in webmin but its working and allocating IP's.

Next I add a bind server - again a little editing but basically working.
I create an init.d script for ddclient (dynamic dns) which starts at S99_

Everything looks fine so I configure IP tables through webmin...
Everything is open except the internal network is NAT'd to the external.

Basically works... except the dhcp clients are not replacing the default route but adding to it. This is on the client side so it can bve dealt with later. (For some reason Im getting two default GW's)

I add the files into the # Place your local directives here.
part of /etc/modprobe.conf and run update modules and reboot.
The modules aren't found and so all the services that rely on them fail.....

Meanwhile I have no mail server and without the router running I don't even have internet access .....

Meanwhile I wreck my belkin wireless router/switch by pulling the power out while its resetting to factory defaults !! Now I have no wireless access point.

So I get it up, reconfigure everything and setup the wireless card using the linuxant driverloader. This goes as eth2.

However linuxant know something I don't.... eth2 comes up at boot except of course its not eth2 but eth0....
This of course thouroughly confuses the services the rely on IP's....

Darn it.

So I rmmod driverloader, then modprobe 3c95x, tulip,driverloader...
Everything is fine except it screws my firewall ... now fixed

Oh yeah eth0 192.168.2.1/255.255.255.0 eth1 no IP -> ppp0 and eth2 192.168.0.1/255.255.255.0

Present situation is everything is more or less working except I need to reconfigure qmail and still need the vtun server.
Except I daren't reboot.....
Its not exactly quick in X or for reboots and between getting everything working I have no internet. I spent all day and all night Saturday doing this and then most of

since the linuxant install worked I figure its just me forgetting something.
Im not used to debian and this project is proving a bit of a bridge to far except I have to do it.

I can't find a easy way to assign init scripts ... (aka chkconfig in RH derivatives) so Im using SYS V and having to write them by hand the linking from rcx.d.

ANYTHING YOU CAN SPOT IM DOING STUPID PLEASE SAY !!!!

gowator
02-03-2004, 12:22 PM
erm ANYone

windos_no_thanks
02-03-2004, 01:33 PM
Well, I don't know enough about the loading of kernel modules to say what is wrong but once I've decided what hardware I'm going to use I usually compile a new kernel with the drivers directly included. For stuff that always would be in use anyway it is just as efficient as the module approach and you don't have to worry about loading anything at boot time. :-)

gowator
02-03-2004, 04:15 PM
strange.....
I once bought 10 NIC's at once....
identical netgear ones....
over the last 2-3 years i seem to have given them away!!!!
Now Im struggling to find two identical cards (which would be ideal since it saves memory)
but also compiling the drivers in kinda locks stuff down.... and my hardware seems to move around boxes quite often....

BUT last night I dreamt I got the box again with 10 identical NIC's in.....
I guessI was thinking the same thing!!!!


However it makes a lot of sense!!!!
Im going to give it a thought!!!!!!

Stephen
02-03-2004, 04:45 PM
So I rmmod driverloader, then modprobe 3c95x, tulip,driverloader...


Well that's certainly a complicated enough setup. This is probably not the most elegant way to try it but if it works like you say in the line above the you may want to try adding to this to the file /etc/init.d/bootmisc.sh near the bottom:


rmmod driverloader
modprobe 3c59x
modprobe tulip
modprobe driverloader


And you may want to not have the interfaces automatically come up on boot so in the /etc/network/interfaces file you would just have the line auto lo instead of the auto lo eth0 eth1 then below the lines above in the bootmisc.sh you would have:


ifup eth0
ifup eth1
ifup ppp0


To bring each of the interfaces up with the settings in the interfaces file that you have for them BTW can you post that so we can see it if this does not work. And while I'm thinking about it are the modules listed in the correct order in the /etc/modules file so they load one after the other like you seem to need them too.

gowator
02-04-2004, 11:41 AM
They really need to come up at boot becuase it will be an unattended server.... and dhcpd, iptables and bind need to actually start to give me access.

When I started the 'project' I was replacing the SME server because its just to complex to get it do do anytihg its not designed to do. It was basically a home email/web/ftp etc server also acting as firewall router.
My now dead Belkin wireless was just sat on the hub!!!
Now through stupidity I killed the Belkin and so I also needed to add wireless!!!!

My girlfriend is at college on campus and has free http access. But its all on transparant proxies and the IP phones we bought to save on phone bills won't work. (She's in England while I and her parents are in France!)
So I decided on setting up vtun so she will send all the requests to 5030 (SIP) to my server thus escaping the problem with the campus restrictions....

Now if all this hadn't happened at the same time as my religeous conversion i think i coulda coped!!! BUT what happened is my Mandrake install screwed up, just lilo and it would be a 5 minute job to fix. But I had this coverdisk of knoppix 3.2 !!! Id already played about with Debian but not seriously and I was getting increasingly disatsified with Mandrake. And then it happened :D in a flash of light i saw the error of my ways and downloaded knoppix 3.3. :D (Actually it was a best viewed with Internet Explorer logo on the developers site for SME server that really made me wanna get rid of it)

I was so impressed I hosed the Mandrake install and stuck on a hdd install of knoppix3.3!!! Thats a couple of weeks ago.... Im more impressed every day :D

So when it came to my 'new server' it seemed a logical choice. Id been planning debian stable (my last uptime on the server was >100 days and that was a processor change) BUT although I know how to do this on RPM based machines I bit off more than I could chew on the Debian side and the specifics on knoppix and perhaps hangovers of the hddinstall!

Im really screwed, I need my email desperately. Not to mention getting the tunneling working!!! Having pulled the NIC's outa the old box I can't even just stick it back up!!!

And I know Im so close..... EVERYTHING WORKS .... the routing, the wifi ... I just need it to be stable and reboot if I have a power cut or whatever!!!! And its frustrating, I know HOW to do this in Mandrake ... but I can see that Debian is a way superior distro. Knoppix is a easy way to a Deb install BUT leaves a few quirks from its heritage... asnd I just need to iron them out!

BUT
etc/init.d/bootmisc.sh ....
AHA ... this seems to be a new thing for me....
Regarding the /etc/modules
They are in the right order, after starting them manually and restarting the servers it all works!!!!

If I do get it all running then I would like to make a customised version of knoppix live, server edition....

gowator
02-06-2004, 01:51 PM
Well, I RTFM'd more....

Its the move to Deb and unfamilair stuff thats giving me grief on what I guess might be considered an 'advanced' topic.

Problem is its not advanced to me in Mandrake... but im determied to get it working with Knoppix/Deb.

I updated the aliases file in the modprobe.d and update modules and it seems to have worked!!!!
Hooray.....

Now its just messing about with the init dir's I hope!!!!