diff --git a/iso/debian12/preseed.cfg b/iso/debian12/preseed.cfg index e97da42..3f46346 100644 --- a/iso/debian12/preseed.cfg +++ b/iso/debian12/preseed.cfg @@ -9,10 +9,6 @@ ## -# Collect and store information from user -d-i partman/early_command string \ - sh /cdrom/debconf_early - # Copy some things before running bootstrap d-i preseed/late_command string \ lvm lvremove sys/scratch --yes \ @@ -28,10 +24,15 @@ d-i preseed/late_command string \ # Finicky bits ## -# Use nvme0n1 if available else assume sda -d-i partman/late_command string \ - if [ -e /dev/nvme0n1 ]; then disk=/dev/nvme0n1; else disk=/dev/sda; fi; \ - debconf-set partman-auto/disk "$disk"; echo "Disk Selected: $disk" +# Collect information from user using debconf template +# Use nvme0n1 if available, else vda, else assume sda +d-i partman/early_command string \ + sh /cdrom/debconf_early \ + && if [ -e /dev/nvme0n1 ]; then disk=/dev/nvme0n1; \ + elif [ -e /dev/vda ]; then disk=/dev/vda; \ + else disk=/dev/sda; fi \ + && debconf-set partman-auto/disk "$disk" \ + && dd if=/dev/zero of="$disk" count=1024 count=2 ## diff --git a/iso/debian12/preseed_test.patch b/iso/debian12/preseed_test.patch index 7e9cc87..7173c64 100644 --- a/iso/debian12/preseed_test.patch +++ b/iso/debian12/preseed_test.patch @@ -1,8 +1,8 @@ -153c153 +154c154 < d-i netcfg/dhcp_options select Configure network manually --- > #d-i netcfg/dhcp_options select Configure network manually -227c227 +228c228 < #d-i finish-install/reboot_in_progress note --- > d-i finish-install/reboot_in_progress note