All of lore.kernel.org
 help / color / mirror / Atom feed
* Grub2 EFI: compatibility with wimboot
@ 2018-06-05 18:25 jame88fane
  2018-06-15 12:07 ` Daniel Kiper
  0 siblings, 1 reply; 10+ messages in thread
From: jame88fane @ 2018-06-05 18:25 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

Hello,

I wanted to ask if it would be possible to make the compatibility with
wimboot in Grub2 EFI? currently only legacy works.

http://ipxe.org/wimboot

 

that would be really nice.


[-- Attachment #2: Type: text/html, Size: 2051 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Grub2 EFI: compatibility with wimboot
  2018-06-05 18:25 Grub2 EFI: compatibility with wimboot jame88fane
@ 2018-06-15 12:07 ` Daniel Kiper
  2018-06-15 17:14   ` AW: " jame88fane
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kiper @ 2018-06-15 12:07 UTC (permalink / raw)
  To: jame88fane; +Cc: grub-devel

Hi,

On Tue, Jun 05, 2018 at 08:25:53PM +0200, jame88fane@gmx.de wrote:
> Hello,
>
> I wanted to ask if it would be possible to make the compatibility with
> wimboot in Grub2 EFI? currently only legacy works.
>
> http://ipxe.org/wimboot
>
> that would be really nice.

We are happy to help but first of all we need more info
about your legacy BIOS and UEFI usage. Could you send us
your config files, error messages, etc.?

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* AW: Grub2 EFI: compatibility with wimboot
  2018-06-15 12:07 ` Daniel Kiper
@ 2018-06-15 17:14   ` jame88fane
  2018-06-20 10:41     ` Daniel Kiper
  0 siblings, 1 reply; 10+ messages in thread
From: jame88fane @ 2018-06-15 17:14 UTC (permalink / raw)
  To: 'Daniel Kiper'; +Cc: grub-devel

Okay,
wimboot works in Grub2 Legacy for example:

# Successfully boots
menuentry "Windows 7" {
	set ISOpath="/img/windows_7.iso"
	loopback loop $ ISOpath
	linux16 /boot/wimboot/wimboot
	initrd16 \
		newc:bootmgr:(loop)/bootmgr \
		newc:bcd:(loop)/boot/bcd \
		newc:boot.sdi:(loop)/boot/boot.sdi \
		newc:boot.wim:(loop)/sources/boot.wim
}

Because I can not use linux16 in Grub2 EFI, I use only linux but this
creates a blackscreen (with the chaining it does not work either).

I also asked the developers of wimboot they said grub2 could not load EFI
binarys directly.
So I ask, is that the case?

P.S.
I found this maybe this helps:
https://superuser.com/questions/1093986/boot-with-wimboot-a-windows-x64-imag
e-on-uefi-32-bits

-----Ursprüngliche Nachricht-----
Von: Daniel Kiper <dkiper@net-space.pl> 
Gesendet: Freitag, 15. Juni 2018 14:08
An: jame88fane@gmx.de
Cc: grub-devel@gnu.org
Betreff: Re: Grub2 EFI: compatibility with wimboot

Hi,

On Tue, Jun 05, 2018 at 08:25:53PM +0200, jame88fane@gmx.de wrote:
> Hello,
>
> I wanted to ask if it would be possible to make the compatibility with 
> wimboot in Grub2 EFI? currently only legacy works.
>
> http://ipxe.org/wimboot
>
> that would be really nice.

We are happy to help but first of all we need more info about your legacy
BIOS and UEFI usage. Could you send us your config files, error messages,
etc.?

Daniel



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Grub2 EFI: compatibility with wimboot
  2018-06-15 17:14   ` AW: " jame88fane
@ 2018-06-20 10:41     ` Daniel Kiper
  2018-06-20 15:27       ` AW: " jame88fane
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kiper @ 2018-06-20 10:41 UTC (permalink / raw)
  To: jame88fane; +Cc: 'Daniel Kiper', grub-devel

On Fri, Jun 15, 2018 at 07:14:29PM +0200, jame88fane@gmx.de wrote:
> Okay,
> wimboot works in Grub2 Legacy for example:
>
> # Successfully boots
> menuentry "Windows 7" {
> 	set ISOpath="/img/windows_7.iso"
> 	loopback loop $ ISOpath
> 	linux16 /boot/wimboot/wimboot
> 	initrd16 \
> 		newc:bootmgr:(loop)/bootmgr \
> 		newc:bcd:(loop)/boot/bcd \
> 		newc:boot.sdi:(loop)/boot/boot.sdi \
> 		newc:boot.wim:(loop)/sources/boot.wim
> }
>
> Because I can not use linux16 in Grub2 EFI, I use only linux but this
> creates a blackscreen (with the chaining it does not work either).
>
> I also asked the developers of wimboot they said grub2 could not load EFI
> binarys directly.
> So I ask, is that the case?
>
> P.S.
> I found this maybe this helps:
> https://superuser.com/questions/1093986/boot-with-wimboot-a-windows-x64-imag
> e-on-uefi-32-bits

Wait, are you trying to run Windows UEFI x64 on UEFI x32 (to be precise
ia32) platform? It seems to me that such configs are not supported.
Additionally, paths above show that you are trying to use legacy
BIOS stuff. It will not run on UEFI platforms. I think that you
should use more or less something like that (+/- /amd64 part):
  - /amd64/boot/boot.sdi,
  - /amd64/efi/microsoft/boot/bcd,
  - /amd64/efi/boot/bootx64.efi
  - /amd64/winpe.wim.

So, more or less there is a chance that the issue is not related to GRUB2.

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* AW: Grub2 EFI: compatibility with wimboot
  2018-06-20 10:41     ` Daniel Kiper
@ 2018-06-20 15:27       ` jame88fane
  2018-06-20 17:39         ` Re.: " fernandogaifen
  2018-06-21 14:39         ` Daniel Kiper
  0 siblings, 2 replies; 10+ messages in thread
From: jame88fane @ 2018-06-20 15:27 UTC (permalink / raw)
  To: 'Daniel Kiper'; +Cc: grub-devel

No it is windows UEFI 64bit on a UEFI 64bit platform
it doesn't matter anyway because even if I try to boot only Wimboot EFI from
Grub2 EFI without parameters I also get a blackscreen.

I mean:

menuentry "Windows 7" {
linux /boot/wimboot/wimboot
 }

I can't get linux16 to work in EFI, can I?

-----Ursprüngliche Nachricht-----
Von: Daniel Kiper <dkiper@net-space.pl> 
Gesendet: Mittwoch, 20. Juni 2018 12:42
An: jame88fane@gmx.de
Cc: 'Daniel Kiper' <dkiper@net-space.pl>; grub-devel@gnu.org
Betreff: Re: Grub2 EFI: compatibility with wimboot

On Fri, Jun 15, 2018 at 07:14:29PM +0200, jame88fane@gmx.de wrote:
> Okay,
> wimboot works in Grub2 Legacy for example:
>
> # Successfully boots
> menuentry "Windows 7" {
> 	set ISOpath="/img/windows_7.iso"
> 	loopback loop $ ISOpath
> 	linux16 /boot/wimboot/wimboot
> 	initrd16 \
> 		newc:bootmgr:(loop)/bootmgr \
> 		newc:bcd:(loop)/boot/bcd \
> 		newc:boot.sdi:(loop)/boot/boot.sdi \
> 		newc:boot.wim:(loop)/sources/boot.wim
> }
>
> Because I can not use linux16 in Grub2 EFI, I use only linux but this 
> creates a blackscreen (with the chaining it does not work either).
>
> I also asked the developers of wimboot they said grub2 could not load 
> EFI binarys directly.
> So I ask, is that the case?
>
> P.S.
> I found this maybe this helps:
> https://superuser.com/questions/1093986/boot-with-wimboot-a-windows-x6
> 4-imag
> e-on-uefi-32-bits

Wait, are you trying to run Windows UEFI x64 on UEFI x32 (to be precise
ia32) platform? It seems to me that such configs are not supported.
Additionally, paths above show that you are trying to use legacy BIOS stuff.
It will not run on UEFI platforms. I think that you should use more or less
something like that (+/- /amd64 part):
  - /amd64/boot/boot.sdi,
  - /amd64/efi/microsoft/boot/bcd,
  - /amd64/efi/boot/bootx64.efi
  - /amd64/winpe.wim.

So, more or less there is a chance that the issue is not related to GRUB2.

Daniel



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re.: Grub2 EFI: compatibility with wimboot
  2018-06-20 15:27       ` AW: " jame88fane
@ 2018-06-20 17:39         ` fernandogaifen
  2018-06-21 14:39         ` Daniel Kiper
  1 sibling, 0 replies; 10+ messages in thread
From: fernandogaifen @ 2018-06-20 17:39 UTC (permalink / raw)
  To: The development of GNU GRUB, 'Daniel Kiper'

[-- Attachment #1: Type: text/html, Size: 2740 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Grub2 EFI: compatibility with wimboot
  2018-06-20 15:27       ` AW: " jame88fane
  2018-06-20 17:39         ` Re.: " fernandogaifen
@ 2018-06-21 14:39         ` Daniel Kiper
  2018-06-21 16:34           ` AW: " jame88fane
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Kiper @ 2018-06-21 14:39 UTC (permalink / raw)
  To: jame88fane; +Cc: 'Daniel Kiper', grub-devel

On Wed, Jun 20, 2018 at 05:27:23PM +0200, jame88fane@gmx.de wrote:
> No it is windows UEFI 64bit on a UEFI 64bit platform

Great!

> it doesn't matter anyway because even if I try to boot only Wimboot EFI from
> Grub2 EFI without parameters I also get a blackscreen.
>
> I mean:
>
> menuentry "Windows 7" {
> linux /boot/wimboot/wimboot
>  }
>
> I can't get linux16 to work in EFI, can I?

As I can see this command is enabled on UEFI x64 platforms. However,
there is a pretty good chance that it does not work and probably it
should be disabled in the future on UEFI compatible platforms. Anyway,
I have managed to boot Windows using wimboot with chainloader. It
required some experiments and wimboot code reading.

First of all you have to have an EFI System Partition (ESP) on a disk
(probably other FAT formated partitions will work too; however, I have
not tested that). Then you have to copy wimboot, bcd, boot.sdi and
boot.wim to the ESP root directory. Please use UEFI x64 binaries. After
that boot GRUB and execute following commands from its command line:

  set root=(hd0,1) # This have to be an ESP.
  chainloader /wimboot rawbcd rawwim
  boot

By the way, wimboot command line processing is very crude. It is sad
that it does not accept paths to required files. I hope that it will
be fixed at some point.

There is also another option. Copy follwing files to an ESP:
  - /amd64/efi/boot/bootx64.efi -> ESP:/efi/microsoft/boot/bootx64.efi
    (do not use /amd64/bootmgr.efi; it is designated for ISO images;
    it will not work; additionally, destination does no matter in this
    case; directory and file name can be arbitrary one),
  - /amd64/boot/boot.sdi -> ESP:/boot/boot.sdi
  - /amd64/efi/microsoft/boot/bcd -> ESP:/efi/microsoft/boot/bcd
  - /amd64/winpe.wim -> ESP:/sources/boot.wim

After that boot GRUB and execute follwing commands from its
command line:

  set root=(hd0,1) # This have to be an ESP.
  chainloader /efi/microsoft/boot/bootx64.efi
  boot

You are done! Have a fun!

WRT GRUB linux command. I think that there is a bug or lack of support
in GRUB and/or wimboot for something. Probably this is small thing.
Sadly I do not have time to investigate it further. If somebody would
like to take a look at the issue and prepare the patches then I am happy
to review them.

FYI, I have tested that with GRUB upstream.

By the way, I think that it is worth putting this doc at iPXE webpage
and/or GRUB doc. Any volunteers?

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* AW: Grub2 EFI: compatibility with wimboot
  2018-06-21 14:39         ` Daniel Kiper
@ 2018-06-21 16:34           ` jame88fane
  2018-06-23 18:16             ` Daniel Kiper
  0 siblings, 1 reply; 10+ messages in thread
From: jame88fane @ 2018-06-21 16:34 UTC (permalink / raw)
  To: 'Daniel Kiper'; +Cc: grub-devel

Hello,
the problem is that with this method you can only load a wim file.
I have several windows ISOs that should boot separately.
Of course it would be really nice if you could load wimboot EFI with
parameters directly via grub2 EFI.

So with menutrys

P.S.
The combination of shim, grub2 EFI and wimboot EFI with the command:
chainloader /wimboot rawbcd rawwim
leads to an error: "Could not install security protocol: (0x2) Invalid
Parameter".


Jame

-----Ursprüngliche Nachricht-----
Von: Daniel Kiper <dkiper@net-space.pl> 
Gesendet: Donnerstag, 21. Juni 2018 16:39
An: jame88fane@gmx.de
Cc: 'Daniel Kiper' <dkiper@net-space.pl>; grub-devel@gnu.org
Betreff: Re: Grub2 EFI: compatibility with wimboot

On Wed, Jun 20, 2018 at 05:27:23PM +0200, jame88fane@gmx.de wrote:
> No it is windows UEFI 64bit on a UEFI 64bit platform

Great!

> it doesn't matter anyway because even if I try to boot only Wimboot 
> EFI from
> Grub2 EFI without parameters I also get a blackscreen.
>
> I mean:
>
> menuentry "Windows 7" {
> linux /boot/wimboot/wimboot
>  }
>
> I can't get linux16 to work in EFI, can I?

As I can see this command is enabled on UEFI x64 platforms. However, there
is a pretty good chance that it does not work and probably it should be
disabled in the future on UEFI compatible platforms. Anyway, I have managed
to boot Windows using wimboot with chainloader. It required some experiments
and wimboot code reading.

First of all you have to have an EFI System Partition (ESP) on a disk
(probably other FAT formated partitions will work too; however, I have not
tested that). Then you have to copy wimboot, bcd, boot.sdi and boot.wim to
the ESP root directory. Please use UEFI x64 binaries. After that boot GRUB
and execute following commands from its command line:

  set root=(hd0,1) # This have to be an ESP.
  chainloader /wimboot rawbcd rawwim
  boot

By the way, wimboot command line processing is very crude. It is sad that it
does not accept paths to required files. I hope that it will be fixed at
some point.

There is also another option. Copy follwing files to an ESP:
  - /amd64/efi/boot/bootx64.efi -> ESP:/efi/microsoft/boot/bootx64.efi
    (do not use /amd64/bootmgr.efi; it is designated for ISO images;
    it will not work; additionally, destination does no matter in this
    case; directory and file name can be arbitrary one),
  - /amd64/boot/boot.sdi -> ESP:/boot/boot.sdi
  - /amd64/efi/microsoft/boot/bcd -> ESP:/efi/microsoft/boot/bcd
  - /amd64/winpe.wim -> ESP:/sources/boot.wim

After that boot GRUB and execute follwing commands from its command line:

  set root=(hd0,1) # This have to be an ESP.
  chainloader /efi/microsoft/boot/bootx64.efi
  boot

You are done! Have a fun!

WRT GRUB linux command. I think that there is a bug or lack of support in
GRUB and/or wimboot for something. Probably this is small thing.
Sadly I do not have time to investigate it further. If somebody would like
to take a look at the issue and prepare the patches then I am happy to
review them.

FYI, I have tested that with GRUB upstream.

By the way, I think that it is worth putting this doc at iPXE webpage and/or
GRUB doc. Any volunteers?

Daniel



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Grub2 EFI: compatibility with wimboot
  2018-06-21 16:34           ` AW: " jame88fane
@ 2018-06-23 18:16             ` Daniel Kiper
  2018-06-24 11:05               ` AW: " jame88fane
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kiper @ 2018-06-23 18:16 UTC (permalink / raw)
  To: jame88fane; +Cc: 'Daniel Kiper', grub-devel

On Thu, Jun 21, 2018 at 06:34:41PM +0200, jame88fane@gmx.de wrote:
> Hello,
> the problem is that with this method you can only load a wim file.
> I have several windows ISOs that should boot separately.
> Of course it would be really nice if you could load wimboot EFI with
> parameters directly via grub2 EFI.
>
> So with menutrys

So, I would suggest to take a look at GRUB2/wimboot code and try to
fix it. It should not require a lot of work. As I said earlier I am
happy to review the patches.

> P.S.
> The combination of shim, grub2 EFI and wimboot EFI with the command:
> chainloader /wimboot rawbcd rawwim
> leads to an error: "Could not install security protocol: (0x2) Invalid
> Parameter".

Do you use UEFI secure boot or something like that? Anyway, I would
play with rawbcd and rawwim arguments too.

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* AW: Grub2 EFI: compatibility with wimboot
  2018-06-23 18:16             ` Daniel Kiper
@ 2018-06-24 11:05               ` jame88fane
  0 siblings, 0 replies; 10+ messages in thread
From: jame88fane @ 2018-06-24 11:05 UTC (permalink / raw)
  To: 'Daniel Kiper'; +Cc: grub-devel



-----Ursprüngliche Nachricht-----
Von: Daniel Kiper <dkiper@net-space.pl> 
Gesendet: Samstag, 23. Juni 2018 20:17
An: jame88fane@gmx.de
Cc: 'Daniel Kiper' <dkiper@net-space.pl>; grub-devel@gnu.org
Betreff: Re: Grub2 EFI: compatibility with wimboot

On Thu, Jun 21, 2018 at 06:34:41PM +0200, jame88fane@gmx.de wrote:
> Hello,
> the problem is that with this method you can only load a wim file.
> I have several windows ISOs that should boot separately.
> Of course it would be really nice if you could load wimboot EFI with 
> parameters directly via grub2 EFI.
>
> So with menutrys

So, I would suggest to take a look at GRUB2/wimboot code and try to fix it.
It should not require a lot of work. As I said earlier I am happy to review
the patches.

Well, I hope someone here wants to do that.
Because my experience in programming is not enough, I guess.

Jame




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-24 11:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 18:25 Grub2 EFI: compatibility with wimboot jame88fane
2018-06-15 12:07 ` Daniel Kiper
2018-06-15 17:14   ` AW: " jame88fane
2018-06-20 10:41     ` Daniel Kiper
2018-06-20 15:27       ` AW: " jame88fane
2018-06-20 17:39         ` Re.: " fernandogaifen
2018-06-21 14:39         ` Daniel Kiper
2018-06-21 16:34           ` AW: " jame88fane
2018-06-23 18:16             ` Daniel Kiper
2018-06-24 11:05               ` AW: " jame88fane

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.