postinst.in: do not exit successfully in non-interactive mode
Do not exit successfully when failing to show critical
grub-pc/install_devices_failed and grub-pc/install_devices_empty
prompts in non-interactive mode. This enables surfacing upgrade errors
to the users and/or automation.
Refactor clean_grub_dir to create a backup of all the files, instead
of just irrevocably removing them as the first action. If available,
register on_exit handle to restore the backup if any errors occur, or
remove the backup if everything was successful. If on_exit is not
available, the backup remains on disk for manual recovery.
This allows safer upgrades of MBR & modules, such that
modules/images/fonts/translations are consistent with MBR in case of
errors. For example accidental grub-install /dev/non-existent-disk
currently clobbers and upgrades modules in /boot/grub, despite not
actually updating any MBR. This increases peak disk-usage slightly, by
requiring temporarily twice the disk space to complete grub-install.
Also add modinfo.sh to the cleanup/backup/restore codepath, to ensure
it is also cleaned / backed up / restored.
Signed-off-by: Dimitri John Ledkov <email address hidden>
change version to 2.04-1ubuntu27 (UNRELEASED)
debian/patches/ubuntu-flavour-order.patch:
- Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
flavours as preferred, and specify an order between those preferred
flavours (LP: #1882663)
debian/patches/ubuntu-zfs-enhance-support.patch:
- Use version_find_latest for ordering kernels, so it also supports
the GRUB_FLAVOUR_ORDER setting.
debian/patches/ubuntu-dont-verify-loopback-images.patch:
- disk/loopback: Don't verify loopback images (LP: #1878541),
Thanks to Chris Coulson for the patch
debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
- Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch:
- Merge changes from xnox to fix multiple initrds support (LP: #1878705)
debian/patches/ubuntu-clear-invalid-initrd-spacing.patch:
- Remove, no longer needed thanks to xnox's patch
In case of a botched microcode update, this allows people to
easily roll back.
It will of course break in the more unlikely event that you are
missing a microcode update in your firmware that is needed to boot
the system, but editing the entry to remove an option is easier than
having to figure out the option and add it.