Grub found non-existent partitions and the system stopped booting

I’ve managed to boot into my system. I’ve made so by removing os-prober in grub settings (setting the GRUB_DISABLE_OS_PROBER in /etc/default/grub to true) and running update-grub in a chroot from live-cd. But that actually doesn’t seem like the right solution.