|
|
发表于 2005-3-4 22:11:32
|
显示全部楼层
你的lfs是什么版本?
我的lfs-6.0是这样写的,需要模块名写在里面,一行一个。
/etc/modprobe.conf格式就是modules.alias这样的。
直接把需要加载的模块写进去就可以了。
如:
/etc/modprobe.conf :
alias char-major-10-187 irnet
alias net-pf-23 irda
alias char-major-161-* ircomm_tty
alias net-pf-4 ipx
alias net-pf-10 ipv6
其他的发行版都有各自加载模块的办法,看看系统启动脚本里加载模块是怎么写的
好象都是用一些侦测硬件的服务自动加载模块。
其实自己想加载什么模块,直接写到系统启动脚本中就可以了,所有发行版通用
lfs中看看你的/etc/rc.d/rcsysinit.d/SXXmodules
这个脚本决定启动时都加载什么模块。
我的/etc/rc.d/rcsysinit.d/S05modules :
[PHP]
[ -e /proc/ksyms -o -e /proc/modules ] || exit 0
case "$1" in
start)
# Only try to load modules if the user has actually given us
# some modules to load.
if egrep -qv '^(#|$)' /etc/sysconfig/modules 2>/dev/null; then
# Read in the configuration file.
exec 9>&0 < /etc/sysconfig/modules
echo -n "Loading modules:"
while read module args ; do
# Ignore comments and blank lines.
case "$module" in
""|\#*) continue ;;
esac
# Attempt to load the module, making
# sure to pass any arguments provided.
modprobe $module $args
# Print the module name if successful,
# otherwise take note.
if [ $? -eq 0 ]; then
echo -n " $module"
else
failedmod="$failedmod $module"
fi
done
# Print a message about successfully loaded
# modules on the correct line.
echo ; print_status success
# Print a failure message with a list of any
# modules that may have failed to load.
if [ "$failedmod" ]; then
echo "Failed to load modules failedmod"
print_status failure
fi
exec 0>&9 9>&-
fi
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac
# End $rc_base/init.d/modules
[/PHP] |
|