replace_kernel function may optionally call force_boot_without_initramfs
which then can optionally call divert_grub / update-grub / undivert_grub again.
However, I think replace kernel can only work if grub is diverted or was not yet installed. Thus i'm not sure it is a good idea for force_boot_without_initramfs to do divert_grub and to call update-grub.
replace_kernel function may optionally call force_boot_ without_ initramfs
which then can optionally call divert_grub / update-grub / undivert_grub again.
However, I think replace kernel can only work if grub is diverted or was not yet installed. Thus i'm not sure it is a good idea for force_boot_ without_ initramfs to do divert_grub and to call update-grub.