The problem is that the IDE raid is old and whacky enough that the standard redhat boot images don't successfully auto-load the correct modules when it scans the hardware, ergo the raid set isn't seen, only the component drives, and whacky and evil things happen.
However, it looks like these controllers work happily with the LSI fusion mptbase/mptspi/mptscsih series of modules. So, the challenge is to get a base redhat install to load these modules, so I can remotely kickstart the blades for provisioning.
To document my first, failed experiment, here's what I did.
Grabbed as a starting point the boot iso image from images/boot.iso in the unpacked redhat 5.3 cd's.
Mounted the image
- mount -o loop boot.iso /mnt/iso
and copied the contents to a scratch area to work with
- mkdir /var/tmp/iso ; cp -rv /mnt/iso/* /var/tmp/iso
Copied the most recent kernel my current box happened to be running into the new iso directory
- cp -v /boot/vmlinuz-$(uname -r) /mnt/iso/isolinux/vmlinuz
Now, I also have to re-create an initrd for this iso with the appropriate modules pre-loaded. I wanted to leave most of the auto-probing in place, though, so I'm only going to specify --preload= for the mdt* modules I care about.
First, extract the initrd image, and get the list of modules it currently has. This is a two step process since the modules appear to be a compressed cpio image inside the initrd, which is itself a compressed cpio image.
- cd /var/tmp ; gunzip -c iso/isolinux/initrd.img | cpio -iv '*modules.cpv';
- modules=$(gunzip -c modules/modules.cpv | cpio -it | cut -d'\' -f3 | sed -e 's/\.ko$//' | sort);
note I'm using bash's embedded command syntax $( ) instead of the traditional backticks above.
Now the shell var 'modules' has a list of modules. I still need a few preloaded modules, and to convert the module list into a useful '--with=... --with=...' argument for mkinitrd
- with="--with=$(echo $modules | sed -e 's/ /\-\-with=/g')"
- preload="--preload=mptscsih --preload=mptsdi --preload=mptbase"
Now, finally, make the initrd:
- mkinitrd -f -v $with $preload iso/isolinux/initrd.img $(uname -r)
And package it up into an iso:
- mkisofs -J -R -T -v -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o blade-rhel53-boot.iso iso/
The problem is, when I do a "linux rescue" boot using this cd image, it still didn't load the mpt* modules! Can anyone point me to what I'm doing wrong?
Thanks!
-- Pat
Edit:
Re-reading this this morning, I noted several typos in the commands as I typed them up last night. Also, the fonts looked like crap.
In the interest of hopefully better accuracy, here's just a (trimmed) copy and paste of my shell history:
- 2103 mkdir iso; cp -rv /mnt/iso/* iso
- 2109 gunzip -c iso/isolinux/initrd.img | cpio -idv "*modules.cgz"
- 2112 modules=$(gunzip -c modules/modules.cgz | cpio -it | cut -d'/' -f3 | sed -e 's/\.ko$//' | sort)
- 2113 echo $modules
- 2116 with="--with=$(echo $modules | sed -e 's/ / \-\-with=/g')"
- 2117 echo $with
- 2120 uname -a
- 2121 cp /boot/vmlinuz-2.6.18-128.1.10.el5 iso/isolinux/vmlinuz
- 2123 preload="--preload=mptscsih --preload=mptspi --preload=mptbase"
- 2124 sudo mkinitrd -f -v $with $preload iso/isolinux/initrd.img 2.6.18-128.1.10.el5
- 2129 chmod u+w iso/isolinux/isolinux.bin
- 2130 mkisofs -J -R -T -v -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o blade-rhel53-boot.iso iso/
1 comment:
Did you intend this latest post to be in smaller print? It is way over my head anyway, but the small print would be tough on my middle aged eyes!
Post a Comment