Re: [SLUG] megaraid driver disk to install CentOS4.3

From: Daniel Jarboe (daniel.jarboe@gmail.com)
Date: Sun Mar 26 2006 - 10:12:05 EST


> I've found the source for the module at
> http://www.hyper-linux.org/HP-HOWTO/mirror/Software/ami-mr114b.tar.gz
>
> The readme has instructions, but I think they assume you have the kernel sources
> installed, which I do not. Even if I did, the system I am running now only has a 2.4
> kernel, and I think we need to run them against the 2.6 kernel to be of use with the
> CentOS 4.3 install...

Yes, the megaraid module you want to load needs to be built against
the source of the same version kernel you _will_ be running. The
source of the kernel used by CentOS 4.3 should readily available in
an rpm called kernel-source-version.rpm. This is different from
kernel-version.src.rpm. You want the kernel-source one. Installing
the kernel-source rpm will write the build tree in /usr/src/. If you
are tight on space you might need to make some room.

> Can I install the proper 2.6 kernel sources on my CentOS 3.6
> box, (which is running a 2.4 kernel) and compile the megaraid module against these
> sources?

Yes. Your CentOS 3.6 box running a 2.4 kernel should be able to build
the CentOS 4.3 2.6 kernel and modules just fine. Do you know for sure
that the CentOS 4.3 kernel source does not include the old megaraid
driver, just that CentOS packagers configured the module to not be
built? You might just have to enable it during the kernel config and
build that. That would be the easiest thing at this point. Otherwise
you will have to copy the module source from somewhere else, put it
into the tree, and work with that.

> Also, if I compile this module into the kernel, what would happen if I used yum or
> up2date to update the kernel? I don't think the system would boot... Maybe I can
> compile the kernel with the megaraid module as a loadable module? Not sure, any help
> would be appreciated.

When you build additional modules that do not come with the distro
kernel, every time you upgrade to the latest distro-packaged kernel
you should re-build the module for the new version. In some cases you
might be able to force load the old module, but Linux interfaces can
and do change all the time so your most reliable course is to always
recompile.

Hrm, this might get long, but I think in this case it is better to be
complete. As to the question of a loadable module or building it
directly into the kernel, I would recommend building it as a loadable
module if you can get away with it. That way you are still running
the CentOS kernel which is tested for your distribution and all that
jazz, not running your own kernel build which might possibly introduce
some irregularities that were not tested for in QA. You'd like to
change as little as possible, and introducing a single loadable module
is the best thing for that.

The reason you might not be able to work with a loadable module,
however, is that this driver is a SCSI driver. If you need to read
from a SCSI device to load the SCSI driver... well, good luck :).
It'd be like me needing to read a book in Chinese to learn how to read
Chinese.

Do you know if you boot process uses an initrd (initial ramdisk)? If
not, you should probably start. If you use an initrd, you can try
building the megaraid module as a loadable module and include it in
the initrd (see mkinitrd on your system). Again, I don't know how
much you know about the process, but an initrd is basically a
compressed filesystem that is mounted in memory at boot time to load
additional drivers. A common use is to load an ext3 module before
reading from an ext3 file system. A possible concern is that the SCSI
driver might be required so early in the boot process that you will
need to build it directly into the kernel, but I think the initrd
method will work just fine for you. If it doesn't, you will need to
build a new kernel every time you want to upgrade to the latest
distro-packaged kernel source. Not fun, but there are others that do
it too. If you were paying for a support package, this is something
that you would probably try asking your support provider to get
included in the distro-packaged kernel so you would just yum/up2date
and be happy.

Sorry for rambling, but I hope this has answered your current
questions (and a number of followup ones). To recap, the best thing
to try is to build the loadable module for the same 2.6 version you
want to run, make sure the module is included in the initrd, and make
sure your boot loader includes the initrd. When you install a new
kernel, you will want to rebuild the module and include it in the new
initrd again.

~ Daniel

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:05:36 EDT