iPXE discussion forum
same config for uefi and legacy - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: same config for uefi and legacy (/showthread.php?tid=18156)



same config for uefi and legacy - bluedark - 2019-05-02 18:01

Hello everyone.
I have my ipxe server that works great.
I just have a problem when I want to start my client computers on a winpe image in tftp.
I have to have 2 configurations for legacy positions and for uefi posts. For uefi, I put "kernel wimboot" then "initrd BCD"... For legacy, I have to put "kernel wimboot wimboot" then "initrd BCD BCD" ...
Is it possible to have the same config for all positions in legacy or uefi? Thank you in advance


RE: same config for uefi and legacy - NiKiZe - 2019-05-02 22:50

What you are talking about here is the iPXE script (config is what is done at compiletime)

Yes use the same script, you can write it to be compatible for both legacy and uefi.
Actually in your case with the example so far

kernel wimboot
initrd BCD

would work just fine.
but for example, use the concept from below:

initrd -n BCD http://x.x.x.x/Boot/bcd BCD
initrd -n boot.sdi http://x.x.x.x/Boot/boot.sdi boot.sdi
initrd -n boot.wim http://x.x.x.x/sources/win10.wim boot.wim

the best example here is the last line, the filename on the server is win10.wim
the -n boot.wim is what gives the name for EFI
and the last boot.wim is what is used in legacy.

This is just part of an example for how to boot from http,
If you have a working setup, just add the filename after -n and at the end and you should be fine.
Also note that if it already has the correct name on the server, you don't have to specify it double.


RE: same config for uefi and legacy - bluedark - 2019-05-03 08:50

thanks for your help.

So I modify my config (i don't boot on http but on tftp) :

kernel wimboot
initrd -n BCD /tftpboot/bcd BCD
initrd -n boot.sdi /tftpboot/boot.sdi boot.sdi
initrd -n boot.wim /tftpboot/boot.wim boot.wim
boot

It works well in legacy but not in uefi. I still have to have 2 configurations.

For uefi:

kernel wimboot
initrd /tftpboot/BCD
initrd /tftpboot/boot.sdi
initrd /tftpboot/boot.wim
boot

Thanks!


RE: same config for uefi and legacy - NiKiZe - 2019-05-03 22:58

(2019-05-03 08:50)bluedark Wrote:  thanks for your help.

So I modify my config (i don't boot on http but on tftp) :
Again, this is an iPXE script, not a config,
And http was an example.

(2019-05-03 08:50)bluedark Wrote:  kernel wimboot
initrd -n BCD /tftpboot/bcd BCD
initrd -n boot.sdi /tftpboot/boot.sdi boot.sdi
initrd -n boot.wim /tftpboot/boot.wim boot.wim
boot
So if you have the same names you can just skip the extra names all together.

(2019-05-03 08:50)bluedark Wrote:  It works well in legacy but not in uefi. I still have to have 2 configurations.

For uefi:

kernel wimboot
initrd /tftpboot/BCD
initrd /tftpboot/boot.sdi
initrd /tftpboot/boot.wim
boot

This doesn't make sense.
What is the actual error you are seeing? Not just "It works well in legacy but not in uefi"

Both of these should work fine for both platforms, given that the files are the same and are known to work on both.

The only thing that I can think of is that you have something else going on or being loaded, you might want to try imgfree before this, or imgstat to show what is loaded.


RE: same config for uefi and legacy - bluedark - 2019-05-05 13:47

it loads the 4 files well and here is the error after: "bad cpio magic. Fatal: could not extract initrd files".

how to use imgfree or imgstat?

Thanks!


RE: same config for uefi and legacy - NiKiZe - 2019-05-06 21:03

before boot, add imgstat followed by pause, these are ipxe commands that you add to the scripts.
imgstat will show you which files are loaded and how..

using imgfree before your first wimboot releated file will clear these so that nothing is interfering with the files needed for wimboot, and if you use it in boot legacy and efi it might show why you are seeing the differences.


RE: same config for uefi and legacy - bluedark - 2019-05-13 16:03

Finally I completely redo my ipxe server and it works with the same script ...
Here it is:

kernel wimboot
initrd BCD BCD
initrd boot.sdi boot.sdi
intird BOOT.WIM BOOT.WIM

The only difference is the boot.wim file which is in uppercase. It is true that the one that is contained in the iso of my winpe is written in uppercase.
I guess the problem came from there ...