LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 03-18-2005, 05:42 AM   #1
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Rep: Reputation: 15
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.

Last edited by numb; 03-18-2005 at 05:54 AM.
 
Old 03-18-2005, 06:54 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

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

egag
 
Old 03-18-2005, 07:06 AM   #3
guitarfella
Member
 
Registered: Dec 2004
Location: Australia
Distribution: Slackware, Fedora 3
Posts: 53

Rep: Reputation: 15
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
 
Old 03-18-2005, 09:18 AM   #4
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
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.
 
Old 03-18-2005, 09:23 AM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
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
 
Old 03-18-2005, 10:00 AM   #6
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
what is the safest was to turn hotplug off... and how would I turn it back on also.. just in case
 
Old 03-18-2005, 10:35 AM   #7
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,386

Rep: Reputation: 181Reputation: 181
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
 
Old 03-18-2005, 03:10 PM   #8
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
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

Last edited by numb; 03-18-2005 at 03:12 PM.
 
Old 03-18-2005, 04:14 PM   #9
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
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.
 
Old 03-18-2005, 08:10 PM   #10
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
thanks.. I have question 2 worked out now

Anyone, want to take a shot at question 1?? (2 posts back to see question)
 
Old 03-18-2005, 08:17 PM   #11
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
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

Last edited by mcd; 03-18-2005 at 08:19 PM.
 
Old 03-18-2005, 08:23 PM   #12
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
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
 
Old 03-18-2005, 08:23 PM   #13
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
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

Last edited by numb; 03-18-2005 at 08:43 PM.
 
Old 03-18-2005, 09:36 PM   #14
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
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
 
Old 03-18-2005, 10:10 PM   #15
numb
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
no they don't exist.. in fact the directory /dev/sound doesn't exist...
 
  


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
Modules loading at startup badlife69 Linux - Newbie 1 04-14-2005 11:23 AM
stop loading modules at startup..please help GSX Linux - Newbie 5 03-23-2005 11:19 AM
loading modules at kernel startup linux_lover2005 Linux - Software 2 12-21-2004 11:43 AM
Loading modules on startup badmofo666 Linux - Software 4 08-12-2004 07:35 PM
error loading modules at startup archish Slackware 7 05-01-2004 02:52 AM


All times are GMT -5. The time now is 07:32 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration