Skip to content
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-ks 21.12: regex for identifying PXE boot entries not strict enough #338

Closed
jouvin opened this issue Jul 6, 2023 · 3 comments · Fixed by #340
Closed

aii-ks 21.12: regex for identifying PXE boot entries not strict enough #338

jouvin opened this issue Jul 6, 2023 · 3 comments · Fixed by #340
Assignees
Milestone

Comments

@jouvin
Copy link
Contributor

jouvin commented Jul 6, 2023

aii-ks has a great feature that allows to redefine the UEFI boot order to have the PXE entries first. Identifying the PXE entries relies on a regex as there is no other way to do it. But this regex is not strict enough on some machines, like HP servers, where the UEFI boot entry list contains things like Boot Menu, Network Boot, PXE Boot... that are just referring to LILO menus (clearly not what we want) and not to PXE entries.

I attach the script
boot_pxe_first.sh I use to reorder the boot list on an installed system where I used a slightly different regex that works at least on Dell and HP servers.

Michel

@jouvin
Copy link
Contributor Author

jouvin commented Jul 13, 2023

This problem seems serious. With the script generated by ks.pm, we are unable to reboot an HP server (Appolo 4200) as the first entry is the Network Boot menu that doesn't do the right thing: the search for grubx64.efi fails. Running the script mentioned in the description, with a more restrictive regex, fixes the problem.

I attach a modified version of the script with the regex excluding from PXE entries HTTP entries (found on HP Apollo 4200) :
boot_pxe_first.sh.

jouvin added a commit to jouvin/aii that referenced this issue Jul 13, 2023
- Exclude 'Network Boot' entries available on HPE machines like Apollo 4200
- Exclude HTTP entries available on some machines

Fixes quattor#338
@wpoely86
Copy link
Member

Interesting: I've also seen the error where it can't find grux64.efi but I didn't know that this was the issue. Slightly weird.

Instead of this approach with a regex: could we not simply pick the entry that was used for the current boot? Which will be the correct PXE ?

@jouvin
Copy link
Contributor Author

jouvin commented Jul 14, 2023

Picking the BootCurrent idea is an interesting idea. It should work on a fresh system and as long as the you don't change the interface you use for PXE or nothing wrong happened in your boot list order (for example because you didn't have the KS pxeboot=true in your previoous install). If something wrong happened to your boot order, reinstalling the system may not fix it when using the BootCurrent. Anyway we could also say that fixing wrong configuration is not the responsibility of KS and that for this we provide (for example in template-library-standard) the script that I attached, not run automatically, where we can use fancy regex that are easy to fix in case of a problem.

jouvin added a commit to jouvin/aii that referenced this issue Jul 18, 2023
…rst entry

in the boot list

- Replace the approach based on regexp to identify the PXE entries that
proved to be fragile

Fixes quattor#338
jouvin added a commit to jouvin/aii that referenced this issue Jul 21, 2023
…rst entry

in the boot list

- Replace the approach based on regexp to identify the PXE entries that
proved to be fragile

Fixes quattor#338
@jrha jrha added this to the 23.6 milestone Jul 28, 2023
@jrha jrha closed this as completed in #340 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment