Improve GRUB menu after failed deployments for non Ubuntu images - "invalid magic number"

Hi Team,

I’ve reported in LP#2044169 a condition that happens after a failed deployment of non-Ubuntu images (Official CentOS and Custom Images show this behavior).

Subsequent boots will display an error message:

Booting under MAAS direction...
error: invalid magic number.
error: you need to load the kernel first.

Press any key to continue...

And if the ephemeral GRUB menu is inspected, the kernel, initrd and root will point to a no-such-image URL:

linux (http,192.168.50.1:5248)/images/centos/amd64/ga-20.04/centos70/no-such-image/boot-kernel 
root=squash:http://192.168.50.1:5248/images/centos/amd64/ga-20.04/centos70/no-such-image/squashfs
initrd (http,192.168.50.1:5248)/images/centos/amd64/ga-20.04/centos70/no-such-image/boot-initrd

The steps to reproduce are detailed in the LP#2044169

My request is to improve this GRUB menu. Two possible alternatives I came up with would be:

  • Handle it in a more informative way. The message: “Booting under MAAS direction…” could be changed to provide some hints on the issue, directing the user to check the Failed deployment for the specific machine.

  • Instead of picking a no-such-image, a regular Ubuntu commissioning image could be used. This way the server hostname appears in the boot process and it’s easy to relate to an already enlisted machine. Also, this keeps the behavior consistent with Ubuntu and non-Ubuntu images.

But many other options are viable.

Thanks

Your request is tagged as feature-request, and we will consider your request along with the others proposed for the community, and our customers to populate our internal backlog.

Thanks for your contribution @jasimioni!