iPXE discussion forum
wimboot using grub2 on EFI - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: wimboot using grub2 on EFI (/showthread.php?tid=10703)



wimboot using grub2 on EFI - sherpya - 2017-12-25 22:07

Hi,
I'm an happy user of wimboot from grub2 on my usb stick, I can start windows 10 setup, dart even with files withing an iso file.
Unfortunately I'm unable to make it work in efi:
  • load16 does not work (looks like it does not execute any code at all)
  • chainloading snponly.efi stops when I call boot with "no such device" (in efi_image.c)
  • chainloading wimboot will map each file at the root of the usb stick, the same result of chainloading bootmgr.efi, so I have no advantages over it
  • loadefi says wimboot has invalid signature

Right now I'm using qemu with OVMF

If you need additional info just let me known


RE: wimboot using grub2 on EFI - sherpya - 2017-12-28 20:03

I would to add that linuxefi is a patch of some linux distro, and I've also tested linux that instantly reboots


RE: wimboot using grub2 on EFI - Deoptim - 2018-02-18 22:26

Up.
Same problem.


RE: wimboot using grub2 on EFI - sherpya - 2018-03-27 02:50

unfortunately still nothing, but looks like the file: protocol is working:
Code:
iPXE> kernel file:/boot/wimboot
file:/boot/wimboot... ok
iPXE> initrd file:/dart/BCD
file:/dart/BCD... ok
iPXE> initrd file:/dart/boot.sdi
file:/dart/boot.sdi... ok
iPXE> initrd file:/dart/boot.wim
file:/dart/boot.wim... ok
iPXE> boot
Could not boot: No such device (http://ipxe.org/2c048087)
iPXE>

by skipping efi_pxe_install() and efi_image_path() call I was able to start wimboot executable
but then it fails:

Code:
wimboot v2.6.0 -- Windows Imaging Format bootloader -- http://ipxe.org/wimboot

Command line: "wimboot"
Could not open simple file system: 0x8000000000000002
Could not boot: Error 0x7f048281 (http://ipxe.org/7f048281)

I suppose it should be possible to setup needed structures for wimboot while skipping not applicable calls for snp protocol


RE: wimboot using grub2 on EFI - NiKiZe - 2018-03-28 19:43

[quote='sherpya' pid='20182' dateline='1522115419']
Code:
iPXE> boot
Could not boot: No such device (http://ipxe.org/2c048087)

That error page is updated with more info, make sure you have at least one open network interface for iPXE to bind to when you run boot


Sorry can't help with the actual issue of getting grub to directly boot wimboot. Might be better to ask those that support the development of grub for how to do the correct initrd and then chain to a efi binary


RE: wimboot using grub2 on EFI - sherpya - 2018-04-09 02:06

I've found a thread on reboot.pro forum, a guy found a way to make it works, but it's very strange:
http://reboot.pro/topic/21266-grub-uefi-wimboot-error-kernel-too-old/?p=204066

I've tested it and it works, looks like you need to wait the second ctrl+b prompt, maybe after the first one ipxe opens the snp device


RE: wimboot using grub2 on EFI - NiKiZe - 2018-04-09 05:55

(2018-04-09 02:06)sherpya Wrote:  I've tested it and it works, looks like you need to wait the second ctrl+b prompt, maybe after the first one ipxe opens the snp device

That is one solution that works without understanding why ..

This is what I wrote:
Quote:make sure you have at least one open network interface for iPXE to bind to when you run boot

Now to explain why the other solution works ...

The "first" Ctrl-B is before autoboot have run, which means before ifopen/dhcp. If autoboot fails to find information for booting, such as tftp server and filename, then it will present you with the "second" Ctrl-B. And in that case ifopen has already run.

So to summarize:
* Enter shell and run ifopen for it to work in both cases (it still requires the presence of a NIC)
* If you have a DHCP server that gives out boot information there will not be a second Ctrl-B


RE: wimboot using grub2 on EFI - sherpya - 2019-05-01 12:35

I've finally managed to make it work, I've added ifopen command on top of the script, obiviously it does not work on snponly and probabily it needs a nic as you said


RE: wimboot using grub2 on EFI - NiKiZe - 2019-05-01 17:57

(2019-05-01 12:35)sherpya Wrote:  ... and probabily it needs a nic as you said

There is no probably here, it is mandatory, as described on that error url. http://ipxe.org/2c048087


RE: wimboot using grub2 on EFI - sherpya - 2019-05-01 20:26

(2019-05-01 17:57)NiKiZe Wrote:  
(2019-05-01 12:35)sherpya Wrote:  ... and probabily it needs a nic as you said

There is no probably here, it is mandatory, as described on that error url. http://ipxe.org/2c048087

Nice, perhaps you can add:
Make sure you have a open and working network interface when running boot (i.e. calling ifopen)

Smile