On Wed, Oct 01, 2003 at 01:57:16PM +0800, bluebee wrote: > > I was just wondering... After you load some kernel modules using modprobe, > > how do you make them "permanent" so that you don't have to load them using > > modprobe again? > > In redhat, this can be done by editing the /etc/modules.conf.
This is a perpetual myth that won't go away. /etc/modules.conf is a configuration file for modprobe, and nothing more. It won't tell which modules get loaded at startup, but rather what parameters to apply to modules when they are loaded by modprobe. Also, it performs aliasing (e.g. alias eth0 mynetcard). Generally, if someone is using RedHat or Debian or Suse, or any other popular distro, the fact that they need to load modules almost always points to a misconfiguration, since the modules should be loaded automatically by the startup scripts when they are needed. I'm sure plenty of people will disagree with this fact. Your little fingers are going spastic wanting to write the reply saying that I'm wrong wrong wrong. Right? [EMAIL PROTECTED] etc]# grep modules.conf rc* rc.sysinit:if LC_ALL=C grep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then [EMAIL PROTECTED] etc]# grep modules.conf rc.d/rc* rc.d/rc.sysinit:if LC_ALL=C grep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then rc.d/rc.sysinit.rpmorig:if LC_ALL=C grep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then [EMAIL PROTECTED] etc]# grep modules.conf init.d/* init.d/network: echo "alias net-pf-10 ipv6" >> /etc/modules.conf There is nothing anywhere in the startup scripts that will do what you want. I've discussed this before: http://nlug.org/mail/nlug__2002_10/0410.html RH still has a hook in rc.sysinit: if [ -f /etc/rc.modules ]; then /etc/rc.modules fi So you can create a file called "/etc/rc.modules", and put your modprobe statements in there, and they'll be executed. Put anything in there and it'll be executed. There's nothing to stop you from putting them in rc.local, unless they're needed earlier in the boot process. Anyway, let's dispel this myth: putting modules into modules.conf will not make them load automatically. Michael -- Michael Darrin Chaney [EMAIL PROTECTED] http://www.michaelchaney.com/ -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
