Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
A bug in the GRUB2 boot loader caused a trailing "-" character to be added to the client MAC address when attempting to load configuration files from a tftp server during PXE boot. This update fixes the bug, and clients can now load their GRUB2 configuration files from tftp servers successfully.
Description of problem:
I configured a PXE server for 64-bit ARM clients, and the clients were failing to find their config files on the tftp server and just getting dropped to the "grub>" prompt. I watched the network packets with Wireshark and noticed that there is an extra trailing "-" after the MAC address in the config filename:
Read Request, File: /pxegrub/grub.cfg-01-00-01-73-02-02-ea-
Read Request, File: /pxegrub/grub.cfg-0A0CD3F7
Read Request, File: /pxegrub/grub.cfg-0A0CD3F
Read Request, File: /pxegrub/grub.cfg-0A0CD3
Read Request, File: /pxegrub/grub.cfg-0A0CD
Read Request, File: /pxegrub/grub.cfg-0A0C
Read Request, File: /pxegrub/grub.cfg-0A0
Read Request, File: /pxegrub/grub.cfg-0A
Read Request, File: /pxegrub/grub.cfg-0
Read Request, File: /pxegrub/grub.cfg
Please remove the trailing "-" character from the first tftp request.
Version-Release number of selected component (if applicable):
grub2-efi-aa64-2.02-0.64.el7.aarch64.rpm
How reproducible:
always
Steps to Reproduce:
1. PXE boot a 64-bit ARM system
2. on the PXE server, watch the packets:
tshark -w tftp.pcap -i eth0 udp port 69
Actual results:
first tftp request appends a "-" char after the MAC address and the system fails to find its grub config file
Expected results:
no trailing "-"
Additional info:
The problem was introduced in 0002-Add-support-for-non-Ethernet-network-cards.patch which added support for longer hw addresses.
This change:
+-#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof ("XX:XX:XX:XX:XX:XX"))
++#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof (\
++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
++ "XX:XX:XX:XX:XX:XX:XX:XX"))
The way hwadd to str is done:
for (ptr = str, i = 0; i < addr->len; i++)
{
ptr += grub_snprintf (ptr, GRUB_NET_MAX_STR_HWADDR_LEN - (ptr - str),
"%02x:", addr->mac[i] & 0xff);
}
GRUB_NET_MAX_STR_HWADDR_LEN was preventing a ':' at the end of the string for ethernet. But now with bigger GRUB_NET_MAX_STR_HWADDR_LEN, ethernet addresses end up with the ':' at the end.
Then the ':'s in the string are converted to '-' for the net confile name and we end up with the extra '-'.
Description of problem: I configured a PXE server for 64-bit ARM clients, and the clients were failing to find their config files on the tftp server and just getting dropped to the "grub>" prompt. I watched the network packets with Wireshark and noticed that there is an extra trailing "-" after the MAC address in the config filename: Read Request, File: /pxegrub/grub.cfg-01-00-01-73-02-02-ea- Read Request, File: /pxegrub/grub.cfg-0A0CD3F7 Read Request, File: /pxegrub/grub.cfg-0A0CD3F Read Request, File: /pxegrub/grub.cfg-0A0CD3 Read Request, File: /pxegrub/grub.cfg-0A0CD Read Request, File: /pxegrub/grub.cfg-0A0C Read Request, File: /pxegrub/grub.cfg-0A0 Read Request, File: /pxegrub/grub.cfg-0A Read Request, File: /pxegrub/grub.cfg-0 Read Request, File: /pxegrub/grub.cfg Please remove the trailing "-" character from the first tftp request. Version-Release number of selected component (if applicable): grub2-efi-aa64-2.02-0.64.el7.aarch64.rpm How reproducible: always Steps to Reproduce: 1. PXE boot a 64-bit ARM system 2. on the PXE server, watch the packets: tshark -w tftp.pcap -i eth0 udp port 69 Actual results: first tftp request appends a "-" char after the MAC address and the system fails to find its grub config file Expected results: no trailing "-" Additional info: