LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Loading Modules at startup - turning off hotplug? (https://www.linuxquestions.org/questions/slackware-14/loading-modules-at-startup-turning-off-hotplug-303095/)

numb 03-18-2005 04:42 AM

Loading Modules at startup - turning off hotplug?
 
If I a lsmod with hotplugging enabled then to an lsmod with hotplug disabled... can I just copy all of the things from the hotplugged lsmod into rclocal or something like that... then turn off hotplugging until I get some new hardware etc??

Or is there a totally different way to be able to turn off hotplugging and get everything to work?

thanks in advance

EDIT: I am using kernel 2.6.10 and 10.1 release. I have a usb wireless card and a usb cdr.

egag 03-18-2005 05:54 AM

you can just disable hotplug and load the modules in /etc/rc.d/rc.modules.
that will work.

egag

guitarfella 03-18-2005 06:06 AM

im not really sure what you are trying to do.
but if you wanna turnoff hotplug, pass the nohotplug flag to your kernel from LILO, or whatever loader you use
alternativly, remove the exectuable permission from the /etc/rc.d/rc.hotplu script
it can be done this way

su
chmod 644 /etc/rc.d/rc.hotplu

numb 03-18-2005 08:18 AM

Quote:

Originally posted by egag
you can just disable hotplug and load the modules in /etc/rc.d/rc.modules.
that will work.

egag

thank you.. that is what I was looking for.. one more question though. If I load them through rc.modules instead of hotplug finding them at boot... will my boot time decrease?? right now it takes about 40sec at the hotplug stage.. it's the only part that is slow.

egag 03-18-2005 08:23 AM

hotplug is searching hardware everytime you boot..
compared with M$ it's very fast but still, searching takes a while.
loading modules goes very fast so, if you don't use hotplug, the boot process is much faster.

egag

numb 03-18-2005 09:00 AM

what is the safest was to turn hotplug off... and how would I turn it back on also.. just in case ;)

mlangdn 03-18-2005 09:35 AM

Quote:

Originally posted by numb
what is the safest was to turn hotplug off... and how would I turn it back on also.. just in case ;)
To turn off:
As root, chmod -x /etc/rc.d/rc/hotplug

To turn it back on:
As root, chmod +x /etc/rc.d/rc.hotplug

numb 03-18-2005 02:10 PM

ok.. i added the following to my rc.module file (put them at the bottom) I arrived at that list by lsmod with hotplut on.. then lsmod with hotplug off.. and the following were the ones not loaded with hotplug off..
2 problems:
1. Everything works except my sound card** Anyone have an ideas on why the sound card won't load??
2. At boot.. there is a pause where something is determining the mac address.. i am guessing it has something to do with dhcpcd wlan0 (wireless startup) I don't think it needs to be done until I start the wireless card later though.. how do i turn that off at boot?

thanks for any help

Code:

/sbin/modprobe snd_pcm_oss
/sbin/modprobe snd_mixer_oss
/sbin/modprobe ohci_hcd             
/sbin/modprobe ehci_hcd             
/sbin/modprobe intel_agp             
/sbin/modprobe hw_random             
/sbin/modprobe shpchp               
/sbin/modprobe ub                   
/sbin/modprobe i2c_i801               
/sbin/modprobe i2c_core             
/sbin/modprobe uhci_hcd
/sbin/modprobe snd_intel8x0
/sbin/modprobe snd_ac97_codec
/sbin/modprobe snd_pcm
/sbin/modprobe snd_timer
/sbin/modprobe snd
/sbin/modprobe snd_core
/sbin/modprobe snd_page_alloc
/sbin/modprobe eth1394             
/sbin/modprobe yenta_socket         
/sbin/modprobe pcmcia_core           
/sbin/modprobe 8139too             
/sbin/modprobe mii                 
/sbin/modprobe ohci1394             
/sbin/modprobe ieee1394             
/sbin/modprobe agpgart               
/sbin/modprobe evdev


mcd 03-18-2005 03:14 PM

Quote:

2. At boot.. there is a pause where something is determining the mac address.. i am guessing it has something to do with dhcpcd wlan0 (wireless startup) I don't think it needs to be done until I start the wireless card later though.. how do i turn that off at boot?
that's almost certainly dhcpcd, which is called by rc.inet1. see, when you enter multi-user mode it start rc.M (look through this file and you will see which order things are called in). rc.M sets your hostname, starts the systemlogger, saves dmesg, then starts rc.pcmcia (if it exists), then starts rc.inet1 (which starts dhcpcd and brings up your interfaces as per rc.inet1.conf). so....if you want to change the order that all this happens in....i guess my advice would be to comment out the pcmcia and inet1 sections from rc.M, and then copy and paste them into rc.local in the order you want them started. i would NOT delete the entries entirely from rc.M though, just comment them out. that way later it's easy to go back and undo what you did.

numb 03-18-2005 07:10 PM

thanks.. I have question 2 worked out now

Anyone, want to take a shot at question 1?? (2 posts back to see question)

mcd 03-18-2005 07:17 PM

i can't tell from your post above whether those modules you list are loaded now or not...but half of them are your sound modules and if you want sound they need to be loaded. ie, when youtype lsmod you need to see all those snd_ modules.

if that's already the case, then maybe try running

alsamixer
alsactl store

egag 03-18-2005 07:23 PM

are all the snd-modules loaded ?

also maybe this is caused by rc.alsa.
I believe it's executed by rc.M .

take a look at that script, i think you should not load all snd-modules in rc.modules, but leave some of it to rc.alsa
( i guess it's the oss-emulation modules , not sure... )

egag

numb 03-18-2005 07:23 PM

lsmod shows that they are all loaded.. I checked and rechecked this...

I tried commenting out the ones that were listed in the rc.alsa file.. but that didn't help either.

I tried to run alsamixer it failed with this output
Code:

bash-3.00# alsamixer

alsamixer: function snd_ctl_open failed for default: No such file or directory
bash-3.00#

It's strange b/c if I delete all the things I added to rc.modules and turn on hotplug.. then do an lsmod.. I get the exact same modules as I did when I used my modified re.modules with hotplug off.. ????

One other question.. I noticed I have a rc.modules file and a rc.modules2.6.10 ...which one should I be editing?? they appear to have been created at the same time... that being when I upgraded the kernel to 2.6 .. I have just been editing rc.modules

egag 03-18-2005 08:36 PM

at boot the rc.modules is called from rc.S.
so you edited the correct file ( else the modules wouldn't load i guess... )

maybe some of your device-nodes in /dev/sound are missing. ?
i have :

--------
egag@Slack21:~$ ls /dev/sound/*
/dev/sound/adsp /dev/sound/audio /dev/sound/dsp /dev/sound/mixer /dev/sound/mixer1
egag@Slack21:~$
--------

check if they exist.....?

egag

numb 03-18-2005 09:10 PM

no they don't exist.. in fact the directory /dev/sound doesn't exist...


All times are GMT -5. The time now is 11:39 PM.