Assumptions: This article assumes you have already installed Debian or Ubuntu from one of the many aacraid / PERCraid / megaraid installation CD's that are available online but now want to switch to a supported Debian / Ubuntu packaged kernel to take adavantage of security updates etc.
You will need to install the below packages. I have chosen the kernel-image-2.6.686-smp as Debian is installed on a dual PIII DELL PowerEdge 2450. You will need to choose the appropriate Debian / Ubuntu kernel package that suits your hardware. irqbalance is only for SMP machines:
$ sudo apt-get install initrd-tools irqbalance kernel-image-2.6-686-smp module-init-tools
initrd-tools provides us with mkinitrd which we will need to make an initrd image
kernel-image-2.6-686-smp provides us with a packaged kernel for which we will build the initrd image and replace the existing installation kernel.
As all of the aacraid / PERCraid / Megaraid installation disks I have come across are based on a 2.4 Linux kernel and use lilo, you will most likely need to:
$ sudo vi /etc/lilo.conf
and add an initrd line as per below to the section for the installed kernel
which should result in a completed section for the installed kernel looking something like this:
image=/vmlinuz label=Linux read-only initrd=/initrd.img
Now edit /etc/mkinitrd/modules to include the module you need for PERCraid:
$ sudo vi /etc/mkinitrd/modules
As the version of PERCraid in the PowerEdge 2450 is Perc2/DC I need to include the megaraid driver and added the below lines to the bottom of /etc/mkinitrd/modules:
# # Driver for DELL Perc2/DC in DELL PowerEdge 2450 # megaraid
You will now need to make an initrd image that includes the megaraid driver for the kernel you have installed. In this example, the kernel that the Debian package installed was version 2.6.8-3-686-smp so I ran the following command to build the initrd image:
$ sudo mkinitrd -o /boot/initrd.img-2.6.8-3-686-smp 2.6.8-3-686-smp
You will need to substitute the version above to the versions on your system. To be on the safe side, I keep a copy of the install kernel hanging around so I end up with the following kernels on the file system:
$ ls -l /vmlinuz* /vmlinuz -> boot/vmlinuz-2.6.8-3-686-smp /vmlinuz-PERCraid -> /boot/bzImage-PERCraid-2.4.18
I then also add this kernel to /etc/lilo.conf as per below:
image=/vmlinuz.PERCraid label=PERCraid read-only optional
Make sure that your lilo.conf includes a delay statement and "install=text " then update lilo:
$ sudo lilo Added Linux * Added PERCraid $
Now reboot and make sure your PERcraid rescue CD is handy incase you made a mistake. If everything has been completed correctly then you should be booting into the supported kernel with the initrd image ensuring that PERCraid is handled correctly.