kdump
on CoreOSkdumpctl
(executed by kdump.service
in the real root)/etc/kdump.conf
has valid configuration/etc/sysconfig/kdump
to see if a kernel is specified to be used as the crash kernel, otherwise, set currently running kernel as the kernel for the initrd.TARGET_INITRD
, which is always ${KDUMP_BOOTDIR}/initramfs-${kdump_kver}kdump.img
TARGET_INITRD
exists, if not, return MODIFIED/etc/kdump.conf
) were modifiedmkdumprd
kexec
to load the kernel specified in /etc/sysconfig/kdump
. If none is specified, use the currently running kernel as the crash kernel.kexec
args and kernel cmdline arguments for the crash kernel can be supplied by configuring /etc/sysconfig/kdump
./proc/cmdline
(plus some additional arguments added by kdump
) will be used as cmdline arguments for the crash kernelkdump
to be done in a declarative manifest, and just have it "work" without further manual configuration after booting up.kdump
initrdkdump
generate initrds behind rpm-ostree
's back so ostree
can own /boot
modifications.KDUMP_COMMANDLINE
variable is configured in /etc/sysconfig/kdump
kexec-tools
in the FCOS image.crashkernel=256M
for the real root. This would require changing the dracut module to reboot at the switch-root point if kargs have been modified.kdump.service
.kdump.service
generates its kdump initrd (based off of current running kernel) and places it alongside the main initramfs and kernel (/boot/ostree/fedora-coreos-$bootchecksum
).kdump.service
loads the kdump initrd and kernel into memory via kexec
./proc/cmdline
changes to e.g. /boot/ostree/fedora-coreos-$newbootchecksum
.kdump.service
detects no kdump initrd exists in /boot/ostree/fedora-coreos-$newbootchecksum
and repeats Step 7 and Step 8.In the above flow, it seems like OSTree/rpm-ostree is not too involved, and most of the work to enable kdump, particularly Step 3, actually involves the First Boot team.
However, Luca also mentioned that something similar to Step 3 can be done through OSTree, as well, thanks to a not-yet-merged PR by Robert.
Another approach would be to just do everything after the switch-root through a systemd unit. I have verified that this works. However, Benjamin mentioned that it is unsafe to reboot from a systemd unit.
/boot
directory? (kdump generates a separate independent initrd in the /boot/ostree/$bootcsum
directory)