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
Link to the BZ where this missing feature was reported as a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1842887
When implemented this will need to be validated with RHCOS as well so that it can be leveraged for OpenShift installations.
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.
Hi Guido, yes, please do post all the steps here. That should accelerate (!) things.
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
There is a patchset Upstream: https://lists.gnu.org/archive/html/grub-devel/2022-03/msg00193.html
Grub 2.12-rc1 has been released with VLAN support (commands, network and reading the VLAN from the UEFI path).