x86: remove bootloader upgrade from preinit

This hack was to bring all existing installations to the newest GRUB
version as fast as possible. Since 19.07.x is EoL we can assume this
task is completed. Now sysupgrade will solely be responsible for
bootloader upgrade.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
This commit is contained in:
Tomasz Maciej Nowak 2023-01-23 14:44:49 +01:00 committed by Hauke Mehrtens
parent be0f1c1b26
commit 909cc6ef5f
2 changed files with 1 additions and 20 deletions

View File

@ -1,18 +0,0 @@
upgrade_bootloader() {
local diskdev
. /lib/upgrade/common.sh
if [ ! -f /boot/grub/upgraded ] && export_bootdevice && export_partdevice diskdev 0; then
part_magic_efi "/dev/$diskdev" && return 0
echo "(hd0) /dev/$diskdev" > /tmp/device.map
/usr/sbin/grub-bios-setup \
-m "/tmp/device.map" \
-d "/boot/grub" \
-r "hd0,msdos1" \
"/dev/$diskdev" \
&& touch /boot/grub/upgraded
fi
}
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main upgrade_bootloader

View File

@ -62,8 +62,7 @@ platform_do_bootloader_upgrade() {
-m "/tmp/device.map" \
-d "/tmp/boot/boot/grub" \
-r "hd0,${parttable}1" \
"/dev/$diskdev" \
&& touch /tmp/boot/boot/grub/upgraded
"/dev/$diskdev"
umount /tmp/boot
fi