Closed anonymouse64 closed 4 years ago
Ok this is buggy. But then there is inverse issue.
snap prepare image does not create grubenv file for the very first boot. And we default to install mode. If grubenv is corrupted or non existent, I was using presence of boot partition to still go into run mode instead of "wiping all of your data" mode.
For the case of re-installing or recovering, we will still have the ubuntu-boot partition around, but we explicitly don't want to make run mode the default here because we will have snapd_recovery_system set and snapd_recovery_mode set too, and so grub should use that.