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.cfg-boot: use $prefix/kernel instead of $ubuntu-boot/kernel #33

Closed anonymouse64 closed 4 years ago

anonymouse64 commented 4 years ago

Using $prefix/kernel allows us at runtime to not look at the root directory of the ubuntu-boot partition and just use grub as-is mounted at /boot/grub.

Also change the name of the menuentry when we do boot an old kernel through the temporary compatibility mode. This will be removed entirely when snapd is updated to extract kernel assets properly.

The PR's to snapd that will allow us to eliminate the compatibility mode are: https://github.com/snapcore/snapd/pull/7992 and https://github.com/snapcore/snapd/pull/8001. However, we can't merge https://github.com/snapcore/snapd/pull/8001 until this has been merged, otherwise it will fail to boot.