Error with Couldn't find locked package 'kernel-5.11.15-200.fc33.x86_64' (pkgs matching NEVRA: 0;mismatched checksums:0) when build FCOS with changed kernel version

I tried to modify kernel to 5.11.15 in manifest-lock.overrides.x86-64.yaml and build FCOS with this kernel version, but met error:
'error with Couldn’t find locked package ‘kernel-5.11.15-200.fc33.x86_64’ (pkgs matching NEVRA: 0;mismatched checksums:0) when run cosa fetch. but some other version such as 5.11.14 can got work, what is wrong with it?

I find choose verison from this link:Index of /packages/kernel

Note: I assume you’re doing a local build using cosa.

cosa needs to know where to grab the package from (yum repo) or you need to have it locally. The easist thing to do is just download the rpm locally into overrides/rpm/ (from the base of your working directory). cosa will automatically pick it up when you cosa build.

Thanks Mabe, work for me.

And could you share how to build kernel-core.rpm and kernel-module.rpm if I want to replace my built kernel? it seems 3 kernel rpms are must. but I just can build out kernel.rpm.

I can build out 3 kernel RPMs with my change now, but CoreOS built system can not recognize them when I put them into overrides/rpm and still install the default kernel version from manifest-lock.overrides.x86_64.yaml, why? And what is special check for rpm-ostree?

I checked that the command and the contents in /srv/tmp/override/local-overrides.json are correct which are my built kernel info.

sudo -E rpm-ostree compose tree --repo=/srv/tmp/repo --touch-if-changed /srv/tmp/treecompose.changed --cachedir=/srv/cache --unified-core /srv/tmp/override/coreos-assembler-override-manifest.yaml --cache-only --force-nocache --add-metadata-from-json /srv/tmp/build/tmp/commit-metadata-input.json --write-composejson-to /srv/tmp/compose.json --ex-write-lockfile-to /srv/tmp/repo/tmp/manifest-lock.generated.x86_64.json.tmp --ex-lockfile=/srv/src/config/manifest-lock.x86_64.json --ex-lockfile=/srv/src/config/manifest-lock.overrides.x86_64.yaml --no-parent --previous-commit 0ba6058ebb7736869ac940e9ac5a2ee45594a399e8c11a1c3bdc4534b73fdf27 --ex-lockfile=/srv/tmp/override/local-overrides.json

Make sure to use a different release tag in your built RPMs so that it doesn’t match a kernel RPM already in the repos.

Did you also add an entry to /srv/src/config/manifest-lock.overrides.x86_64.yaml ?

If you leave them around then you’d want to add an entry there for the kernel. You can choose to just remove the lockfiles (manifest-lock.overrides.x86_64.yaml and manifest-lock.x86_64.json) from your filesystem and just let it pull in whatever is latest. As @jlebon mentioned you’ll want to make sure the rpms you built have a higher (and different) version than what is in the Fedora repos, though.