Did you give the correct --initrd= to kexec?
I just installed and tried kexec. It works if I go
kexec -l /boot/vmlinuz --initrd=/boot/initrd.img --append=root=/dev/sda3
And then kexec -e. (i have no ecryption...)
I first tried to follow the hint "use /proc/cmdline" but that did not work. To me it looks like you have to give the --initrd= option extra.
You need the "initramfs prompt" to give the password (so you can mount the encrypted device) ?
Normally my /proc/cmdline looks like this
vmlinuz initrd=initrd.cpio.gz root=/dev/sda3
After above kexec (and reboot) /proc/cmdline looks like this
root=/dev/sda3
The name of kernel and initrd are gone! Only the --append part is left. This does not even confuse me too much: just adds a new facette to the question: are kernel image and initrd image kernel options? Are they part of the (kernel) command line ?
I use uefi shell to boot. I know how important this "initrd=" is. With a boot loader (grub) it should work the same. It is just a different way (indirect) to choose a kernel, a initrd (if needed/wanted), a root, a init and all the normal "kernel options"
A standard initrd does this:
load modules to access root (my case: sata, ahci for my SIMPLE SSD drive)
mount that device (given by root=/dev/xxx)
"switch_root" to it (includes running /sbin/init)
In your case you need a password prompt (?), and not a sata-module. But the result is the same: root cannot be mounted.
Find out how your boot loader successfully boots, and then try to imitate that with kexec.
added:
the initrd (names don't matter...) is started by default with the /init script (check out the rdinit= boot option). This is "early userspace", corresponding to earlyshell. It looks like with this initramfs-tool you got enough breakpoints to control /init and the scripts that get called.
Otherwise one could extract that initrd (with gzip and cpio), change /init (or add /init_new and go rdinit=/init_new as boot option), and archive the folders again. This cpio command I had never used before, but it is actually simpler than tar. Just a bit different.
mkinitcpio is a tool for that. It mentions both early userspace and encryption right at the start. It is, I just read, a archlinux thing and also has late and early "hooks". Same function as initramfs-tools, I guess.