canonical / pc-gadget

The gadget snap for Personal Computers using 64bit Intel or AMD processors
GNU General Public License v3.0
31 stars 73 forks source link

grub-recovery.conf: don't make run mode default just because ubuntu-boot exists #44

Closed anonymouse64 closed 4 years ago

anonymouse64 commented 4 years ago

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.

xnox commented 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.