Jump to content











Photo
- - - - -

grub UEFI + wimboot - error: kernel too old.


  • Please log in to reply
16 replies to this topic

#1 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 01 October 2016 - 12:19 PM

Hi there

I am keen to know if anyone could get wimboot + grub UEFI pxe boot working.

Heres my steps

download Fedora-Xfce-Live-x86_64-24-1.2.iso
extract \EFI\BOOT\
  - BOOTX64.EFI
  - grubx64.efi
  - grub.cfg

setup tftp to serve BOOTX64.EFI

Add entries in grub.cfg

menuentry 'wimboot 1' {
    linuxefi /boot/wimboot
}

menuentry 'wimboot 2' {
    linuxefi /boot/wimboot
    initrdefi \
        newc:bcd:/boot/boot/BCD \
        newc:boot.sdi:/boot/boot/boot.sdi \
        newc:boot.wim:/boot/boot.wim
}

After booting from UEFI pxe and selecting wimboot 1 or 2, there is an error message

error: kernel too old.
error: you need to load the kernel first.
Press any key to continue...

 

 



#2 Areeb

Areeb

    Member

  • Members
  • 38 posts
  • Location:Lahore
  •  
    Pakistan

Posted 03 October 2016 - 04:34 AM

Where is the Link to IPXE File in this case ?



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 October 2016 - 07:40 AM

Wimboot is seemingly not chainloadable in EFI mode :dubbio::
http://forum.ipxe.or...ad.php?tid=8112

 

:duff:

Wonko



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 08 July 2017 - 12:20 PM

I managed to UEFI-boot from grub2 using wimboot by using iPXE as follows:

 

1. Use a FAT32 partitioned disk (cannot be NTFS??) - I used a USB stick under VBox+VMUB (which will appear as a hard disk)

 

\ipxe.efi

\boot.ipxe

\wimboot

\win\bcd

\win\boot.sdi

\win\boot.wim

 

2. Boot to grub2 via UEFI

 

3. run chainloader /ipxe.efi  and then type boot   - iPXE will run - press Ctrl-B

 

IMPORTANT: Wait for the SECOND Ctrl+B prompt before pressing Ctrl+B - if you press Ctrl+B on the first prompt the boot.ipxe script will give a 'Could not boot: No such device' error. This was driving me crazy because a few times wimboot would work but most times it wouldn't because I was using the first Ctrl+B break point! It took me hours to figure out why it was only occasionally working!

 

[Edit: adding ifopen to the boot.ipxe file fixes the issue of having to wait for the 2nd ctrl+B prompt! Apparently this process will only work if a NIC is present in the system]

 

4. type chain file:boot.ipxe

 

boot.ipxe contains:

#!ipxe
ifopen
cpuid --ext 29 && set arch amd64 || set arch x86
kernel file:/wimboot
initrd file:/win/bcd BCD
initrd file:/win/boot.sdi boot.sdi
initrd file:/win/boot.wim boot.wim
boot

I confirmed that WinPE was running in UEFI-mode.

I am not sure it needs arch to be set, it seems to work without it.

 

I haven't investigated if it is possible to automate it further yet. Just thought I would share as I was so pleased to finally work out why it was so temperamental!


Edited by steve6375, 18 March 2019 - 12:55 PM.

  • SanBarn likes this

#5 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 08 July 2017 - 12:40 PM

An experimental download is attached.

Extract to a FAT32 USB drive.

Add a \win folder containing your  winpe bcd + boot.sdi + boot.wim files

 

You can add  gui pause after the wimboot filename to see what wimboot is loading and pause it before it boots.

kernel file:/wimboot gui pause

Continue discussion here

Attached Thumbnails

  • CaptureWimBoot.JPG

Attached Files


Edited by steve6375, 08 July 2017 - 12:49 PM.


#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 July 2017 - 12:41 PM

I managed to UEFI-boot from grub2 using wimboot by using iPXE as follows:

...

I haven't investigated if it is possible to automate it further yet. Just thought I would share as I was so pleased to finally work out why it was so temperamental!

And probably you wanted to post these news here:

http://reboot.pro/to...-in-bootx64efi/

a recent thread instead of this old one.

 

Isn't the boot.ipxe a sort of "autoexec.bat" loaded automatically when ipxe is chainloaded?

 

:duff:

Wonko



#7 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 16 July 2017 - 06:49 AM

IMPORTANT: Wait for the SECOND Ctrl+B prompt before pressing Ctrl+B

ipxe iniialiszes the network card after first Ctrl+B.
There is ifopen to open the network interfaces http://ipxe.org/cmd/ifopen

A script can be embedded https://rom-o-matic.eu/
 
#!ipxe
ifopen
ifstat
kernel file:/wimboot pause
initrd file:/win/bcd BCD
initrd file:/win/boot.sdi boot.sdi
initrd file:/win/boot.wim boot.wim
imgstat
prompt
boot
.
grub.cfg
menuentry "script efi https://rom-o-matic.eu/" {
 chainloader /ipxe_rom_o_matic_script.efi
}
.
Yes, this boots a WinPE at UEFI-mode at VMware Player.
It's a debug version.
Read the messagges, ifstat should list a network connection.
Press two times enter.

Strange combination:
A network interface is used at local boot.
A network card is required for local boot.

How to to avoid the network card requirement?
Does ipxe require a network interface to mount boot.wim?

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 July 2017 - 09:59 AM

Usal semi-random thoughts. :w00t: :ph34r:
 
 

#!ipxe
ifopen
ifstat
ifclose
kernel file:/wimboot pause
...

What happens?

 

Or is there some kind of "virtual" network interface (to work as a "pass-through" somewhat similar to a "mountpoint") to be used in the booting?  :unsure:

 

:duff:

Wonko



#9 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 16 July 2017 - 10:32 AM

With ifclose added: this gives the 'Could not boot: No such device' error.
The network interface is used at boot.
Well, ipxe is first about network booting.

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 July 2017 - 12:22 PM

With ifclose added: this gives the 'Could not boot: No such device' error.
The network interface is used at boot.
Well, ipxe is first about network booting.

Hmmm, it makes sense, of course  :thumbup: 

 

Quickly checking the 

https://rom-o-matic.eu/

once chosen EFI PXE bootstrap (64 bit) (which I believe it is what we are talking about) and chosen "advanced" there are a number of (pre-set) options/modules and a number of unset ones.

Maybe the matter is about building a specific EFI file?

Settings *like* "DOWNLOAD_PROTO_FILE, Local filesystem access" and/or "Image types:" and/or (possibly) contents of the various "Command-line commands to include:" might offer something of use (or maybe not). :dubbio:

Particularly the:

"DOWNLOAD_PROTO_FILE, Local filesystem access"

which is "commented out" here:

https://github.com/i...onfig/general.h

Maybe it is something "in progress"?

 

 

:duff:

Wonko



#11 memoarfaa

memoarfaa

    Member

  • Members
  • 82 posts
  •  
    Egypt

Posted 24 July 2017 - 10:25 AM

I see that the best solution is trying to add "efi-stub" to wimboot Programmatically

grub2  linuxefi & initrdefi command Require "efi-stub"

 

https://www.kernel.o...on/efi-stub.txt

 

https://github.com/S...rnel/efi-stub.c



#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 24 July 2017 - 11:20 AM

I see that the best solution is trying to add "efi-stub" to wimboot Programmatically
grub2  linuxefi & initrdefi command Require "efi-stub"
 
https://www.kernel.o...on/efi-stub.txt
 
https://github.com/S...rnel/efi-stub.c

How is this related to booting a (windows) .wim via ipxe wimboot? :dubbio:

:duff:
Wonko

#13 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 01 August 2017 - 09:56 AM

The reason why I want grub2 efi is because it is a signed EFI, eg works with secureboot :thumbsup: 

 

iPXE + wimboot is easy, but does not support secure boot. :blowup:



#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 August 2017 - 10:13 AM

The reason why I want grub2 efi is because it is a signed EFI, eg works with secureboot :thumbsup: 
 
iPXE + wimboot is easy, but does not support secure boot. :blowup:


But you asked about it, originally:


Hi there

I am keen to know if anyone could get wimboot + grub UEFI pxe boot working.


It seems like Steve6375 and cdob answered to THAT question just fine. :dubbio:

:duff:
Wonko

#15 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 01 August 2017 - 10:53 AM

Hi wonko, steve etc thanks for your reply.

I should have clarified that more clearly in the OP, my bad sorry.

Using iPXE.efi as an intermediate step will defeat the purpose of this exercise which is to make wimboot work over EFI network boot with secure boot.

 

If we use ipxe.efi in the booting stage it will fail on a secure boot system, it is not signed unfortunately, as microsoft want our money.


Edited by ndog37, 01 August 2017 - 11:12 AM.


#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 August 2017 - 03:27 PM

Yep, maybe, rather than signing the ipxe.efi one could use something *like* shim.efi or preloader.efi:

http://www.rodsbooks...secureboot.html

http://www.rodsbooks...ml#using_signed

 

But really no idea if possible at all. :dubbio:

 

On the other hand, using your own keys might be possible:

http://www.rodsbooks...rolling-sb.html

though defintiely not for the faint of heart :ph34r:

 

:duff:

Wonko



#17 nogera

nogera
  • Members
  • 2 posts
  •  
    Canada

Posted 09 May 2020 - 03:18 PM

Hi,

 

I'm chainloading from grub2 to ipxe but the interface disappears everytime after the chainload. 

 

chainloader /ipxe.efi

boot

iPXE initialising devices...  (it's just stuck there)

 

chainloader /snponly.efi

boot

no more network device

 

I checked the interface in grub before the chainloader to make sure it works. i also tried to chainload grub2 with grub2 to test if it was an issue with ipxe but same results, no interface after chainloading. 

 

Anyone know what I'm doing wrong?






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users