Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
modules doesn't load anymore
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Kestutis
n00b
n00b


Joined: 22 Mar 2005
Posts: 10

PostPosted: Mon Apr 11, 2005 8:19 pm    Post subject: modules doesn't load anymore Reply with quote

I was trying: [HOWTO] Flying with gentoo in tips and triks sections in https://forums.gentoo.org/viewtopic-t-231170-postdays-0-postorder-asc-start-75.html and when I followed modules part:

[/url]I did:
/etc/init.d/modules

change:

Code:
ebegin "Calculating module dependencies"
/sbin/modules-update &>/dev/null
eend $? "Failed to calculate dependencies"

for:
Code:
if [ /etc/modules.d -nt /etc/modules.conf ]
then
ebegin "Calculating module dependencies"
/sbin/modules-update &>/dev/null
eend $? "Failed to calculate dependencies"
else
einfo "Module dependencies are up-to-date"
fi

Doing this, modules-update will only run if it´s really needed because you made changes in the system.

and now my modules doewsn't load anymore. What should I do? I cannot load to graphical mode:(.
Here is modules file:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/modules,v 1.30 2004/04/21 17:09:18 vapier Exp $

depend() {
need checkroot hostname
use isapnp
}

load_modules() {
local x=
local i=0
local retval=0
local modules=
local modargs=
local modcount=0
local config="$1"

[ -z "${config}" ] && return 0
[ ! -r "${config}" ] && return 0

# Loop over every line in $config
eval $(awk '
BEGIN {
COUNT = 0 # Make sure COUNT is set
}

$0 !~ /(^[[:space:]]*(#|$))/ {
if (MODULES == "")
MODULES = $1
else
MODULES = MODULES " " $1

# Not the greatest method to remove $1 from $0, but it works
sub(/^[[:space:]]*[^[:space:]]*[[:space:]]*/, "")
ARGS[COUNT] = $0
COUNT++
}

END {
# 'eval' will make sure these are set to proper bash variables
print "modcount=" COUNT
print "modules=\"" MODULES "\""
for (x = 0;x < COUNT;x++)
print "modargs[" x "]=\"" ARGS[x] "\""
}
' "${config}")

if [ "${modcount}" -gt 0 ]
then
einfo "Using ${config} as config:"

for x in ${modules}
do
ebegin " Loading module ${x}"
modprobe -q ${x} ${modargs[${i}]} &>/dev/null
retval=$?
eend ${retval} " Failed to load ${x}"

i=$((i+1))
[ "${retval}" -eq 0 ] || modcount=$((modcount-1))
done

einfo "Autoloaded ${modcount} module(s)"
fi

return 0
}

start() {
# Should not fail if kernel do not have module
# support compiled in ...
[ -f /proc/modules ] || return 0

# Here we should fail, as a modular kernel do need
# depmod command ...
if [ ! -x /sbin/depmod ]
then
eerror "ERROR: system is missing /sbin/depmod !"
return 1
fi

if [ -z "${CDBOOT}" ]
then
if [ /etc/modules.d -nt /etc/modules.conf ]
then
ebegin "Calculating module dependencies"
/sbin/modules-update &>/dev/null
eend $? "Failed to calculate dependencies"
else
einfo "Module dependencies are up-to-date"
fi

if [ -f /etc/modules.autoload -a ! -L /etc/modules.autoload ]
then
# Loop over every line in /etc/modules.autoload.
load_modules /etc/modules.autoload
else
local KV="$(uname -r)"
local KV_MAJOR="`KV_major "${KV}"`"
local KV_MINOR="`KV_minor "${KV}"`"

# New support for /etc/modules.autoload/kernel-$KV
if [ "$(get_KV)" -ge "$(KV_to_int '2.5.48')" ] && \
[ -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ]
then
load_modules /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}"

elif [ ! -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ]
then
ewarn "Missing /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
load_modules /etc/modules.autoload.d/kernel-2.4
else
load_modules /etc/modules.autoload.d/kernel-2.4
fi

#
# Just in case a sysadmin prefers generic symbolic links in
# /lib/modules/boot for boot time modules we will load these modules
#
if [ -n "$(modprobe -l -t boot)" ]
then
modprobe -a -t boot \* &>/dev/null
fi
}


# vim:ts=4

Since then my modules doesn't load. Where is a misstake? Please someone help me.
Back to top
View user's profile Send private message
w0rm
n00b
n00b


Joined: 08 May 2004
Posts: 67

PostPosted: Mon Apr 11, 2005 8:46 pm    Post subject: Reply with quote

Maybe change the file to its primary state?
if that dosen't work - try to re-emerge module-init-tools
Back to top
View user's profile Send private message
Kestutis
n00b
n00b


Joined: 22 Mar 2005
Posts: 10

PostPosted: Mon Apr 11, 2005 8:49 pm    Post subject: Reply with quote

how do I change to it's primary state?
Back to top
View user's profile Send private message
w0rm
n00b
n00b


Joined: 08 May 2004
Posts: 67

PostPosted: Tue Apr 12, 2005 3:39 am    Post subject: Reply with quote

change:

Code:

if [ /etc/modules.d -nt /etc/modules.conf ]
then
ebegin "Calculating module dependencies"
/sbin/modules-update &>/dev/null
eend $? "Failed to calculate dependencies"
else
einfo "Module dependencies are up-to-date"
fi

to
Code:

ebegin "Calculating module dependencies"
/sbin/modules-update &>/dev/null
eend $? "Failed to calculate dependencies"


in /etc/init.d/modules
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum