Bug#925531: Preseeding partman-auto/method causes incorrect display of existing partitions
Package: partman-auto
Version: 20170615+deb9u5
Short description of the bug:
Including this line in the preesed file:
d-i partman-auto/method string regular
causes the installer (partman) to incorrectly display the partitions
already present on the disk. Some partitions are not shown at all,
incorrect sizes are displayed and flags shown are wrong.
OS: Debian Stretch (stable at the time of writing)
Arch: amd64
Hardware: Lenovo ThinkCentre M910q (also reproduced on vmWare ESX guest)
Harddisks: 1 nvme disk (also reproduced on virtual vmWare ESX disk)
Netboot setup (I use iPXE and dnsmasq):
kernel: http://ftp.nl.debian.org/debian/dists/stretch/main/installer-
amd64/current/images/netboot/debian-installer/amd64/linux
initrd: http://ftp.nl.debian.org/debian/dists/stretch/main/installer-
amd64/current/images/netboot/debian-installer/amd64/initrd.gz
arguments:
initrd=initrd.gz
vga=normal
auto=true
priority=critical
locale=en_US
bootable
ipv6.disable=1
url=http://<myserver>/<path>/preseed.txt
Existing disk label type: msdos (i.e. not gpt)
To reproduce:
(1) Create this simple two-line preseed.txt file:
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
(2) Boot the installer and when asked, enter some root password, some
username and password.
(3) When 'Partition disks' dialog is shown, select "manual" option.
(4) Partition table shown now is correctly. In (one of) my test case(s):
/dev/nvme0n1 - 256.1 GB Ubknown
#1 primary 100.0 GB B ext4
#2 primary 8.0 GB F swap swap
#5 logical 48.0 GB ext4
#6 logical 20.0 GB ext4
#4 primary 80.1 GB ext4
(5) Now add this line to the preseed.txt file:
d-i partman-auto/method string regular
(6) Without changing any partitions restart installation (e.g. press
ctrl-alt-del).
(7) Arriving at partman's manual partitioning the same way again, the
same partition table is now displayed quite incorrectly:
/dev/nvme0n1 - 256.1 GB Ubknown
#1 primary 247.6 GB f ext4
#5 logical 8.5 GB f ext4
(7) Note this partition information is very different compared to what
was shown (correctly) the first time:
- flags 'B' and 'F' seem to have gone on #1 and #5.
- flag 'f' is shown, but not on the same partitions that had 'B'
and 'F' before.
- Partition #1 now seems to fill the entire disk (size wrong).
- Partition #5 is now shown as swap with a different size.
- Partitions #2 #4 and #6 are not shown at all.
(8) The partition are left correctly on disk by the way: after removing
the "partman-auto/method" line from the preseed file and rebooting
the installer, everything is still fine.
Reply to: