How to use a custom GRUB version for PXE boot

We’ve been encountering a problem with GRUB on a number of servers where It just hangs when trying to boot the kernel if it’s been fetched over the network (we can reproduce that outside of MAAS). Whatever the root cause is, it seems to have been fixed upstream in GRUB 2.12-rc1.

What would be the best way to replace the GRUB version served up by TFTP/HTTP for ephemeral booting? We don’t need to worry about the GRUB version that gets installed on the HDD; booting off disk is working fine after deployment.

We’re currently using MAAS 3.4 on Ubuntu 22.04 (1:3.4.0-14319-g.3ab76533f-0ubuntu1~22.04.1).

For now we’ve got this working by copying a new grub image into /var/lib/maas/boot-resources/current (on the rack controller) and adding a DHCP snippet to override the boot filename on the appropriate subnet.

However, I’m a bit worried that when MAAS updates its boot resources from upstream, it will lose this change. Is there an officially-supported mechanism to add extra files to the TFTP service?

Hi @bmerry ,

I see your use case but currently there is no official/supported way to do it

Thanks @r00ta. Can you give us some idea of what might go wrong with the approach of just dropping extra files into /var/lib/maas/boot-resources/current? I’m unclear on the details of how MAAS manages this directory e.g. is the file we added just going to vanish on some schedule or only if we take some explicit action to update images?