-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aii-pxelinux: add support for Grub-based UEFI PXE boot loader #216
Comments
We started trying to support EFI network boot at RAL, but have put it to one side for now.
Then in
|
@jrha what you mention in the "non Quattor" and rather trivial (as soon as you found the info!). AII impact is a bit more tricky, as explained in the description (about to be updated!). |
AII could generate both configs for BIOS and UEFI and then let dhcpd select the correct one at boot time, which would avoid having to know anything in advance. |
Not really... Read the issue description: the problem is not in the DHCP config (DHCP just decides which PXE loader to use). After that, the same configuration entry is used and so it has to point to the right file. This is managed by |
For example...
|
It may be an approach too... but one reason I didn't mention it is that I am not sure at all that pxelinux.pathprefix is taken into account by the RH UEFI PXE. Have you checked? |
Nope, was just an idea. |
Unfortunately, I just checked and as I was afraid |
BTW, with PR quattor/template-library-standard#85 and the manual edition of the Grub configuration file, I have been able to install successfully a system, using the machine boot menu (F12) to force the boot on the hard disk and workaroud the problem of telling UEFI PXE to boot from the local disk. |
what pxe boot cfg files was used to tell UEFI to boot from localdisk? |
Yes, this is exactly the problem I think. In PXELINUX, you were saying This issue is annoying but I think we should start implement the basic things. At the end this is (hoefully) just finding the right contents for one config file and this should not impact AII itself... |
from http://www.syslinux.org/archives/2013-August/020655.html
i'm sure what syslinux version RHEL ships, but a recent syslinux.efi might support |
that discussion goes on |
More info and tips: http://www.syslinux.org/wiki/index.php?title=PXELINUX#UEFI |
I don't think that RHEL UEFI PXE is based on SYSLINUX one. This is why the config file format is not the same and why it doesn't accept the same options. I'll try to look at it in more details but having the RH one working would be great as from Grub you can do a lot of troubleshooting... something that used to be difficult with SYSLINUX. |
if the syslinux one support localboot, you will get the grub based one to debug things. it will just not be the one you get during pxe phase. that being said, getting the RHEL one to work with localboot is even better. |
https://access.redhat.com/solutions/629813 RHEL recommends
and that there's no localboot equilvalent. but this was/is for EL6, not sure the path is wrong/not properly adapted or grub specific so YMMV for quattor, most nodes will be |
In fact, this was the idea I had after digging in several places and that I tried unfortunately without success. I guess it should be |
I spent some time this morning trying to troubleshoot this chainloading problem... I realized that the PXE loader from RH that Is used if in fact based on Legacy Grub. With this version, chainloading doesn't seem to work as expected (may be because it detects that the chainloaded loader is the same as itself and in fact does nothing...). I tried to use grubx64.efi from EL7, a Grub2-based loader, and succeeded to chainload to an EL6 (legacy Grub) system doing the configuration manually at the Grub prompt. It was as simple as:
I now need to figure out how to get a host-based configuration name. The |
Ooh I forgot about that, we changed our |
Huge step forward! I managed to get a a Grub2-based PXE loader to chainload to an EL6 or EL7 machine and to install (start the installer of) an EL7 machine. Unfortunately, Grub2 doesn't seem to be able to boot an EL6 kernel (error is "kernel too old") because when booting in UEFI mode, the standard 'linux' command to load the kernel is disabled and replaced with a 'linuxefi' command (the same applies to 'initrd') that enforces some checks on the kernel version. I guess that this is related to secure booting but I did not find yet a way to workaround this (not sure if this is even possible). I used Some other differences introduced by using Grub2 are related to the configuration files searched:
As for me, the remaining questions are:
|
For the record, the Grub2 config files I used are:
|
Yes, for me UEFI only makes sense with EL7+. |
@jouvin thanks for all the testing! |
@stdweird |
Unfortunately, after more testing, the proposed solutin in #216 (comment) is not so easy... In fact, for I spent some time trying to find a workaround but had to give up after trying unsuccessfully to use Grub May be in the short term, the easiest will be to stay with SYSLINUX if it has a decent enough EFI support. 6.03 is released and in the posts I read today was reported as the first working version. |
I gave a try to SYSLINUX. I built 6.03 following the instructions (in particular not to rebuild |
It works 😄. I managed to get the Grub2-based UEFI PXE boot loader to do exactly what PXELINUX has been doing: exit PXE and let the machine firmware decide which device to boot next (normally the hard disk). The Grub2 command to use is just I am updating the description on what has to be done for Grub2 (rather than Legacy Grub) support. |
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
Following the discussion at the workshop I'm pushing this back to 17.4. |
@jrha why? My understanding of the conclusion was the opposite... No reason to delay it more as it is fully backward compatible for people not using UEFI (and can only bring improvements to others as there was not way to install a UEFI machine with the previous version, except some local hack). |
The work changes the types of existing parameters in the schema (which is good, it improves the validation, but it may affect users), if you factor those changes out then I am happy to merge this for 17.3. |
Specifically: quattor/configuration-modules-core@b6efec2 |
I'll see if I can factor them out... I implemented the chages at the request of @stdweird (a good suggestion anyway). I don't think the change should affect anybody: the code required that the values had this type. The schema has been updated to express the requirement. Personnally I'd like to get a feedback on the UEFI support and I don't see much adoption of it before we release it... |
- Configuration is built for every variant enabled - Significant code cleanup - Contributes to quattor#216
- nbpdir_grub, installation-kernel-root, grub2_efi_linux_cmd - Options added commented-out in the default aii-shellfe.conf - aii-core now has a dependency on aii-pxelinux constants: build order modified in pom.xml - Contributes to quattor#216
I had issues with first doing PXE boot and then booting from the hard drive but this the
|
@wpoely86 yes, that might work (one can also just ship this via pxe without reading it from disk.) |
UEFI requires a PXE loader different from
pxelinux.0
. One possible loader is based on Grub. RH provides it as part of the OS. On EL6, it installed in/boot/efi/EFI/redhat/grub.efi
and is based on Legacy Grub. In EL7, it is provided by the packagegrub2-efi
and is based on Grub2 (this is a set of files that must be copied on the TFTP server which doesn't need to run EL7). As Legacy Grub is no lo longer maintained, the proposal is to support the Grub2-based UEFI boot loader (below in the description, Grub will refer to Grub2).The Grub-based PXE loader has two differences with respect to its configuration comparted to
pxelinux.0
:pxelinux.cfg
subdirectory. This is easily fixed by putting the loader in thepxelinux.cfg
directory and is transparent to Quattor.pxelinux.0
(SYSLINUX) configuration file (but the name based on the host address in hexa remains the same).As a result,
aii-pxelinux
must be updated to process differently a host using UEFI or BIOS. Rather than adding a property in the host profile to say if it using UEFI or BIOS (with the risk of being unsynchronized with the actual setting on the machine), as suggested by @jrha in #216 (comment), the idea is to haveaii-pxelinux
generating both the Grub configuration used by UEFI and the PXELINUX configuration for each host in different directories (for exampleefi.cfg
andpxelinux.cfg
). The DHCP configuration will define which path must be used based on the DHCParch
option and the PXE loader used (see http://www.syslinux.org/wiki/index.php?title=PXELINUX#UEFI for details). The actual configuration directory to use for each variant will be the directory where the Grub-based loader is installed andpxelinux.cfg
(or whatever is set by DHCP optionpxelinux.pathprefix
) respectively.Things to do in
aii-pxelinux
are:Add an option
nbpdir_grub2_efi
to define where the Grub config files must be created.Generate Grub config file for the installation instead of the SYSLINUX one. A typicial file should be:
In the Grub config file,
(pxe)
refers to the TFTPD root (generally/tftpboot
. Every absolute path given in Grub commands are in fact relative to this path.localboot.cfg
file for booting from local disk (aii-shellfe --boot
). This Grub config file must typically contains:Add a configuration option
grub2_efi_kernel_root
. In the Grub config file used for the installation, note that the kernel/initd path is different from the PXELINUX one, as it has to include every element under/tftpboot
. There is no easy and general way to compute it from another configuration option. A reasonable default value could benpbdir
with the first (generally/tftpboot
) and last element (pxelinux.cfg
) removed.Optionally, add a configuration option
grub_efi_linux_cmd
to address aii-pxelinux: add support for Grub-based UEFI PXE boot loader #216 (comment). This will allow to tell AII which Grub command to use instead oflinuxefi
/initrdefi
to load the installation kernel and will let the site decide whether it wants to uselinux
/initrd
orlinux16
/initrd16
(initrd command to use may be decuded from linux command).Contributes to #97
The text was updated successfully, but these errors were encountered: