[Bug 2114968] Re: Machine deploy will fail if custom os image has two kernels in /lib/modules
Alexsander de Souza
2114968 at bugs.launchpad.net
Thu Jun 26 18:09:52 UTC 2025
Curtin cannot handle RedHat-based images that have more than one kernel
installed. This is not a common scenario, but it's not invalid. see
`redhat_update_initramfs` in curthooks.
As a work-around, you can remove the old kernel (and its modules) from
the tarball, it won't be used anyway and it's just making the image
bigger.
** Project changed: maas => curtin
** Also affects: maas
Importance: Undecided
Status: New
** Changed in: maas
Status: New => Triaged
** Changed in: maas
Importance: Undecided => Medium
** Changed in: maas
Milestone: None => 3.7.x
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/2114968
Title:
Machine deploy will fail if custom os image has two kernels in
/lib/modules
Status in curtin:
New
Status in MAAS:
Triaged
Bug description:
Describe the bug:
When deploying a custom OS image prepared via PACKER, OS installation fails when trying to get the kernel modules from /lib/modules.
"rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel"
Above is the command used to determine the kernel modules in the image tar. If there are multiple images in that folder, it will concat all the names together
Eg. output:
-bash-4.2$ ls /lib/modules
3.10.0-1127.el7.x86_64 3.10.0-1160.62.1.el7.x86_64
-bash-4.2$ rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel
3.10.0-1127.el7.x86_643.10.0-1160.62.1.el7.x86_64-bas
Steps to reproduce:
Create a custom packer image (eg. centos9) with multiple kernel modules installed. Upload that image to MAAS and deploy a machine with that image, deployment fails due to module not found error as it is trying to search for the concatenated name of all the kernel modules.
Expected behavior (what should have happened?):
Take the latest kernel module and deploy the compute rather than concatenating all the names.
Actual behavior (what actually happened?):
MAAS tried searching for kernel module with two names concatenated, so it did not find that kernel module, hence deployment fails
MAAS version and installation type (deb, snap):
snap installed
MAAS setup (HA, single node, multiple regions/racks):
multiple regions/rack
Host OS distro and version:
centos9
Additional context:
To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/2114968/+subscriptions
More information about the foundations-bugs
mailing list