[h1]Ubuntu Server 9.10 + QLogic Fiber HBA QLA2xxx (2300/2400/...)[/h1]
解決 Ubuntu Server 9.10 Qlogic QLA2XXX 系列光纖通道 HBA 掛載問題
e.g. qla2342, qla2442, etc...
Symptom :: 症狀:
Ubuntu Server 9.10 + Qlogic Fiber HBA 無法 Load Firmware
代碼:
firmware: requesting ql2400_fw.bin or firmware: requesting ql2300_fw.bin
scsi(0): Failed to load firmware image (ql2300_fw.bin or ql2400_fw.bin)
Firmware image unavailable.
Workaround Solution:
[h2]Step #1. cd /etc/initramfs-tools/hooks/[/h2]
pre-condition: sudo su
[h2]Step #2. Create an initramfs hook script file named "qla2xxx"
代碼:
#!/bin/sh -e
# initramfs hook for ql2xxx firmware loading
PREREQ="udev"
# Output pre-requisites
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
mkdir ${DESTDIR}/lib/firmware
cp -p /lib/firmware/ql2400_fw.bin ${DESTDIR}/lib/firmware/
cp -p /lib/udev/firmware.sh ${DESTDIR}/lib/udev/
cp -p /lib/udev/rules.d/50-firmware.rules ${DESTDIR}/lib/udev/rules.d
[h2]Step #3. chmod 755 qla2xxx[/h2]
[h2]Step #4. cp /lib/firmware/ql*.bin /lib/firmware/$(uname -r)/[/h2]
e.g. /bin/cp /lib/firmware/ql*.bin /lib/firmware/2.6.31-14-generic-pae/
[h2]Step #5. (OPTIONAL) cp /lib/firmware/ql*.bin /lib/firmware/$(uname -r)/qlogic/[/h2]
e.g. /bin/cp /lib/firmware/ql*.bin /lib/firmware/2.6.31-14-generic-pae/qlogic/
[h2]Step #6. update-initramfs -u (PWD := /etc/initramfs-tools/hooks/)[/h2]
Reboot after done for Step #1 ~ Step #6
[hr]
Double Check
=> mkdir /tmp/imgtest
=> cd /tmp/imgtest
=> zcat /boot/initrd.img-$(uname -r) | cpio -i
=> find . -name "ql2*.bin"
[hr]
參考資料
Qlogic QLA2xxx Fiber HBA Ubuntu Server Hook Script
=> https://bugs.launchpad.net/ubuntu/lucid/+source/linux-firmware/+bug/328550/comments/11(2010-04-30 15:02)