You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Describe the bug
Trying to replace kernel base packages with a custom kernel - fails with errors on fedora-coreos 35.
Attempt 1 - try to remove existing kernel packages:
Reproduction steps
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 --remove=kernel --remove=kernel-core --remove=kernel-modules
Expected behavior
No errors
Actual behavior
rpm-ostree reports an error:
error: Base packages not marked to be removed: kernel-core, kernel, kernel-modules
Attempt 2 - keep existing kernel packages:
Reproduction steps
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
Expected behavior
No errors
Actual behavior
rpm-ostree succeeds, but after reboot
rpm-ostree status
reports an error:
error: Installing kernel: regfile copy: No space left on device
(boot partition is not large enough?)
System details
fedora-coreos-35.20220313.3.1-qemu.x86_64.qcow2
Also tried:
fedora-coreos-35.20220424.3.0-qemu.x86_64.qcow2
Ignition config
Additional information
The custom kernel is based on
kernel-5.16.13-200.fc35.src.rpm
with a small patch applied and
%define buildid .nb
.
Built with
rpmbuild -bb --with baseonly --without debuginfo --target=x86_64 kernel.spec
Related:
https://discussion.fedoraproject.org/t/installing-custom-kernel-on-fedora-coreos/39138
Unfortunately it doesn't work for me:
[*** ] A start job is running for Ignition…: Save Partitions (59s / no limit)
[ *** ] A start job is running for Ignition…: Save Partitions (59s / no limit)
[ 64.057979] ignition-ostree-transposefs[877]: Mounting /dev/disk/by-label/boot (/dev/vda3) to /sysroot/boot
[ 64.183485] EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ **] A start job is running for Ignition…ve Partitions (1min 1s / no limit)
[ 65.963739] ignition-ostree-transposefs[877]: zram usage:
[ *] A start job is running for Ignition…ve Partitions (1min 1s / no limit)
[ OK ] Finished Ignition OSTree: Save Partitions.
[ 66.199382] systemd[1]: Finished Ignition OSTree: Save Partitions.
[ 66.202829] kauditd_printk_skb: 15 callbacks suppressed
[ 66.202846] audit: type=1130 audit(1653202457.867:39): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=ignition-ostree-transposefs-save comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Starting Ignition (disks)...[ 66.219847] systemd[1]: Starting Ignition (disks)...
[ 66.251611] ignition[899]: Ignition 2.13.0
[ 66.253633] ignition[899]: Stage: disks
[ 66.256173] ignition[899]: reading system config file "/usr/lib/ignition/base.d/00-core.ign"
[ 66.265535] ignition[899]: reading system config file "/usr/lib/ignition/base.d/30-afterburn-sshkeys-core.ign"
[ 66.274924] ignition[899]: no config dir at "/usr/lib/ignition/base.platform.d/qemu"
[ 66.278189] ignition[899]: disks: createPartitions: op(1): [started] waiting for devices [/dev/sda]
[*** ] (2 of 2) A start job is running for /dev/sda (1min 30s / 1min 30s)
[ TIME ] Timed out waiting for device /dev/sda.
[FAILED] Failed to start Ignition (disks).
See 'systemctl status ignition-disks.service' for details.
[DEPEND] Dependency failed for Ignition Complete.
[DEPEND] Dependency failed for Initrd Default Target.
[DEPEND] Dependency failed for Igni…e: Mount (firstboot) /sysroot.
[ 156.348634] audit: type=1130 audit(1653202548.013:40): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=ignition-disks comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[ 156.359506] ignition[899]: disks failed
[ OK ] Stopped target Initrd /usr File System.
[ OK ] Stopped target Network.
[ OK ] Stopped target Remote Encrypted Volumes.
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Preparation for Remote File Systems.
[ OK ] Stopped target Timer Units.
[ OK ] Closed D-Bus System Message Bus Socket.
[ OK ] Stopped CoreOS: Touch /run/agetty.reload.[ 156.382391] ignition[899]: Full config:
[ OK ] Stopped Ignition (fetch-offline).
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Path Units.
[ OK ] Stopped target Slice Units.
[ OK ] Stopped target Socket Units.
[ OK ] Stopped target System Initialization.
[ OK ] Stopped target Local File Systems.
[ OK ] Stopped target Preparation for Local File Systems.
[ OK ] Stopped target Swaps.
[ OK ] Stopped CoreOS Ignition User Config Setup.
[ 156.408186] ignition[899]: {
[ OK ] Started Emergency Shell.
[ OK ] Reached target Emergency Mode.[ 156.414216] audit: type=1131 audit(1653202548.050:41): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=coreos-touch-run-agetty comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Stopped Ignition (kargs).
------
Ignition has failed. Please ensure your config is valid. Note that only
Ignition spec v3.0.0+ configs are accepted.
A CLI validation tool to check this called ignition-validate can be
downloaded from GitHub:
https://github.com/coreos/ignition/releases
------
///lib/dracut/hooks/emergency/99-timeout.sh@56(_prompt_for_timeout): echo 'Displaying logs from failed units: ignition-disks.service'
Displaying logs from failed units: ignition-disks.service
///lib/dracut/hooks/emergency/99-timeout.sh@57(_prompt_for_timeout): for unit in ${failed}
///lib/dracut/hooks/emergency/99-timeout.sh@59(_prompt_for_timeout): journalctl -b --no-pager --no-hostname -u ignition-disks.service -n 10
-- Journal begins at Sun 2022-05-22 06:53:15 UTC, ends at Sun 2022-05-22 06:55:50 UTC. --
May 22 06:55:47 systemd[1]: ignition-disks.service: Failed with result 'exit-code'.
May 22 06:55:47 systemd[1]: ignition-disks.service: Service will not restart (restart setting)
May 22 06:55:47 systemd[1]: ignition-disks.service: Changed start -> failed
May 22 06:55:47 systemd[1]: ignition-disks.service: Job 54 ignition-disks.service/start finished, result=failed
May 22 06:55:47 systemd[1]: Failed to start Ignition (disks).
May 22 06:55:48 systemd[1]: ignition-disks.service: Unit entered failed state.
May 22 06:55:48 systemd[1]: ignition-disks.service: Triggering OnFailure= dependencies.
May 22 06:55:48 systemd[1]: ignition-disks.service: Triggering OnFailure= dependencies done.
May 22 06:55:48 systemd[1]: ignition-disks.service: Consumed 39ms CPU time.
May 22 06:55:48 systemd[1]: ignition-disks.service: Control group is empty.
Any idea?
Update:
I was able to work around this problem by generating a smaller initramfs before installing the new kernel:
sudo rpm-ostree initramfs --enable --arg=-H --arg=--strip --arg=--hostonly-mode=strict --arg=--xz --arg=--filesystems=xfs
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
This generates 45MiB initramfs which fits into /boot
.
It's still interesting to know how to change partition size on coreos. I couldn't find how to do it, not even when generating a new coreos image with cosa.
@bgilbert After fixing storage.disks.device
to /dev/vda
, it still doesn't work.
It seems that ignition fails early after saving the partitions:
[ OK ] Finished Ignition OSTree: Detect Partition Transposition.
[ 7.702697] systemd[1]: Finished Ignition OSTree: Detect Partition Transposition.
Starting Ignition OSTree: Save Partitions...
[ 7.712660] systemd[1]: Starting Ignition OSTree: Save Partitions...
[ 7.718718] ignition-ostree-transposefs[879]: Moving rootfs to RAM...
[ 7.722130] ignition-ostree-transposefs[879]: Mounting /dev/disk/by-label/root (/dev/vda4) to /sysroot
[ 7.739333] XFS (vda4): Mounting V5 Filesystem
[ 8.107600] XFS (vda4): Ending clean mount
[ 8.114902] xfs filesystem being mounted at /sysroot supports timestamps until 2038 (0x7fffffff)
[ 8.573655] NetworkManager[751]: <info> [1653384303.6667] policy: set 'Wired Connection' (enp0s9) as default for IPv6 routing and DNS
[ ***] A start job is running for Ignition…: Save Partitions (41s / no limit)
[ 45.787720] ignition-ostree-transposefs[879]: Moving bootfs to RAM...
[ 45.793525] ignition-ostree-transposefs[879]: Mounting /dev/disk/by-label/boot (/dev/vda3) to /sysroot/boot
[ 45.962005] EXT4-fs (vda3): mounted filesystem with ordered data mode. Quota mode: none.
[** ] A start job is running for Ignition…: Save Partitions (43s / no limit)
[ 47.755954] ignition-ostree-transposefs[879]: zram usage:
[* ] A start job is running for Ignition…: Save Partitions (44s / no limit)
[ OK ] Finished Ignition OSTree: Save Partitions.
Starting Ignition (disks)...
[ 48.483030] systemd[1]: Finished Ignition OSTree: Save Partitions.
[ 48.488263] kauditd_printk_skb: 7 callbacks suppressed
[ 48.488265] audit: type=1130 audit(1653384343.571:38): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=ignition-ostree-transposefs-save comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 48.513067] systemd[1]: Starting Ignition (disks)...
[ 48.539734] ignition[902]: Ignition 2.13.0
[ 48.544541] ignition[902]: Stage: disks
[ 48.552212] ignition[902]: reading system config file "/usr/lib/ignition/base.d/00-core.ign"
[ 48.564293] ignition[902]: reading system config file "/usr/lib/ignition/base.d/30-afterburn-sshkeys-core.ign"
[ 48.588241] ignition[902]: no config dir at "/usr/lib/ignition/base.platform.d/qemu"
[ 48.614750] ignition[902]: Adding "neuroblade.corp-NB-CA-" to list of CAs
[ 48.625061] ignition[902]: disks: createPartitions: op(1): [started] waiting for devices [/dev/vda]
[ 48.648205] ignition[902]: disks: createPartitions: op(1): [finished] waiting for devices [/dev/vda]
[ 48.664757] vda: vda1 vda2 vda3 vda4
[ 48.674662] ignition[902]: disks: createPartitions: created device alias for "/dev/vda": "/run/ignition/dev_aliases/dev/vda" -> "/dev/vda"
[ 48.719696] ignition[902]: disks: createPartitions: op(2): [started] partitioning "/run/ignition/dev_aliases/dev/vda"
[FAILED] Failed to start Ignition (disks).
See 'systemctl status ignition-disks.service' for details.
[DEPEND] Dependency failed for Igni…e: Mount (firstboot) /sysroot.
[DEPEND] Dependency failed for Ignition Boot Disk Setup.
[DEPEND] Dependency failed for Ignition Complete.
[DEPEND] Dependency failed for Initrd Default Target.
[ 48.762266] audit: type=1130 audit(1653384343.855:39): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=ignition-disks comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
On maintanance shell I see this:
:/root# systemctl status ignition-disks.service | cat
× ignition-disks.service - Ignition (disks)
Loaded: loaded (/usr/lib/systemd/system/ignition-disks.service; static)
Active: failed (Result: exit-code) since Tue 2022-05-24 09:25:43 UTC; 41s ago
Docs: https://github.com/coreos/ignition
Process: 902 ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=disks (code=exited, status=1/FAILURE)
Main PID: 902 (code=exited, status=1/FAILURE)
CPU: 55ms
May 24 09:25:45 localhost.localdomain ignition[902]: "systemd": {
May 24 09:25:45 localhost.localdomain ignition[902]: "units": [
May 24 09:25:45 localhost.localdomain ignition[902]: {
May 24 09:25:45 localhost.localdomain ignition[902]: "enabled": true,
May 24 09:25:45 localhost.localdomain ignition[902]: "name": "[email protected]"
May 24 09:25:45 localhost.localdomain ignition[902]: }
May 24 09:25:45 localhost.localdomain ignition[902]: ]
May 24 09:25:45 localhost.localdomain ignition[902]: }
May 24 09:25:45 localhost.localdomain ignition[902]: }
May 24 09:25:43 localhost.localdomain systemd[1]: ignition-disks.service: Triggering OnFailure= dependencies.
Actually it works!
I had to increase the image size (qemu-img resize
) and specify size_mib
for the root partition to overcome the issue above.
Thanks you for all your help!