[ipxe-devel] Booting different initrd , depending on hardware query pci bus

Robin Smidsrød robin at smidsrod.no
Thu Jan 30 09:18:03 UTC 2014


On 29.01.2014 08:52, Petry Roman, SHS-S IT-TS wrote:
> Is there a way to boot alternative initrd images depending on the
> hardware of the client.. i have some clients which have a nvidia gpu and
> others do have ati.. if i embed both dirvers my initrd goes up to
> 340MB.. with one driver i have only 210 MB..

Yes, probe the PCI bus and include additional initrd files if you find
either an ATI, Intel or NVidia gfx card.

> One way would be to use a pcibus query to get the types.. is this
> possible with ipxe ?

Yes, http://ipxe.org/cmd/pciscan. At http://boot.salstar.sk/lspci you
can see a working example of "lspci" written in the iPXE scripting
language. You might be able to use parts of what you see there to create
a script with conditional initrd loading.

If you're able to figure it out I'd love to see the code. I haven't
heard of anyone doing exactly this yet (in public).

-- Robin




More information about the ipxe-devel mailing list