Why are modules and modules.conf not versioned?
The background to this question is based on the fact that different
versions of kernels such as 2.2.x and 2.4.x and also different custom
kernels have different module requirements therefore switching between
them is not seemless in the current system. I currently use woody.
Hopefully this message is not totally off base.
The evidence basically shows that versioning of kernel resources are
prevalent with the exception of /etc/modules and /etc/modules.conf
files. For example:
To get what I found to be more desired solution, I modified the
/etc/init.d/modutils script and added a support for version in the
following changed lines:
# Loop over every line in /etc/modules-version.
echo -n "Loading modules for $version: "
(cat /etc/modules-$version; echo) | # make sure there is a LF at the end
Then I added a /etc/modules-version file for the kernel I was interested
in to get the desired effect. This of course does not help for the
options in modules.conf file which I assume are processed by
modprobe(insmod). Also modconf does not comprehend this so it will not
modify a versioned /etc/modules file.
Other than being a complete hack, I'm pleased with this approach as I
can get different kernels to work nicely without error messages and
other module loading issues. Since the modules loaded belong with the
kernel I would think it logical that these files be versioned as well.
In a related front with lilo. I think it would be nicer to just add a
new image for each kernel installed with label=version and then just add
this version to default=version if the user responds to a choice to
change default when loading a new kernel. Then the generic symbolic
links for vmlinuz, initrd.img and Linux etc. could be eliminated. I
think this would simplify things alot.
The added benefit is that adding new versions of kernels could be done
without hand editing lilo.conf unless different options are needed. The
Linux.old system at least for me only works for the first kernel added.