This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 1857410 - [RFE] grub2 support for vlans on x86_64
Summary: [RFE] grub2 support for vlans on x86_64
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: grub2
Version: 8.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Bootloader engineering team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 2150901
TreeView+ depends on / blocked
 
Reported: 2020-07-15 19:42 UTC by Dusty Mabe
Modified: 2023-09-16 14:03 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2150901 (view as bug list)
Environment:
Last Closed: 2023-09-16 14:03:09 UTC
Type: Story
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-4315 0 None Migrated None 2023-09-16 14:03:03 UTC

Description Dusty Mabe 2020-07-15 19:42:05 UTC
Description of problem:

We have customers that are trying to use PXE in a UEFI environment (i,e. grub) on vlan tagged networks. They are able to configure (via their UEFI interactive menu) the hardware to use vlan tags for PXE requests, but grub is not adding a vlan tag to the request for the grub.cfg.

After talking with several grub maintainers this feature only currently exists in grub2 for the ppc64le platform (with OpenFirmware). This is a request for this feature on x86_64 platform (and perhaps other platforms if it makes sense and is possible).

I just recently learned that you can test this in libvirt (virt-install --boot uefi) by navigating in the menu to:

   Device Manager
     Network Device List
       MAC:...
         VLAN Configuration
           Enter Configuration Menu

In my experience this requires Fedora 32 or newer.


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

grub2-efi-x64-2.02-81.el8.x86_64

Comment 2 Dusty Mabe 2020-07-15 19:43:22 UTC
Link to the BZ where this missing feature was reported as a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1842887

Comment 4 Frederic Giloux 2020-07-16 06:12:44 UTC
When implemented this will need to be validated with RHCOS as well so that it can be leveraged for OpenShift installations.

Comment 12 Guido Aulisi 2022-11-21 10:30:40 UTC
Hi,

recent GRUB from git://git.savannah.gnu.org/grub.git contains patches to read and use VLAN tag automatically.
I was able to boot in a tagged VLAN using this recent version of grub.
If needed I will post all steps needed to boot anaconda installer.

Comment 13 Marta Lewandowska 2022-11-21 13:06:06 UTC
Hi Guido,
yes, please do post all the steps here. That should accelerate (!) things.

Comment 14 Guido Aulisi 2022-11-21 13:33:20 UTC
First of all some configurations are hard coded to simplify and speed up things.
All was done on a Fedora 36 laptopo with gcc, make installed. Sorry I cannot
list all packages required to build grub, because everything was already installed.

This is what I did:

Clone from git://git.savannah.gnu.org/grub.git
Bootstrap grub: ./bootstrap
Configure grub: ./configure --prefix=/usr --sysconfdir=/etc --with-platform=efi --target=x86_64
Build: make -j2
Install in some temporary directory: export DESTDIR=/tmp/grub && make install

Now we should have a working grub installed in /tmp/grub

Build a grub image: this step has some configuration hard coded, sorry:
cd /tmp/grub
usr/bin/grub-mkimage --compress xz --disable-shim-lock -d /tmp/grub/usr/lib64/grub/x86_64-efi -o grubx64.efi -O x86_64-efi -p '(tftp)/grub' efinet serial tftp part_gpt configfile normal

This step hardcodes the prefix, that is the path grub uses to get grub.cfg

Now we have to copy things to our tftp server:
copy grubx64.efi to the root of tftp server
copy all grub modules from /tmp/grub/usr/lib64/grub/x86_64-efi to
<tftproot>/grub/x86_64-efi
I think only .mod files are really needed, but I copied all files.

Put grub.cfg in <tftproot>/grub

This was my grub.cfg:

insmod efi_gop
insmod efi_uga
insmod linux
insmod reboot

serial --speed=115200
terminal_input serial
terminal_output serial

set root=(tftp,172.22.129.141)

echo 'Loading kernel...'
linux rhel8.7/vmlinuz console=ttyS0,115200n8 vlan=vlan3457:eno1 ip=eno1:dhcp rd.luks=0 rd.md=0 rd.dm=0 rd.multipath=0 inst.repo=http://172.22.129.141/rhel8.7/ inst.ks=http://172.22.129.141/rhel8.7/ks.cfg inst.headless quiet
echo 'Loading ramdisk...'
initrd rhel8.7/initrd.img

I'm using a serial console here.

At the grub prompt run boot (this can be done from grub.cfg, but I want to launch manually)

That's all, I hope it works for you.

My machine was a dell R740xd

P.S. I did not sign the boorloader, so this does not work with secureboot, you have to disable it

Comment 16 Renaud Métrich 2023-08-09 08:37:18 UTC
There is a patchset Upstream:

https://lists.gnu.org/archive/html/grub-devel/2022-03/msg00193.html

Comment 17 Simone Caronni 2023-08-10 12:09:21 UTC
Grub 2.12-rc1 has been released with VLAN support (commands, network and reading the VLAN from the UEFI path).

Comment 18 RHEL Program Management 2023-09-16 13:23:31 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 19 RHEL Program Management 2023-09-16 14:03:09 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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