iPXE discussion forum
default script for chainloading compatibility - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: default script for chainloading compatibility (/showthread.php?tid=1038)



default script for chainloading compatibility - AT-HE - 2011-11-04 22:05

hi

as we talked by mail ... is there any way to get included a default script to support chainloading without a dhcp server with user-class support?

imagine this pc booting

----
nvidia geforce 6200le
award bios 1.2 - press del to enter menu
cpu pentium 4 1200mhz
1204787 kb ok
booting from lan selected
dhcp: 192.168.1.3 assigned, boot image=undionly.kpxe
tftp: loading undionly.kpxe
tftp: loading default.ipxe
welcome to ipxe

... and customize default.ipxe to do anything we want? (boot from http depending on querystring, chain another image.. etc etc)

is anyway to download a precompiled undionly.kpxe with EMBED=myscript.ipxe , and myscript.kpxe with fixed

#!ipxe
chain default.ipxe

so anyone will be able to edit his own default.ipxe with custom options on tftp server root? (chainloadings, http images with custom urls, etc)

that is because is easier and fast to download a precompiled undionly.kpxe with this feature included instead of compiling by ourselves, besides many people doesnt know how to compile or cant compile in his machine (incompatible pc, doesnt have a compiler installed, etc)


RE: default script for chainloading compatibility - mcb30 - 2011-11-07 12:53

(2011-11-04 22:05)AT-HE Wrote:  imagine this pc booting

----
nvidia geforce 6200le
award bios 1.2 - press del to enter menu
cpu pentium 4 1200mhz
1204787 kb ok
booting from lan selected
dhcp: 192.168.1.3 assigned, boot image=undionly.kpxe
tftp: loading undionly.kpxe
tftp: loading default.ipxe
welcome to ipxe

Legacy PXE stacks will be able to download only a single file via TFTP, so you need some way of integrating your iPXE script into a single image, as is done with

Code:
make EMBED=script.ipxe bin/undionly.kpxe



RE: default script for chainloading compatibility - AT-HE - 2011-11-07 13:35

that is i am talking about ... what if you compile undionly.kpxe with embedded EMBED=stage1.ipxe .. and stage1.ipxe contents are

----
#!ipxe
chain default.ipxe
----

that way undionly will search for default.ipxe file in tftp root dir at boot time, allowing us to write our own custom script ???


RE: default script for chainloading compatibility - mcb30 - 2011-11-07 14:05

(2011-11-07 13:35)AT-HE Wrote:  that is i am talking about ... what if you compile undionly.kpxe with embedded EMBED=stage1.ipxe .. and stage1.ipxe contents are
----
#!ipxe
chain default.ipxe
----
that way undionly will search for default.ipxe file in tftp root dir at boot time, allowing us to write our own custom script ???

Yes, that would work.


RE: default script for chainloading compatibility - AT-HE - 2012-07-11 16:41

i think this would bring more independence and flexibility to ipxe, since it give us the posibility to avoid the need to trick isc/windows server dhcp, being able to run in ANY DHCP SERVER


RE: default script for chainloading compatibility - mcb30 - 2012-07-11 18:14

(2012-07-11 16:41)AT-HE Wrote:  i think this would bring more independence and flexibility to ipxe, since it give us the posibility to avoid the need to trick isc/windows server dhcp, being able to run in ANY DHCP SERVER

There's nothing stopping you from building iPXE with an embedded script that does what you want, as explained above.

(It can't be made the default behaviour, because that would violate specifications and break existing setups.)

Michael