Package: debian-installer
Severity: important
Tags: d-i
X-Debbugs-Cc: debian-am...@lists.debian.org, jtb....@gmail.com, 
debian-b...@lists.debian.org
User: debian-am...@lists.debian.org
Usertags: amd64
User: debian-b...@lists.debian.org
Usertags: amd64

I've been attempting to use preseeding in order to automatically
partition drives. debian-installer seems to encounter an infinite loop
in partman-auto when expert_recipe is included in the preseeding file.
I've tested this workflow on the Debian 12.10 NetInst CD and Trixie RC1
NetInst CD, and both appear to exhibit the issue.

When the issue is encountered, the console output in the F4 terminal
seems to indicate that the partitions are created quickly. However, the
"primary" installer terminal will remain on the blue screen with no feedback
that an error has occurred. Opening an additional terminal shows that
/var/log/partman is growing quite quickly. The contents don't seem to contain
errors, but that partman is continuing to loop through the different scenarios
(e.g. "I don't have any xfs filesystems to create"). Pressing Ctrl+C
will bring the user back to the main selection menu, but entering back
into the partitioner menu will return the user to the infinite loop.

I am seeing this issue while using the preseed file over an HTTP
server, and trying to run debian-installer on a virtual machine with a
single empty disk.

At the bottom of this email, I've attached a proof-of-concept preseed
file that is as small as I can make it while not requiring the user to
enter anything in order to encounter the problem. Of particular note is
that using this same preseed file with choose_recipe set to 'multi'
works as expected, but pasting that recipe into expert_string (including
\ to make logical lines) exhibits the infinite loop behavior. The recipe in
the POC is a subset of the 'multi' standard recipe. The fact that multi
works leads me to believe that it's an issue with how debian-installer
and partman-auto interact, since otherwise I would expect the 'multi'
recipe to also fail.

Do you all have any ideas for things I can do to help further diagnose
this issue, or suggestions for changes to my preseed file that allow
custom LVM partitioning and don't exhibit the infinite loop behavior?

Thanks for your time, let me know how else I can help,
Justin

#_preseed_V1

## Preamble: not directly related to issue
## Included so debian-installer goes to the issue without manual intervention
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i clock-setup/utc boolean true
d-i time/zone string Etc/UTC
d-i clock-setup/ntp boolean true

## DEMONSTRATES THE ISSUE
d-i partman-auto/method string lvm
# If this is not set, will just use atomic
d-i partman-auto/choose_recipe select lvm-loop-demo
# Abbreviated copy of multi scheme, which does work:
# 
https://salsa.debian.org/installer-team/partman-auto/-/blob/master/recipes-amd64/multi
d-i partman-auto/expert_recipe string \
lvm-loop-demo :: \
 \
1 1 1 free \
        $iflabel{ gpt } \
        $reusemethod{ } \
        method{ biosgrub } . \
 \
768 788 1024 ext4 \
        $defaultignore{ } \
        method{ format } \
        format{ } \
        use_filesystem{ } \
        filesystem{ ext4 } \
        mountpoint{ /boot } . \
 \
7000 7050 100000 $default_filesystem \
        $lvmok{ } \
        method{ format } \
        format{ } \
        use_filesystem{ } \
        $default_filesystem{ } \
        mountpoint{ / } .

## Trailing settings: not directly related to issue
## Included so debian-installer goes to the issue without manual intervention
d-i partman-basicfilesystems/no_swap boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-partitioning/choose_label select gpt
d-i partman-partitioning/default_label string gpt

d-i passwd/root-password password fake-for-test
d-i passwd/root-password-again password fake-for-test
d-i passwd/root-login boolean true
d-i passwd/make-user boolean false

-- System Information:
Debian Release: 13.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.33+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to