We have a Poweredge server at work that we just got in to run Asterisk. (Since the old OSX server kicked the bucket. The server didn't come with a RAID controller, so we ordered a HighPoint PCI-E RocketRAID 2310.
I've not really done much with the phone system, but once upon a time I knew how to put a computer together, so was tasked with sticking this card in and getting the system up. The distribution I was to install was Trixbox which is based on CentOS which is in turn based on Red Hat Enterprise.
These instructions are specific to Trixbox, but should carry over fairly well to adding third party filesystem drivers to any Linux system.
The first issues came with the installation of Trixbox. The drivers for accessing the RR2310 aren't included, so you have to download them from HighPoint's support. They had a version that was marked as Red Hat Enterprise / CentOS, so I downloaded those.
Upon extracting the tarball, I found that they were 3.5" floppy images. The iMac I was working on couldn't open them, so I downloaded a copy of Helix, booted the server off of that and used it to copy the files off:
mount -o loop disk.img /mnt/disk
cp -a /mnt/disk/* /mnt/flashdrive/disk/
There were two good looking candidates for the files I was looking for: rr2310_00-rhel-4-i386.img
and rr2310_00-rhel-4u3.img
, so I copied them both. There is a README
and the second is identified as being for the x86_64 version. Well, I'll save you the trial and error it took me and if you were to do:
cat rr2310_00-rhel-4u3/modules.cgz | gunzip | cpio -it
You'd see:
2.6.9-34.EL/i686/rr2310_00.ko 2.6.9-34.EL/x86_64/rr2310_00.ko 2.6.9-34.ELhugemem/i686/rr2310_00.ko 2.6.9-34.ELlargesmp/x86_64/rr2310_00.ko 2.6.9-34.ELsmp/i686/rr2310_00.ko 2.6.9-34.ELsmp/x86_64/rr2310_00.ko
That matches the kernel version of CentOS-4 and are the needed files. (The others are for 2.6.9-5
, 11
and 22
.)
Having burned those files onto the root of a CD, I ran the Trixbox install:
linux dd
This prompts you for a drivers disc that lets you put in our CD and recognizes RAID controller. Unfortunately it seems to skip over some of the automation that Trixbox has put into the Asterisk install, but there's no way around it.
All of the following changes can be done at the end of the installation if you hit ALT-F2
to get a prompt before rebooting the system.
The next disappointment came when the system rebooted. The kernel module hadn't been saved in the system and to I ended with a kernel panic complaining of not being able to mount the root filesystem.
I rebooted the system using the Trixbox CD in rescue mode using the command: (This isn't necessary if you know not to reboot when finishing the install.)
linux dd rescue
I copied the kernel module into the RAID filesystem:
cp /tmp/rr2310_00.ko /mnt/sysimage/lib/modules/2.6.9-34.0.1.EL/kernel/drivers/scsi/
Then I made the RAID filesystem the base for my session:
chroot /mnt/sysimage
Whenever the kernel is started, there is an initial ramdisk filesystem that is loaded and that it uses to find anything else that it needs to complete booting. These cramfs based boot filesystems can be created with mkinitrd
.
mkinitrd --preload scsi_mod --preload sd_mod --with rr2310_00 /boot/initrd-2.6.9-34.0.1.EL+rr2310.img 2.6.9-34.0.1.EL
If you want to check that the filesystem was correctly created, you can run:
cat /boot/initrd-2.6.9-34.0.1.EL+rr2310.img | gunzip | cpio -it | less
All that is left now is to edit /boot/grub/grub.conf
and add a section using the new initrd:
title RAID CentOS-4 i386 (2.6.9-34.0.1.EL) root (hd0,0) kernel /vmlinuz-2.6.9-34.0.1.EL ro root=/dev/VolGroup00/LogVol00 initrd /initrd-2.6.9-34.0.1.EL+rr2310.img
Happy calling.
Places that I have found kernel modules on the trixbox CD:
for file in *.img; do mount -o loop "$file" mnt; mkdir "${file%.img}"; cp -a mnt/* "${file%.img}"; pushd "${file%.img}"; cat modules.cgz | gunzip | cpio -i --make-directories; popd; umount mnt; donecd /ramdisk mkdir trixbox mount /cdrom cp -av /cdrom/* trixbox/ cd trixbox/CentOS/base/ mkdir mnt mount -o loop stage2.img mnt mkdir stage cp -a mnt/* stage cd stage/modules/ cat modules.cgz | gunzip | cpio -i --make-directories cp ../../../../rr2310_drivers/rr2310_00-rhel-4u3/2.6.9-34.EL/i686/rr2310_00.ko 2.6.9-34.EL/i686/ mv modules.cgz modules.original.cgz find 2.6.9-34.EL/ | cpio -o | gzip -9 > modules.cgz rm -rfv 2.6.9-34.EL/ cd ../.. mkcramfs stage stage2.img rm -rfv stage mkisofs -o trixbox.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -r trixbox scp trixbox.iso dysbulic@10.1.1.164: drutil burn trixbox.iso