Working in bootmenu

This commit is contained in:
henrov committed 2026-09-08 17:59:24 +02:00
1 parent ec38927eff
commit 27fbde2a76
3 files changed
+2726 -43

No files matched your search

+1300
View File
File diff suppressed because it is too large. Load diff
+1300
View File
File diff suppressed because it is too large. Load diff
+126 -43
View File
@@ -6,20 +6,35 @@
# The selected target disk is COMPLETELY ERASED. # The selected target disk is COMPLETELY ERASED.
# #
# The installer deliberately excludes the USB installer media. # The installer deliberately excludes the USB installer media.
#
# The target disk is partitioned as GPT and contains:
#
# 1 MiB BIOS Boot partition
# 538 MiB EFI System Partition
# ~remaining Linux root filesystem
# 2 GiB swap
#
# The BIOS Boot partition allows GRUB to install when the installer itself
# is booted in legacy BIOS mode.
#
# The EFI System Partition allows GRUB to install when booted in UEFI mode.
############################################################################### ###############################################################################
############################################################################### ###############################################################################
# Debconf # Debconf
############################################################################### ###############################################################################
d-i debconf/priority string critical d-i debconf/priority string critical
############################################################################### ###############################################################################
# Locale # Locale
############################################################################### ###############################################################################
d-i debian-installer/locale string nl_NL d-i debian-installer/locale string nl_NL
############################################################################### ###############################################################################
# Keyboard # Keyboard
############################################################################### ###############################################################################
@@ -29,12 +44,14 @@ d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/variantcode string euro d-i keyboard-configuration/variantcode string euro
d-i keyboard-configuration/ask_detect boolean false d-i keyboard-configuration/ask_detect boolean false
############################################################################### ###############################################################################
# Network # Network
############################################################################### ###############################################################################
d-i netcfg/choose_interface select auto d-i netcfg/choose_interface select auto
############################################################################### ###############################################################################
# Time zone # Time zone
############################################################################### ###############################################################################
@@ -42,6 +59,7 @@ d-i netcfg/choose_interface select auto
d-i clock-setup/utc boolean true d-i clock-setup/utc boolean true
d-i time/zone string Europe/Amsterdam d-i time/zone string Europe/Amsterdam
############################################################################### ###############################################################################
# User # User
############################################################################### ###############################################################################
@@ -51,6 +69,7 @@ d-i passwd/username string av-admin
d-i passwd/user-password password @)av-admin@^ d-i passwd/user-password password @)av-admin@^
d-i passwd/user-password-again password @)av-admin@^ d-i passwd/user-password-again password @)av-admin@^
############################################################################### ###############################################################################
# Hostname # Hostname
############################################################################### ###############################################################################
@@ -58,33 +77,60 @@ d-i passwd/user-password-again password @)av-admin@^
d-i netcfg/get_hostname string audio-kiosk d-i netcfg/get_hostname string audio-kiosk
d-i netcfg/get_domain string d-i netcfg/get_domain string
############################################################################### ###############################################################################
# Partitioning # Partitioning method
############################################################################### ###############################################################################
d-i partman-auto/method string regular d-i partman-auto/method string regular
############################################################################### ###############################################################################
# Dynamically determine the installation disk. # Dynamic installation-disk selection
# #
# list-devices usb-partition identifies partitions belonging to USB devices. # This runs immediately before partman starts.
# Their parent disks are excluded.
# #
# We then select the first non-removable disk. # The installer USB media is deliberately excluded.
# #
# IMPORTANT: # We:
# #
# There is deliberately NO hard-coded /dev/sda fallback. # 1. Ask the installer for all disks.
# If no safe target can be identified, installation stops instead of # 2. Find USB partitions.
# accidentally overwriting the USB installer. # 3. Determine their parent disks using sysfs.
# 4. Exclude those disks.
# 5. Exclude disks marked removable.
# 6. Select the first remaining disk.
#
# No /dev/sda or /dev/vda is hard-coded.
#
# If no safe target exists, installation stops.
############################################################################### ###############################################################################
d-i partman/early_command string \ d-i partman/early_command string \
LOG="/var/log/aamsveen-partition.log"; \
echo "==================================================" > "$LOG"; \
echo "Aamsveen Audio Kiosk - disk detection" >> "$LOG"; \
echo "==================================================" >> "$LOG"; \
echo "" >> "$LOG"; \
echo "Disks reported by list-devices disk:" >> "$LOG"; \
list-devices disk >> "$LOG" 2>&1; \
echo "" >> "$LOG"; \
USB_DISKS=""; \ USB_DISKS=""; \
for USB_PART in $(list-devices usb-partition 2>/dev/null || true); do \ for USB_PART in $(list-devices usb-partition 2>/dev/null || true); do \
USB_PARENT="$(lsblk -ndo PKNAME "$USB_PART" 2>/dev/null || true)"; \ PART_NAME="$(basename "$USB_PART")"; \
if [ -n "$USB_PARENT" ]; then \ PART_SYS="/sys/class/block/$PART_NAME"; \
USB_DISKS="$USB_DISKS /dev/$USB_PARENT"; \ if [ -e "$PART_SYS" ]; then \
PARENT="$(readlink -f "$PART_SYS" 2>/dev/null || true)"; \
while [ -n "$PARENT" ] && [ "$(basename "$PARENT")" != "block" ]; do \
PARENT_NAME="$(basename "$PARENT")"; \
if [ -r "/sys/class/block/$PARENT_NAME/removable" ]; then \
USB_DISKS="$USB_DISKS /dev/$PARENT_NAME"; \
break; \
fi; \
NEXT="$(dirname "$PARENT")"; \
[ "$NEXT" = "$PARENT" ] && break; \
PARENT="$NEXT"; \
done; \
fi; \ fi; \
done; \ done; \
TARGET_DISK=""; \ TARGET_DISK=""; \
@@ -106,48 +152,74 @@ d-i partman/early_command string \
TARGET_DISK="$DISK"; \ TARGET_DISK="$DISK"; \
break; \ break; \
done; \ done; \
echo "USB disks excluded: $USB_DISKS" >> "$LOG"; \
echo "Selected target disk: $TARGET_DISK" >> "$LOG"; \
echo "" >> "$LOG"; \
if [ -z "$TARGET_DISK" ]; then \ if [ -z "$TARGET_DISK" ]; then \
echo "Aamsveen installer ERROR: no safe internal target disk found" \ echo "ERROR: No safe internal target disk found." >> "$LOG"; \
> /var/log/aamsveen-partition.log; \
exit 1; \ exit 1; \
fi; \ fi; \
debconf-set partman-auto/disk "$TARGET_DISK"; \ debconf-set partman-auto/disk "$TARGET_DISK"; \
debconf-set grub-installer/bootdev "$TARGET_DISK"; \ debconf-set grub-installer/bootdev "$TARGET_DISK"; \
echo "Aamsveen installer: USB disks = $USB_DISKS" \ echo "partman-auto/disk = $TARGET_DISK" >> "$LOG"; \
> /var/log/aamsveen-partition.log; \ echo "grub-installer/bootdev = $TARGET_DISK" >> "$LOG"
echo "Aamsveen installer: TARGET disk = $TARGET_DISK" \
>> /var/log/aamsveen-partition.log; \
lsblk -e7 -o NAME,PATH,TYPE,SIZE,RM,RO,TRAN,FSTYPE,MOUNTPOINTS \
>> /var/log/aamsveen-partition.log 2>&1
############################################################################### ###############################################################################
# GPT # GPT partition table
############################################################################### ###############################################################################
d-i partman-partitioning/default_label string gpt d-i partman-partitioning/default_label string gpt
d-i partman-partitioning/choose_label select gpt d-i partman-partitioning/choose_label select gpt
############################################################################### ###############################################################################
# Explicit UEFI partition recipe # Partition recipe
# #
# 512 MiB EFI System Partition # BIOS BOOT:
# remainder root filesystem
# 2 GiB swap
# #
# No separate /boot partition is created. # 1 MiB, no filesystem
# This deliberately keeps the partition layout simple. #
# Required when GRUB is installed in legacy BIOS mode on GPT.
#
# EFI:
#
# 538 MiB FAT32 EFI System Partition
#
# ROOT:
#
# minimum 12 GiB
# priority 30 GiB
# maximum = remaining disk space
#
# SWAP:
#
# 2 GiB
#
# Example on a 32 GiB disk:
#
# BIOS Boot 1 MiB
# EFI 538 MiB
# swap 2 GiB
# / ~29 GiB
############################################################################### ###############################################################################
d-i partman-auto/expert_recipe string \ d-i partman-auto/expert_recipe string \
aamsveen-uefi :: \ aamsveen-uefi :: \
1 1 1 biosgrub \
$iflabel{ gpt } \
$primary{ } \
method{ biosgrub } \
. \
538 538 538 fat32 \ 538 538 538 fat32 \
$iflabel{ gpt } \ $iflabel{ gpt } \
$primary{ } \ $primary{ } \
$reusemethod{ } \ $bootable{ } \
method{ efi } \ method{ efi } \
format{ } \ format{ } \
mountpoint{ /boot/efi } \
. \ . \
8192 8192 -1 ext4 \ 12288 30000 -1 ext4 \
$primary{ } \ $primary{ } \
method{ format } \ method{ format } \
format{ } \ format{ } \
@@ -157,22 +229,28 @@ d-i partman-auto/expert_recipe string \
. \ . \
2048 2048 2048 linux-swap \ 2048 2048 2048 linux-swap \
$primary{ } \ $primary{ } \
$reusemethod{ } \
method{ swap } \ method{ swap } \
format{ } \ format{ } \
. .
d-i partman-auto/choose_recipe select aamsveen-uefi
############################################################################### ###############################################################################
# Remove existing storage configuration # Select recipe
###############################################################################
d-i partman-auto/choose_recipe select aamsveen-uefi
###############################################################################
# Remove existing LVM / RAID configuration
############################################################################### ###############################################################################
d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true d-i partman-md/device_remove_md boolean true
############################################################################### ###############################################################################
# Do not preserve old partitions # Completely replace existing partition table
############################################################################### ###############################################################################
d-i partman-partitioning/confirm_write_new_label boolean true d-i partman-partitioning/confirm_write_new_label boolean true
@@ -180,42 +258,47 @@ d-i partman/choose_partition select finish
d-i partman/confirm boolean true d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true d-i partman/confirm_nooverwrite boolean true
###############################################################################
# UEFI
###############################################################################
d-i partman-efi/non_efi_system boolean true
############################################################################### ###############################################################################
# Filesystem # Filesystem mounting
############################################################################### ###############################################################################
d-i partman/mount_style select uuid d-i partman/mount_style select uuid
############################################################################### ###############################################################################
# Bootloader # Bootloader
#
# The actual target disk is supplied dynamically by partman/early_command.
############################################################################### ###############################################################################
d-i grub-installer/only_debian boolean true d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean false d-i grub-installer/with_other_os boolean false
# The exact disk is supplied dynamically by partman/early_command.
d-i grub-installer/bootdev string default d-i grub-installer/bootdev string default
###############################################################################
# Third-party software / codecs
###############################################################################
d-i ubiquity/use_nonfree boolean true
############################################################################### ###############################################################################
# Ubiquity # Ubiquity
############################################################################### ###############################################################################
ubiquity ubiquity/summary string ubiquity ubiquity/summary note
ubiquity ubiquity/confirm-partitioning boolean true ubiquity ubiquity/confirm-partitioning boolean true
ubiquity ubiquity/reboot boolean true ubiquity ubiquity/reboot boolean true
############################################################################### ###############################################################################
# Installation behaviour # Installation media
############################################################################### ###############################################################################
d-i cdrom-detect/eject boolean false d-i cdrom-detect/eject boolean false
############################################################################### ###############################################################################
# Finish # Finish
############################################################################### ###############################################################################