From 6b7920944f822709a7bc4e18ffb7d1e8228c57b8 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Wed, 7 Feb 2024 12:33:55 -0500 Subject: [PATCH] ubiquity: Avoid the need for a custom cdrom:// repo --- helpers/DATA/ubiquity/grub-installer.patch | 185 +++++++++++++++++++++ helpers/make-ubiquity | 7 +- 2 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 helpers/DATA/ubiquity/grub-installer.patch diff --git a/helpers/DATA/ubiquity/grub-installer.patch b/helpers/DATA/ubiquity/grub-installer.patch new file mode 100644 index 0000000..d5b9595 --- /dev/null +++ b/helpers/DATA/ubiquity/grub-installer.patch @@ -0,0 +1,185 @@ +--- a/d-i/source/grub-installer/grub-installer 2023-03-30 01:19:52.000000000 -0400 ++++ b/d-i/source/grub-installer/grub-installer 2024-01-31 16:58:52.789037161 -0500 +@@ -266,7 +266,7 @@ + esac + } + +-# by-id mapping copied from grub-pc.postinst. ++# by-id mapping copied from grub-pc-bin.postinst. + + cached_available_ids= + available_ids() +@@ -492,12 +492,12 @@ + # This point can't be reached (yet). See debian/isinstallable. + grub_package="grub-efi" + else +- grub_package="grub-pc" ++ grub_package="grub-pc-bin" + fi + ;; + i386/efi|amd64/efi) + if [ -f /var/lib/partman/ignore_uefi ]; then +- grub_package="grub-pc" ++ grub_package="grub-pc-bin" + else + grub_package="grub-efi-amd64-signed" + if [ ! -d /target/boot/efi ]; then +@@ -505,13 +505,13 @@ + # believed this to be unnecessary, perhaps because we're + # installing on a pre-existing MBR partition table or + # perhaps because there's a BIOS Boot Partition. In either +- # case, the right answer is to fall back to grub-pc. +- grub_package="grub-pc" ++ # case, the right answer is to fall back to grub-pc-bin. ++ grub_package="grub-pc-bin" + fi + fi + ;; + i386/*|amd64/*) +- grub_package="grub-pc" ++ grub_package="grub-pc-bin" + ;; + powerpc/*) + grub_package="grub-ieee1275" +@@ -524,7 +524,7 @@ + grub_package="grub-yeeloong" + ;; + *) +- grub_package="grub-pc" ++ grub_package="grub-pc-bin" + esac + + case $ARCH:$grub_package in +@@ -622,12 +622,12 @@ + (! db_get debian-installer/splash || [ "$RET" = true ]); then + defopt_params=${defopt_params:+$defopt_params }splash + fi +-if [ "$grub_package" = grub-pc ]; then ++if [ "$grub_package" = grub-pc-bin ]; then + # Empty this for now to stop it being asked. We'll fix this up later. + # (quoting to deconfuse vim) + $chroot $ROOT 'debconf-set-selections' <$ROOT/boot/grub/$menu_file.new + mv $ROOT/boot/grub/$menu_file.new $ROOT/boot/grub/$menu_file + ;; +- grub-pc|grub-efi*) ++ grub-pc-bin|grub-efi*) + if grep -q "^GRUB_TERMINAL=" $ROOT/etc/default/grub; then + sed -i $ROOT/etc/default/grub -e "s/^\(GRUB_TERMINAL\)=.*/\1=serial/g" + else diff --git a/helpers/make-ubiquity b/helpers/make-ubiquity index 034afd4..ee5a92a 100644 --- a/helpers/make-ubiquity +++ b/helpers/make-ubiquity @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011-2023 Ruben Rodriguez +# Copyright (C) 2011-2024 Ruben Rodriguez # Copyright (C) 2019 Mason Hock # # This program is free software; you can redistribute it and/or modify @@ -18,10 +18,13 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=34 +VERSION=35 . ./config +# Avoid the need for a custom cdrom:// repo +patch --no-backup-if-mismatch -p1 < $DATA/grub-installer.patch + # Disable confirmation popups, as they are innacurate and buggy patch --no-backup-if-mismatch -p1 < $DATA/no_confrirmation_when_crypto.patch