下载地址:
http://www.lsi.com/channel/products/raid_controllers/megaraid_9240-4i/index.html
如是是64位系统,则解压其中的megaraid_sas-v00.00.04.37_k2.6.32-21-server.amd64.gz,得到megaraid_sas-v00.00.04.37_k2.6.32-21-server.amd64文件,把这个文件加上后缀.zip;再次解压就会得到下面所用用到的2个文件
Ubuntu 10.04 LTS Server AMD64 x64 Installation Instructions:
1. Copy "megaraid_sas.ko"
Copy "initrd.img-2.6.32-21-server" to an USB-key
把这2个文件拷贝进U盘,然后用系统盘装系统
2. Boot off Ubuntu-xx cd, Until a screen Detect disks said "No disk drive was detected"
到了检测磁盘这步,当出现“检测硬盘失败”时,弹出光盘
3. Insert your USB-key, select for <Go back>, press on Detect disks
此时插入U盘,选择“返回”
4. Press ALT+F2. exit to console
按“ALT+F2”,进入终端
5. fdisk -l (scan for device, assume my USB-key is /dev/sda1)
执行fdisk -l命令,得到U盘盘符为/dev/sda1
6. mkdir /mnt2 ; mount /dev/sda1 /mnt2
新建/mnt2目录,挂载U盘
7. uname -r (verify that your kernel is 2.6.32-21-generic)
执行uname -ar命令查看内核版本是否与下的ko文件一致
8. cp -f /mnt2/megaraid_sas.ko /lib/modules/2.6.32-21-generic/kernel/drivers/scsi/megaraid
拷贝ko文件到相应目录
9. cp -f /mnt2/initrd.img-2.6.32-21-server /etc
拷贝initrd文件到相应目录
10. umount /dev/sda1 and remove your USB-key from the installation system
卸载U盘
11. Press ALT+F1 to return to Unbuntu installer screen and select "Go back", next screen select "Detect disks" press enter
按“ALT+F1”回到安装界面,重新检测磁盘
(Expect MegaRAID driver get load and display disk partition)
Proceed to installation
12. DO NOT REBOOT after Ubuntu is done. Exit to console again (ALT+F2)
Check for kernel version
装好系统后千万不要直接按“继续”重启,进去终端2要先替换掉/boot中的initrd.img-2.6.32-21-server
见下2步(因为原先的initrd不带这个raid驱动)
13. ls -l /target/boot (expect to see kernel 2.6.32-21-server)
14. cp -f /etc/initrd.img-2.6.32-21-server /target/boot/initrd.img-2.6.32-21-server
覆盖initrd文件
Press ALT+F1 to return to the installer screen and REBOOT
回到安装界面,按“继续重启”
****** NOTE ******
Instructions for recompiling/updating megaRAID sas driver
1. sudo -s (must login as root)
2. apt-get install build-essential ; apt-get install libncurses5 ; apt-get install libncurses5-dev
3. apt-get install linux-headers-<new-kernel>
4. cd /usr/src ; ln -s linux-headers-<new-kernel> linux
5. tar zxvf megaraid_sas-v00.00.05.21-src.tgz ; cd /usr/src/v00.00.05.21
6. make �C /lib/modules/<new-kernel/build/ M=`pwd` (recompile megaraid_sas source)
7. cp megaraid_sas.ko /lib/modules/<new-kernel>/kernel/drivers/scsi
8. rm /boot/initrd.img-<new-kernel>
9. update-initramfs -c -k <new-kernel>
Replace <new-kernel> with actual kernel version eg 2.6.32-21-generic