Boot method: CD
Image version: debian-bullseye-DI-rc2-amd64-netinst.iso
Date: 2021-06-21 20:00 CEST
Machine: KVM VM
Partitions: <df -Tl will do; the raw partition table is preferred>
root@debian:~# df -Tl
Filesystem Type 1K-blocks Used Available Use% Mounted on
udev devtmpfs 483524 0 483524 0% /dev
tmpfs tmpfs 99964 580 99384 1% /run
/dev/vda1 ext4 15405420 1140920 13460148 8% /
tmpfs tmpfs 499804 0 499804 0% /dev/shm
tmpfs tmpfs 5120 0 5120 0% /run/lock
tmpfs tmpfs 99960 0 99960 0% /run/user/1000
root@debian:~#
Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it
Initial boot: [O ]
Detect network card: [O ]
Configure network: [O ]
Detect media: [O ]
Load installer modules: [O ]
Clock/timezone setup: [O ]
User/password setup: [O ]
Detect hard drives: [O ]
Partition hard drives: [E ]
Install base system: [O ]
Install tasks: [O ]
Install boot loader: [O ]
Overall install: [O ]
Comments/Problems:
This was a preseeded install to demonstrate an issue with preseeding.
The test VM has TWO virtio hard disks and the virtual CD drive the
machine was booted from. The preseed file was manually given on the
installer command line as preseed/url=http://... and did NOT contain a
"d-i partman-auto/disk" setting.
The installation guide for buster says in chapter B.4 "Partitioning":
# Alternatively, you may specify a disk to partition. If the system has only
# one disk the installer will default to using that, but otherwise the device
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
# and not e.g. /dev/discs/disc0/disc).
# For example, to use the first SCSI/SATA hard disk:
#d-i partman-auto/disk string /dev/sda
The buster installer and also the bullseye installer that is the subject
of this report behave as documented and stop at the partitioning stage
and explicitly ask the user for the partitioning method and the disk to
install.
It is necessary to set
d-i partman-auto/disk string /dev/vda
to get a truly non-interactive install.
Also, removing the second virtio hard disk makes the install go
through non-interactively without d-i partman-auto/disk being set.
This is 100 % as documented.
The issue I would like you to consider is the case when the Installer is
booted from an USB stick (which doesn't work for a VM, hence this bug
report with the second hard disk to demonstrate). The USB stick gets
assigned /dev/sdb and triggers the issue as described here. It is thus
not possible to have a truly non-interactive install booted from an USB
stick wihtout explicitly specifying whether to install to /dev/sda.
This, however, makes it harder to test such installer images in VMs
because in a VM, the disk is /dev/vda and not /dev/sda, causing an
installation abort because the disk is not found.
I think this can possible be solved by expanding the partman-auto/disk
option to take a list of devices, like "/dev/sda /dev/vda", installing
to the first device that is actually found on the system.
Or a new partman-auto preseed option could be invented to blindly
install to the first disk found regardless of whether it's the only disk
or not.
Special-casing the medium from which the system was booted is probably
not a good idea because there are usecases where I actually boot the
installer from the target disk.
I am open for discussions about how to address this. For the time being,
I can live with the nuisance of having two different images for VM and
bare metal installs. If there is an easier way, please tell me.
Greetings
Marc