From ad867dc84985e7f8820a530bd6f0625aefbe389d Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 7 Apr 2025 03:00:07 -0400 Subject: Inject --update for apt to the calamres script which installs grub. Otherwise unless the image is very fresh or there's been no grub update or rebuild, grub fails to install on 404 errors. --- config/hooks/normal/193-calamares-apt-update.chroot | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/hooks/normal/193-calamares-apt-update.chroot diff --git a/config/hooks/normal/193-calamares-apt-update.chroot b/config/hooks/normal/193-calamares-apt-update.chroot new file mode 100644 index 0000000..213def0 --- /dev/null +++ b/config/hooks/normal/193-calamares-apt-update.chroot @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -f /usr/sbin/bootloader-config ];then + grep -- --update /usr/sbin/bootloader-config || sed -i "s/apt-get/apt-get --update/" /usr/sbin/bootloader-config +else + grep -- --update /usr/share/calamares/helpers/calamares-bootloader-config || sed -i "s/apt-get/apt-get --update/" /usr/share/calamares/helpers/calamares-bootloader-config +fi -- cgit v1.2.3