Bug 1732765

Summary: UEFI HTTP boot over IPv6 does not work
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Zapletal <lzap>
Component: grub2Assignee: Javier Martinez Canillas <fmartine>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: fmartine, jstodola, jwboyer, Ken.Green, lmiksik, pjanda, rstrode, tbowling
Target Milestone: rcKeywords: TestCaseNeeded
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.02-0.82.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-29 19:34:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Libvirt VM screenshot none

Description Lukas Zapletal 2019-07-24 10:07:22 UTC
Hello,

I am trying to configure UEFI HTTP Boot over IPv6 with Grub2. Here is my dhcp config:

option dhcp6.bootfile-url code 59 = string;
option dhcp6.vendor-class code 16 = {integer 32, integer 16, string};

subnet6 2001:db8:f00f:cafe::/64 {
 range6 2001:db8:f00f:cafe::42:10 2001:db8:f00f:cafe::42:99;
 option dhcp6.bootfile-url "http://[2001:db8:f00f:cafe::1]/httpboot/grub2/grubx64.efi";
 option dhcp6.name-servers 2001:db8:f00f:cafe::1;
 option dhcp6.vendor-class 0 10 "HTTPClient";
}

Grub2 loads fine, loads configuration which is:

set default=0
set timeout=10
menuentry 'Kickstart default PXEGrub2' {
  linuxefi boot/centos-local-proxy-NpAPvFVIy69k-vmlinuz ks=http://sat66.nat.lan/unattended/provision?token=d716ee59-fabf-40f6-8b21-9a6a14c47c2e  network ksdevice=bootif ks.device=bootif BOOTIF=00-00-c0-3a-d1-01-8f kssendmac ks.sendmac inst.ks.sendmac BOOTIF=01-$net_default_mac
  initrdefi boot/centos-local-proxy-NpAPvFVIy69k-initrd.img
}

However after the timeout there is a network error. Depending on bootfile-url it's different:

For http://[2001:db8:f00f:cafe::1] I get: unrecognised network address '2001:db8:f00f:cafe::1', unsupported uefi http status code 0x11, fail to receive a reponse! status=104

For http://ipv6_only_hostname I get: unrecognised network address 'ipv6_only_hostname'

Is IPv6 supported in this scenario? Thanks.

Comment 2 Lukas Zapletal 2020-01-28 13:38:21 UTC
With most recent grub2-2.02-0.80.el7 I only get "unrecognised network address" error. Looks like there is a message "Press any key to continue..." and after a short delay the system boots up. I made a photo of this.

Not sure if this is relevant, but *randomly* grub2 also fails to load the file with "invalid magic number". This happens on LAN and this is HTTP Boot so unlikely a TFTP packet drop. Attaching too.

Comment 3 Lukas Zapletal 2020-02-26 09:56:58 UTC
Created attachment 1665899 [details]
Libvirt VM screenshot

Comment 4 Javier Martinez Canillas 2020-03-07 10:59:50 UTC
I was able to reproduce this issue and the problem was that GRUB was not enclosing the literal IPv6 address in square brackets when writing the Host field of the HTTP request header.

Comment 9 Petr Janda 2020-03-25 11:50:23 UTC
Reproduced on RHEL-7.8-20200225.1 x86_64 Server

Comment 14 Javier Martinez Canillas 2020-04-27 11:31:39 UTC
*** Bug 1667575 has been marked as a duplicate of this bug. ***

Comment 15 Jan Stodola 2020-07-01 14:58:41 UTC
Reproduced using RHEL-7.8
Verified using RHEL-7.9-20200623.0 with grub2-2.02-0.82.el7, both IPv6 and hostname cases work fine now.

Moving to VERIFIED.

Comment 19 errata-xmlrpc 2020-07-29 19:34:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3217