Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24622 - Linux-2.6 uses /etc/modules.autoload.d/kernel-2.4 on startup
Summary: Linux-2.6 uses /etc/modules.autoload.d/kernel-2.4 on startup
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 15:48 UTC by Lesley van Zijl
Modified: 2003-10-13 15:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The file that has to be added to resolve the bug. (kernel-2.6,471 bytes, text/plain)
2003-07-17 01:21 UTC, uferlos
Details
The file that has to be added to resolve the bug. (kernel-2.6,471 bytes, text/plain)
2003-07-17 01:21 UTC, uferlos
Details
The file that has to be added to resolve the bug. (kernel-2.6,471 bytes, text/plain)
2003-07-17 01:22 UTC, uferlos
Details
patch fixing logic in /etc/init.d/modules (modules.patch,543 bytes, patch)
2003-08-05 15:01 UTC, Michael Stewart (vericgar) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lesley van Zijl 2003-07-16 15:48:11 UTC
I am testing the 2.6.0-test1 development kernel and I noticed that on startup
the 2.4 modules.autoload is used. I guess this is already known.. but you never
know for sure ;)



Reproducible: Always
Steps to Reproduce:
1. boot a 2.6 kernel
2. keep your eyes open at startup ;)


Actual Results:  
the /etc/modules.autoload.d/kernel-2.4 is used in stead of . well 2.5 would be
silly too ;) but you get the point :)

Expected Results:  
change the 2.5 dir to 2.6 or 2.5+ in the next baselayout(?)

not relevant but still:

ws root # emerge info
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.6.0-test1 i686 AMD Athlon(tm) XP 2000+
GENTOO_MIRRORS="ftp://sunsite.dk/mirrors/gentoo/ http://gentoo.linux.no/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo/
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/ "
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 dvd xinerama -gtk2 pic acpi acpi4linux 3dnow aalib alsa avi crypt dga
encode gif gtk imlib ipv6 java jpeg kde lcms mikmod mmx motif mozilla mpeg
ncurses oggvorbis opengl pam pdflib perl png python qt qtmt quicktime readline
sdl spell sse ssl svga tcltk tcpd tiff truetype wmf X xml xml2 xmms xv"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -mmmx -m3dnow -msse"
CXXFLAGS="-march=athlon-xp -O3 -pipe -mmmx -m3dnow -msse"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache fixpackages"
Comment 1 uferlos 2003-07-17 01:21:05 UTC
Created attachment 14592 [details]
The file that has to be added to resolve the bug.

It seems you just have to create a kernel-2.6 file in /etc/modules.autoload.d.
Comment 2 uferlos 2003-07-17 01:21:26 UTC
Created attachment 14593 [details]
The file that has to be added to resolve the bug.

It seems you just have to create a kernel-2.6 file in /etc/modules.autoload.d.
Comment 3 uferlos 2003-07-17 01:22:29 UTC
Created attachment 14594 [details]
The file that has to be added to resolve the bug.

It seems you just have to create a kernel-2.6 file in /etc/modules.autoload.d.
Comment 4 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2003-08-05 14:57:47 UTC
I just ran into this and it seems to be a logic problem in /etc/init.d/modules. It's current logic is like so:

1) does /etc/modules.autoload exist, if so, use that
2) is the kernel > 2.5 and /etc/modules.autoload/kernel-MAJOR.MINOR exist, if so use that
3) otherwise use /etc/modules.autoload/kernel-2.4

The logic is flawed because in step 2 it requires you to be running a >2.5 kernel AND to have the /etc/modules.autoload/kernel-MAJOR.MINOR file to use it.

I am attaching a patch that fixes this logic, by removing the check to see if /etc/modules/kernel-MAJOR.MINOR does exist (it's already checked to be readable in load_modules, if it doesn't exist it's obviously not readable, so this check is unnecessary--load_modules fails silently if it's not readable)
Comment 5 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2003-08-05 15:01:26 UTC
Created attachment 15568 [details, diff]
patch fixing logic in /etc/init.d/modules

the patch I spoke of above
Comment 6 John Davis (zhen) (RETIRED) gentoo-dev 2003-08-18 21:21:58 UTC
wrong category
Comment 7 Jeffrey Forman (RETIRED) gentoo-dev 2003-09-21 12:05:12 UTC
Just found this bug, my possible solution was just to rm the symlink /etc/modules.autoload -> modules.autoload.d/kernel-2.4 and just recreate it as /etc/modules.autoload -> modules.autoload.d/kernel-2.6 and re-add your modules into /etc/modules.autoload. 
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-13 15:42:50 UTC
The symlink have nothing to do with it, just add the file for 2.6. As for
comment #5, the check is there to warn in the next if segment so that the
use can add a new file for whatever kernel, and then try the 2.4 config
file that might have a better chance of working than no one at all.

This is correct.