help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PXE, EFI, IPv6 and Grub2


From: Andrei Borzenkov
Subject: Re: PXE, EFI, IPv6 and Grub2
Date: Tue, 20 Sep 2016 17:24:49 +0300

On Tue, Sep 20, 2016 at 8:26 AM, Franck Martin <address@hidden> wrote:
> I'm trying to PXE boot over IPv6 and grub2
>
> I have this in my dhcpd6.conf
> option dhcp6.bootfile-url "tftp://[2620:0:0:1::245]/bootx64.efi";;
>
> The system boots, I can see the bootx64.efi is getting downloaded and 
> executed...
>
> It seems however grub2 is trying to access 38.32.0.0, which is the mangled 
> version of 2620:0.

grub2 does not support DHCPv6 and autoconfiguration of IPv6 on EFI
currently, so it tries to interpret DHCP package that firmware returns
as IPv4. There were patches to add this support, but they are a bit
extensive. You may try them (any additional testing is good).

> I'm not sure if this is a problem with the PXE firmware or with grub2 which 
> cannot understand that it got started over IPv6... with grub2 prompt I can 
> see that fw_path is mangled...

This could be result of misinterpretation of DHCPv6 packet content.

>
> So I went a bit further by creating my own bootx64.efi
> grub2-mkimage -o bootx64.efi -c efiboot.cfg -O x86_64-efi 
> --prefix="http,2620:0:0:1::245" `find /usr/lib/grub/x86_64-efi/*.mod | xargs 
> | sed -e 's/\.mod//g' | sed -e 's/\/usr\/lib\/grub\/x86_64-efi\///g'`

That's bad idea. I'd rather try grub2-mkstandalone to add all modules to image.

>
> using:
> $cat efiboot.cfg
> set timeout=5
> set prefix='(http,2620:0:0:1::245)'
> set root='(http,2620:0:0:1::245)'
> set pxe_default_server='2620:0:0:1::245'
> net_ipv6_autoconf

I would start with standalone image and try all this in CLI checking
result each time.

> linux /vmlinuz
> initrd /initrd.img
>
> I have swapped tftp and http and both seems to be have the same....
>
> I get an error that prefix is not set
> It also tells me that I need to set the kernel first...
> then I see it tries to access grub.cfg in the right location and also that it 
> downloads vmlinuz (progress bars are totally weird and useless)
>
> Then when I suspect it tries to boot the kernel, it complains about magic 
> number...

That probably means memory corruption.

>
> I'm not sure how I should create a default cfg file to use with bootx64.efi, 
> or just to place in the root of my tftp or http server for the system to boot.
>
> I would need also to pass some parameter to initrd.img and not sure how I can 
> do that within grub.cfg
>
> I use redhat7 with grub2.02-beta2
>

There were several fixes related to memory management in 2.02beta3.
Not sure which of them were backported.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]