I’m trying to install a custom (patched) kernel on Fedora coreos.
I built my kernel as a package “kernel-core-5.16.13-200.nb.fc35” in the usual way with rpmbuild.
No matter what I try, I’m not able to install my custom kernel on coreos, so I must be missing something.
When trying to run:
sudo rpm-ostree override remove kernel kernel-core kernel-modules --replace kernel-5.16.13-200.nb.fc35.x86_64.rpm --replace kernel-core-5.16.13-200.nb.fc35.x86_64.rpm --replace kernel-modules-5.16.13-200.nb.fc35.x86_64.rpm
error: Base packages not marked to be removed: kernel-core, kernel, kernel-modules
When trying to run:
sudo rpm-ostree override replace kernel-5.16.13-200.nb.fc35.x86_64.rpm kernel-core-5.16.13-200.nb.fc35.x86_64.rpm kernel-modules-5.16.13-200.nb.fc35.x86_64.rpm
it actually starts well!
Upgraded: kernel 5.16.13-200.fc35 -> 5.16.13-200.nb.fc35 kernel-core 5.16.13-200.fc35 -> 5.16.13-200.nb.fc35 kernel-modules 5.16.13-200.fc35 -> 5.16.13-200.nb.fc35 Use "rpm-ostree override reset" to undo overrides Run "systemctl reboot" to start a reboot
But after reboot,
rpm-ostree status shows an error:
State: idle Warning: failed to finalize previous deployment error: Installing kernel: regfile copy: No space left on device check `journalctl -b -1 -u ostree-finalize-staged.service` Deployments: ● fedora:fedora/x86_64/coreos/stable Version: 35.20220313.3.1 (2022-03-28T19:24:40Z) Commit: 4a21b7876e42f223bb70b00eedef698c34a8e72b5ffbfc597aec36f40d149a58 GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
journalctl -b -1 -u ostree-finalize-staged.service shows:
-- Journal begins at Sun 2022-05-15 11:57:57 UTC, ends at Sun 2022-05-15 12:16:10 UTC. -- May 15 12:13:43 nb-qemu systemd: Finished OSTree Finalize Staged Deployment. May 15 12:13:55 nb-qemu systemd: Stopping OSTree Finalize Staged Deployment... May 15 12:13:55 nb-qemu ostree: Finalizing staged deployment May 15 12:13:59 nb-qemu ostree: Copying /etc changes: 14 modified, 0 removed, 36 added May 15 12:13:59 nb-qemu ostree: Copying /etc changes: 14 modified, 0 removed, 36 added May 15 12:14:01 nb-qemu ostree: error: Installing kernel: regfile copy: No space left on device May 15 12:14:01 nb-qemu systemd: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE May 15 12:14:01 nb-qemu systemd: ostree-finalize-staged.service: Failed with result 'exit-code'. May 15 12:14:01 nb-qemu systemd: Stopped OSTree Finalize Staged Deployment. May 15 12:14:01 nb-qemu systemd: ostree-finalize-staged.service: Consumed 2.378s CPU time.
- Why does
rpm-ostree override remove --replacefails where
rpm-ostree override replaceseems to work?
- Am I missing something with rpm-ostree? Should I run it differently?
- Must I increase the boot partition to install a custom kernel?? How do I do that on coreos?
Eventually my goal is to perform this kernel update in an ignition script so I could use an off-the-shelf coreos image and replace its kernel on the first boot.
I would appreciate your advice!