Raspberry pi 4 commision currently possible (MAAS 3.3)?

I´m new to Maas an try to commision my RPis but failing, Is it currently possible to use Rpis with Maas ?
I try to follow the very well written Turorial https://maas.io/tutorials/build-your-own-bare-metal-cloud-using-a-raspberry-pi-cluster-with-maas#1-overview but all i get when pxe boot my Rpis is a “error: invalid magic number” and “error: you need to load the kernel first” amd64 commission seems to work just fine.
thx.

1 Like

Hi @tur1can21 I can confirm that at the time of helping to write that tutorial I was able to get my cluster of 4 RPI 4 to commission. But confess I have moved on and am not using MAAS with my cluster anymore so can’t test against current versions of firmware etc.

The process was a little fragile in places. You need to make sure that you don’t overwrite the SDCard UEFI boot and the manual step here https://maas.io/tutorials/build-your-own-bare-metal-cloud-using-a-raspberry-pi-cluster-with-maas#7-commission-and-deploy-your-rpis (" Do not proceed until removing the SD card configuration from MAAS!") is needed to make sure that does not happen.

You also need to make sure the RPI is configured to boot from SD and won’t try to boot from USB.

Its possible that you would see the errors you mention if you missed either of those steps.

Regards,
giles

Hi gilesknap

Thanks for getting back to me. I am failing already before the steps you mention. On the first boot of the rpi it already fails with “invalid magic number” while try to do the very first pxe boot. Maas webgui shows “pxe booting…” for the rpi machine. I guess it must be just some kind of incompatibility between latest versions of maas, commissioning-image, rpi 1.stage bootloader, rpi uefi firmware, ubuntu os version wich maas server is installed on.
You said you dont use maas anymore for the pi cluster. what software do you run you pi cluster on now ? (just interested to compare all the possibilities).

I try to commission rpi by run the commision-scripts manually on the rpi (ubuntu) but there are so many unknkown parameters ans variables that it is a bit a pointless approach.

If someone deploy rpi sucessfully recently with the most recent software versions: Please let me know, thanks.

I have to test that in the coming day’s. I will give you feedback.
What versions of UEFI Firmware and MAAS did you try to go with?

Edit: I found some additional information: https://github.com/gilesknap/IaC-at-home/blob/main/nas/03-maas/RaspiMASS.md

Hi novski
I try with UEFI Firmware 1.34, 1.33, 1.32. I copy the Firmware manually without the card maker script as the script did run into errors on my Ubuntu 22.04.1. but that should not mattter as the rpi4b (as well as my cm4) start into UEFI Firmware and afterwards start into pxe boot. If i select the architecture armhf for machine configuration, pxe throws me to “error: invalid magic number” and “error: you need to load the kernel first”. If i select the architecture arm64, pxe trhows me to just the grub shell "grub> " Thx for the additional github link, see that already but didnt help as the process is failing already at the very begining.

As for the maas version i try with 3.3 and 3.2

Exited about your test results…

best regards
Andi

Hi
I was able to commission a rPi4 and an CM4 successfully in MAAS (to device status “ready”) but what is strange is that at the same time the display of the CM4 shows different errors. So I will have to test the deployment of software before i can tell more.

What I found is that while armhf gave me the error you wrote (magic number) and does not commission successfully, an arm64 has a different error on screen but commissions successfully.
It looked like this:

EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot serivces...

Looks like you get the same errors as me except your rpis goes to “device status ready” and my rpis stuck at “PXE booting…” Did you use a specific Firmware and kernel and maas version or just the most recent ones ? Did you create the Firmware sd-card manually or with the script provided in the tutorial ?

Sorry for the delay. I did it manualy.
What i did is basicaly throw the files of the zip folder on to the drive.

Hi @tur1can21

It might be that you have a similar issue discussed here

Can you please check if the candidate image with a newer GRUB fixes the issue?

@troyanov I tested that wihout success.
What I did:
(Maybe you can check my process to verrify if this is the right way to do it)

  • Installed RPi4_UEFI_Firmware_v1.34.zip via raspberrypi Imager.app.
    (i think it does the same as the described uefi.make.sh)
  • changed the MAAS image URL to custom: https://images.maas.io/ephemeral-v3/candidate
  • checked the arm64, armhf and amd64 and loaded them
  • booted my device that was already listed in MAAS Devices from a prior test
  • clicked deploy what took the arm64 image and didn’t finish for about 5min.
  • changed the architecture from arm64 to armhf and tried again
    both led to this screen on the hdmi output of the CM4:

    Be aware that the second scren shows the same as the first with overlayed new information while the first wasn’t cleard.

@novski, it looks like you did everything right. lemme ask around, maybe i can get you an answer.

@novski @tur1can21: can you boot the image that’s giving you “invalid magic number” on some other system?

Do you prefer another arm64 based system or any amd?

@ troyanov: thanks for the hint. i try with Grub 2.06 and at least can get to the same state as novski (Commisioning went thru). Machines -> configuration -> armhf/generic (armhf, arm64/xgene leads to the “invalid magic number” error ). I will try to deploy a vm and report back if it works…

doesn’t matter, just curious if the image is corrupt somehow or if it’s an uptake problem with the rpi.

@ billwear: i try with 2x cm4 and a 1x rpi4 and got the same “invalid magic number” error.

@tur1can21, can you try this tutorial for PXE booting RPI and see if it works, independent of MAAS?

@billwear: sorry if me previous answer was confusing, just to be clear: i am able to PXE boot my cm4 and rpi4 (as per troyanovs hint to use the release candidate) so pxe in general works. Thanks for the link to pxe tutorial. Provisoned cm4 shows “ready” in the maas console now but deploy ubuntu hangs… but that is probably just me, don´t know how to deploy properly. I need to read thru the maas documentation.

there is a new version available! :partying_face: MAAS 3.3.1 has been released
Addressing our problem. I will test it soon.

Thanks for the fix and thanks for this great Software. I can confirm that it currently works with the CM4. I can comission, deploy ubuntu and create and run an LXD.
There is a big caveat (at least with the DeskPi-Super-6C-cluster-board):
The only possible Storage option is USB 2.0 . Even the internal eMMC does not work for deployment.

  1. Flash the rpi UEFI Firmware to internal eMCC
  2. Plug in a USB-storage
  3. Start commision and chose the USB-storage as target.
    This was the only way i could figure out to successfully deploy.

I tried with nvme ssd, m.2 USB3.0 controller and m.2 Sata controller. They show up in UEFI Setup and the attached drives are accessible in ubuntu server and Raspberry pi OS but they don´t show up in the maas machine storage configuration and therefore can´t be used for deployment (sata drives only show up in Raspberry pi OS as the drivers where not loaded per default in ubuntu server from the raspberry pi imager).

Another thing to take into consideration before buy the Deskpi-Super-6C board as a learning platform for maas:
There is no individual power-controll for the CM4s. Each CM4 Slot has a jumper that can be used to reset the CM4 but that is not enogh. m.2 usb and sata controllers do not re-initialize themselfes with cm4 reset. They need a power off, power on cycle to work properly. This leads to the next problem: Power off the board also powers off the cm4 with the maas controller.
Of course this applies to all Client/Server based Software and is not specifically related to MAAS but i thogh i should mention it if someone consider to buy this board to use it to learn maas.

What is your experience with MAAS and CM4 ?
Happy weekend everyone

1 Like