Set the IPMI power type to boot from a custom boot option rather than PXE

I am new to maas and would like to use it in a specific environment where each of my machines will be located on a different LAN from each other and maas, but they can all still reach each other.

Following the advice here, I created an iPXE iso to boot from, which I mount as a virtual media, this works great for commissioning.

After deploying the machine, maas sets it to boot from disk, but if I try to do a redeployment or anything similar, it will first try to PXE boot (which will predictably fail), and then just falls back to disk, which makes the deployment fail.

I tried to create a custom boot entry from an iPXE script, and was hoping that maas will pick that up after trying PXE, but unfortunately it did not, and it was just ignored.

Would it be possible to specify what boot method maas should use when redeploying instead of just falling back to PXE or is a completely different approach is recommended for this use-case?

A few more details:

  1. I also tried to use HTTP boot which maas does pick up, but since I don’t have DHCP available, and my BIOS doesn’t have a method to configure a static IP, it fails.
  2. I am using a X11SPI-TF Supermicro motherboard.
  3. Just mounting the virtual media permanently is a no go as well since if the server will lose power even once it will have to be re-mounted manually again, and maas doesn’t seem to pick this up either.
  4. Creating a new boot entry from the iPXE script, and setting the server to boot always from that also doesn’t work, since maas will change the boot order back to disk on every boot (I am using Ubuntu).

Thanks.

Hi @roeeklinger60

Sorry, I’m struggling to understand some points

After deploying the machine, maas sets it to boot from disk

MAAS is not changing the boot order of the machine when it’s deployed

but if I try to do a redeployment or anything similar, it will first try to PXE boot (which will predictably fail), and then just falls back to disk, which makes the deployment fail.

MAAS is sending some configuration when the machine performs PXE. Out of the box you can’t deploy a machine with MAAS if your machine is not booting with PXE. (However, if you are willing to hack stuff here and there you might look into these configurations that MAAS sends to somehow make it work without PXE). DHCP is a fundamental component in MAAS to deploy machines

Does this help?

Hey @r00ta

Thanks, yeah that helps a lot.

Let me expand a bit on the situation and try to be more concise, perhaps I missed a few details:

  1. I am running in an environment that cannot use PXE / DHCP.
  2. I am trying to work around that so I can still use maas, and I am following the advice given on this similar thread.
  3. based on that, I took the my maas’s ipxe script from /var/lib/maas/boot-resources/current/ipxe.cfg, that has this content:
#!ipxe
# MAAS iPXE pre-loader configuration file

# Load based on MAC address first.
chain http://${next-server}:5248/ipxe.cfg-${mac} ||

# Failed to load based on MAC address.
chain http://${next-server}:5248/ipxe.cfg-default-amd64

and built an ISO image with iPXE with the following command (maas.ipxe is the ipxe script that I included): make bin-x86_64-efi/ipxe.efi EMBED=maas.ipxe, based on the instructions here, and according to the advice on the maas thread.

  1. I mount this ISO on my server, and tell maas to commission it, it loads the iPXE script and commissions perfectly.
  2. I deploy using the same method, this works perfectly as well, now Ubuntu is installed.
  3. The problem starts here. When I try to redeploy, maas seems to tell the server to try and boot via PXE, but PXE isn’t supported, so it will just end up booting to Ubuntu normally.
  4. My idea was to create a new BIOS entry that will point to the iPXE script as a boot option, and when maas needs PXE, it will use that instead of PXE, which should work (tested and verified manually that it works), but I do not know how to get maas to tell the server to use this boot method instead of PXE.

Hope that makes things clearer.

Thanks!

I assume you replaced ${next-server} with the IP of the rack controller right? Same for the $mac I guess. Since you are not suing DHCP these placeholders would not be replaced by your machine, so you need to hardcore them.

Ideally if this works for commissioning it should still work for deployments. Could you double check that ipxe is still the first in the boot order?

Thanks, yes, I replaced them with the proper values as assumed.

Once I deployed Ubuntu onto the machine, the boot order changes to be Ubuntu first, and even if I change it manually (via the BIOS or the OS), it changes Ubuntu to be first on every boot.

I do however notice that if I am using the IPMI power driver and redeploy, it does try to change it to PXE / HTTP boot when it boots the machine, but unfortunately these are not an option.

Did you replace your pxe rom or did you use any other method described here https://ipxe.org/download ?

Unfortunately, replacing the rom is not possible for me since it’s integrated onto the motherboard.

I simply created an ISO file from the iPXE script, and used it as a virtual media, but this will not scale well since once the server loses power it has to be manually mounted again, so I am looking for a more robust permanent solution.

Apparently you have an Intel adapter, have you tried https://ipxe.org/howto/romburning/intel even if your adapter is integrated in the MB?

Yes, I tried that, but unfortunately it does not support my NIC since it is integrated, and it fails.

I was able to workaround most things now, I used a custom .efi file with the iPXE script embedded in it and use efibootmgr to set the .efi as the first boot option, but my last problem seems to remain that after deploying Ubuntu, it will always set ubuntu to be the first boot option on every single boot, if I can disable that behavior, I can just always keep the iPXE efi as the first boot priority and should be good to go.

@r00ta Do you happen to know what is causing Ubuntu to configure itself as the first boot option on every boot so that I can try to disable that?

Thanks for all the help, much appreciated.

BTW: I am using UEFI if that matters.

what MAAS version are you using and what image are you deploying? MAAS never changes the boot order. There was a bug many years ago in curtin (basically the tool that MAAS uses to install the image on the machine) that was causing this behavior but it was fixed.

I understand, perhaps this is a bug? it seems to happen on every boot, not just deployments.

I am using maas 3.4.1 (from apt, followed the official install guide) and the generic Ubuntu 22.04 LTS GA that is provided by maas.