Merge pull request #9207 from anonymouse64/bugfix/uc20-reboot-kernel-fallback-initramfs
boot/bootstate20: reboot to rollback to previous kernel
We currently have a bug where we when we go to try a kernel snap revision that
was booted, if it fails verification somehow in the initramfs, we decide to
mount the old kernel snap even though we are running the new kernel snap. This
is problematic for things like kernel modules and firmware which are not
guaranteed to be compatible across kernel snap revisions.
The correct thing to do, which this commit implements, is to request a reboot
from the initramfs when we encounter this situation, as this will indicate to
the bootloader that the boot of the new kernel snap failed and that it should
rollback and boot the old kernel, in which case we will make the correct and
obvious choice in the initramfs to mount/use the old kernel, which fixes the
bug.