Wednesday, August 18, 2010

Check the CommandLine Options in your PXE Booting Linux

I'm not sure if the grammar in the subject is the best it can be.

A question came up on a mailing list about command line options which can be passed to the linux installer at boot time.  The user in question is rolling out a series of new hosts with RocketRaid HBAs in them - for which I admire his courage where I gave up - and needs to push the driver disk to them at install time or they'll never see the root disks.  No, kickstart is not a viable option yet.

After some groveling through the options - and I suspect a RH employee who I fear had  to hold back for fear of breaching a Centos/RHEL condition - I think we got him exactly what he needs, which is awesome.

Want to look at those command line options in one go?  Try this:

zcat /tftpboot/images/centos5-x86_64/initrd.img | \
     cpio -iv --to-stdout sbin/loader|strings|less

Do that - adjusting for location - and start vgrepping.

For what it's worth, after jamming a fan onto my Adaptec 2405 (a Scythe Mini Kaze HTPC Silent Mini Fan 50MM 4500RPM 9.42CFM 26.09DBA 2 Pin W/ 3 Pin Adaptor, to be OCD about it) works like a charm.  Go get one of those and discard the HotPoint stuff, imho.

Labels: , , , , , , , ,

Sunday, July 11, 2010

Find your RAID MD Device Name from a Member Device

So you've got a bajillion RAID arrays; that's okay, really.  Thing is, if you need to find its mdX device, it can get tricky.  vGrep taxing the eyes?  Mine too, and I haven't had much luck with an alternative.  I know there's one out there, but I have yet to trip over it.

Here's what I've started doing:
mdadm --detail --scan |\
awk '/'`mdadm -E /dev/sde3|awk '/UUID/{print $NF}'`'/{print $2}'

/dev/md6
 Substitute in your own values for /dev/sde3.

Labels: , , , , ,