Compiling MegaRAID module Ganesh_Viswanathan at
Wed Aug 13 16:38:01 CDT 2003

You only need to recompile the module. You will need the kernel source
though. However, you can compile on any machine and move the relevent file
(i.e. megaraid.o) to the target machine.

Let's assume we have the 2.4.20-8smp stock redhat kernel installed and need
megaraid for that:

1. First backup the following files:

2. Install kernel source rpm
  # rpm -ivh kernel-source-2.4.20-8.i386.rpm

3. Go to /usr/src/linux-2.4/ directory
  # cd /usr/src/linux-2.4/

4. Copy the megaraid driver source to the kernel to compile it.
  # cp megaraid.c drivers/scsi/.
  # cp megaraid.h drivers/scsi/.

5. Copy the redhat kernel config from the configs/ directory to .config
  # cp configs/kernel-2.4.20-i686-smp.config .config

6. Compile the driver
  # make oldconfig
  # make dep
  # make modules SUBDIRS=drivers/scsi/

7. Once all the modules are made, the megaraid.o file is installed
  # cp drivers/scsi/megaraid.o

8. Check if the module is compiled properly
  # depmod -a 2.4.20-8smp -F /boot/

9. Remake the initrd
  # mkinitrd -f /boot/initrd-2.4.20-8smp.img 2.4.20-8smp

10. Reboot

Replace the 2.4.20-8smp with whatever kernel you need to compile. If you
have a custom kernel, skip step 5 and the "make oldconfig" command in step

Let us know if you have any trouble.


-----Original Message-----
From: syn uw [mailto:syn_uw at] 
Sent: Wednesday, August 13, 2003 2:49 PM
To: apalma at; Linux-PowerEdge at
Subject: Re: Compiling MegaRAID module

Ok so how do you change the default driver in the kernel for the megaraid 
driver from in the Linux kernel ? Or is there maybe a quick doc

or howto somewhere about that ?

I am planning to use the megaraid driver 1.18i as suggested by Matt Domsch 


>From: Álvaro Palma <apalma at>
>To: Linux-PowerEdge at
>Subject: Re: Compiling MegaRAID module
>Date: Wed, 13 Aug 2003 14:10:38 -0400
>Mensaje citado por syn uw <syn_uw at>:
> > Hello,
> >
> > I just downloaded the MegaRAID Linux module driver from 
> > now I've got one .h and one .c file but unfortunately no Makefiles. 
> > What is
> > exact parameters which I need to pass to gcc to compile this driver 
> > ?
>Better than that, download a kernel source, change the default driver 
>one and compile the custom kernel. I tried to compile the driver 
>separately, but
>it didn't work, even after rebuild the RAMdisk, always got kernel panics at

>BTW, what version of the megaraid driver did you download? I advice you 
>the 2.00.7 (patched for 2.4 kernels), it works a lot faster (aprox twice) 
>than 1.18.
>Álvaro Palma
>Linux-PowerEdge mailing list
>Linux-PowerEdge at 
>Please read the FAQ at or search the list
>archives at

Help STOP SPAM with the new MSN 8 and get 2 months FREE*

Linux-PowerEdge mailing list
Linux-PowerEdge at
Please read the FAQ at or search the list
archives at

More information about the Linux-PowerEdge mailing list