Customize PXE for hosts

Hi MaaS, I cannot figure out for the life of me how to customize the PXE script for hosts. I see a AskUbuntu answer from 2012 saying that there is a PXE file per machine, but I’m having no such luck identifying if that is still the case. (https://askubuntu.com/questions/130772/how-do-i-modify-the-pxe-config-in-maas) Is this still reasonably possible?

Use case: I have servers with lots of disks. The current netboot is searching disks for a very long time and with debug on it is very noisy. I can change the EFI boot order to boot from ubuntu entry first instead of network boot, but would prefer to be able to change how these boot from MaaS instead.

EDIT: This specifically is wildly inefficient in this case and causes deployment to fail.

root@storage-maas-1:~# curl tftp://x.x.x.x/grub/grub.cfg-x:x:x…
set debug=“all”
set default=“0”
set timeout=0

menuentry ‘Local’ {
echo ‘Booting local disk…’
for bootloader in
boot/bootx64.efi
ubuntu/shimx64.efi
ubuntu/grubx64.efi
centos/shimx64.efi
centos/grubx64.efi
redhat/shimx64.efi
redhat/grubx64.efi
rhel/shimx64.efi
rhel/grubx64.efi
red/grubx64.efi
Microsoft/Boot/bootmgfw.efi; do
search --set=root --file /efi/$bootloader
if [ $? -eq 0 ]; then
chainloader /efi/$bootloader
boot
fi
done
# If no bootloader is found exit and allow the next device to boot.
exit
}

This appears to be hardcoded in a template. https://github.com/maas/maas/blob/master/src/provisioningserver/templates/uefi/config.local.amd64.template

Wondering if possible to override…

Overrode to test in snap with:

mkdir /srv/upper /srv/workdir
vi /srv/upper/config.local.amd64.template
mount -t overlay -o lowerdir=/snap/maas/current/lib/python3.8/site-packages/provisioningserver/templates/uefi,upperdir=/srv/upper,workdir=/srv/workdir overlay /snap/maas/current/lib/python3.8/site-packages/provisioningserver/templates/uefi
# edit template in /snap/maas/current/lib/python3.8/site-packages/provisioningserver/templates/uefi
snap restart maas

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.