RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1667575 - grub2 on EFI platform with HTTP boot gives error messages when the URL uses a FQDN
Summary: grub2 on EFI platform with HTTP boot gives error messages when the URL uses a...
Keywords:
Status: CLOSED DUPLICATE of bug 1732765
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grub2
Version: 7.6
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Bootloader engineering team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-18 21:23 UTC by Ken Green
Modified: 2020-04-27 11:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-27 11:31:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
grub2-efi-x64-cdboot-2.02-0.82.el7.x86_64.rpm (1.11 MB, application/x-rpm)
2020-04-14 14:28 UTC, Javier Martinez Canillas
no flags Details

Description Ken Green 2019-01-18 21:23:08 UTC
Description of problem:

When installing on a system which uses UEFI and HTTP Boot instead of PXE grub2 gives a number of "error: unrecognised network address " errors when the boot URL uses a FQDN but still works. If the supplied boot URL uses the IP address instead then it works without giving the error messages.

When the system boots you get

>> Booting Embedded FlexibleLOM 1 Port 1 : HP FlexFabric 10Gb 2-port 536FLB Adapter - CNA - HP FlexFabric 10Gb 2-port 536FLB Adapter - NIC (HTTP(S) IPv4)

  Station IP address is 10.168.72.26

  URI: http://bootrh76.example.com/shimx64-redhat.efierror: unrecognised network address
`bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.

The >> Booting is coming from the firmware as I select the boot device.
You then get the URI which is immediately followed by an error without getting a newline. "bootrh76.example.com' is the FQDN.

and then the grub menu is displayed 

Once you select the install boot option you then get

error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.

Press any key to continue...

There appears to be a timeout on the "Press any key to continue..." as if you leave it for 15 to 20secs it then boots fine.

It is hard to be certain but I think the vmlinuz and initrd.img files are downloaded before the "Press any key to continue..." message is displayed.
Again if you supply an IP address instead of a name you don't get these messages.

I've also tested this using the version of grub2 supplied with SUSE12sp2 and I don't get these messages. I've also tried to test it with version supplied with the RHEL8 beta, but that gives errors like

error: ../../grub-core/net/efi/http.c:234:Fail to send a request! status=0x2
.

and doesn't work and doesn't attempt to talk to the HTTP server.


Version-Release number of selected component (if applicable):

RHEL7.6
[root@bl21 ~]# rpm -qa | grep -ie shim -e grub2-efi
shim-x64-15-1.el7.x86_64
grub2-efi-x64-2.02-0.76.el7.x86_64
grub2-efi-x64-modules-2.02-0.76.el7.noarch
[root@bl21 ~]#

How reproducible:

Totally

Steps to Reproduce:
1. Install shim-x64, grub2-efi-x64,  grub2-efi-x64-modules
2. Setup a suitable web server directory. Copy all the files from /boot/efi/EFI/redhat into your directory. Then copy the directory /usr/lib/grub/x86_64-efi into a sub-directory EFI/redhat of your web server directory. (I use serial consoles, it's very difficult to catch the error messages from a graphic screen, and so grub2 needs the modules. 

On my test system the web server files are under /var/ftp (don't ask). 
mkdir /var/ftp/bootrh76
cd /var/ftp/bootrh76
mkdir -p EFI/redhat

then from the system with RHEL7.6
[root@bl21 ~]# yum install grub2-efi grub2-efi-x64-modules shim-x64
[root@bl21 ~]# scp -r /boot/efi/EFI/redhat/* bl24:/var/ftp/bootrh76
[root@bl21 ~]# scp -r /usr/lib/grub/x86_64-efi bl24:/var/ftp/bootrh76/EFI/redhat



3. Edit /etc/httpd/conf/httpd.conf and enable KeepAlive as the UEFI HTTP Boot functionality needs this.

4. I set things up with a virtual host in Apache

[root@b24 bootrh76]# cat /etc/httpd/conf.d/bootrh76.conf
# bootrh76

<VirtualHost *:80>
    ServerName          bootrh76.example.com
    DocumentRoot        /var/ftp/bootrh76
    Alias       /EFI            "/var/ftp/bootrh76/EFI"
    Alias       /linux-install  "/var/ftp/bootrh76/linux-install"

</VirtualHost>

<Directory "/var/ftp/bootrh76">
    AllowOverride None
    Options Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

5. Restart Apache
[root@b24 bootrh76]# apachectl restart

6. Make sure you've got a DNS entry pointing your name to your IP address

bootrh76        IN      A       10.168.72.24

7. Setup your DHCP server

Make sure you've got architecture-type defined

option architecture-type code 93 = unsigned integer 16;

class "httpclient" {
    match if substring(option vendor-class-identifier,0,10) = "HTTPClient" ;
    option vendor-class-identifier     "HTTPClient";
    option routers                     10.168.72.24;
    if option architecture-type = 00:10 {
       filename "http://bootrh76.example.com/shimx64-redhat.efi";
    }
}

It doesn't affect things whether you use a shim.efi or go straight to grub2.efi.
Setting the option "vendor-class-identifier" is necessary UEFI ignores DHCP response that don't have it set.
Setting the option for the router is another bug and I'll log that one tomorrow, but if you use a hostname in the URL it won't work unless the DHCP server supplies a router even though it isn't going to talk to it. Again works fine if the URL uses the IP address.

8.  Setup a grub.cfg file, I use a mildly modified one from the install media.

[root@b24 bootrh76]# cat grub.cfg
set default="0"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

serial --unit=0 --speed=115200
terminal_input serial
terminal_output serial


set timeout=60
### END /etc/grub.d/00_header ###

# search --no-floppy --set=root -l 'RHEL-7.6 Server.x86_64'

### BEGIN /etc/grub.d/10_linux ###

menuentry 'Install Red Hat Enterprise Linux 7.6 from bl24' --class fedora --class gnu-linux --class gnu --class os {
        linuxefi /linux-install/rhel76x86_64/vmlinuz inst.repo=ftp://bl24/rhel76x86_64 console=ttyS0,115200 inst.vnc inst.vncpassword=install ip=eno2:dhcp
        initrdefi /linux-install/rhel76x86_64/initrd.img
}

submenu 'Troubleshooting -->' {
        menuentry 'Install Red Hat Enterprise Linux 7.6 basic terminal mode' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/rhel76x86_64/vmlinuz inst.repo=ftp://bl24/rhel76x86_64 console=ttyS0
                initrdefi /images/rhel76x86_64/initrd.img
        }
        menuentry 'Rescue a Red Hat Enterprise Linux system' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/rhel76x86_64/vmlinuz inst.repo=ftp://bl24/rhel76x86_64 console=ttyS0 rescue
                initrdefi /images/rhel76x86_64/initrd.img
        }
}

9. Make sure the vmlinuz and initrd files are available in the linux-install/rhel76x86_64/ sub-directory of your web server.


Actual results:

Should boot the install version of the grub2, give you the install menu and let you boot the system.
It does this as expected when using an IP address (well IPv4, I've not tried v6).
Instead you get the error messages

  URI: http://bootrh76.example.com/shimx64-redhat.efierror: unrecognised network address
`bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.

Then the normal menu stuff, followed by

error: unrecognised network address `bootrh76.example.com'.
error: unrecognised network address `bootrh76.example.com'.

Press any key to continue...

then it times out and boots OK





Expected results:

None of the error messages listed above.


Additional info:

The test UEFI HTTP node I was using was (from lshw)
    description: Blade
    product: ProLiant BL460c Gen10 (863442-B21)
    vendor: HPE
With the firmware being
          version: I41
          date: 06/20/2018

Comment 2 Javier Martinez Canillas 2020-04-14 14:27:30 UTC
This issue seems to be the same than one of the bugs reported in Bug #1732765.

I'll attach grub2-efi-x64-cdboot-2.02-0.82.el7.x86_64.rpm that's the latest build containing the fixes for that bug. Please test if the GRUB gcdx64.efi binary in that rpm works for you.

Comment 3 Javier Martinez Canillas 2020-04-14 14:28:09 UTC
Created attachment 1678689 [details]
grub2-efi-x64-cdboot-2.02-0.82.el7.x86_64.rpm

Comment 4 Ken Green 2020-04-19 17:57:31 UTC
Hopefully I'll have access to the system which using HTTP Boot again in a week or so's time and I'll test it then, thanks

Comment 5 Javier Martinez Canillas 2020-04-27 11:31:39 UTC
I'm closing this bz as duplicate of #1732765 since I believe this is already covered by one of the fixes for that bug.

If the issue still happens with the latest build, please feel free to re-open it.

*** This bug has been marked as a duplicate of bug 1732765 ***


Note You need to log in before you can comment on or make changes to this bug.