[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1114519: When re-using an existing ESP, check it's actually mountable as vfat



Package: partman-efi
Severity: normal
Tags: d-i

Just found in d-i testing on a VM which has been swapped backwards and
forwards between testing BIOS and EFI installations.

On a machine with an existing partition in the right place that
matches our default location for the ESP (1 MiB from the beginning of
the disk), we will end up trying to mount that partition as our new
ESP. If it's *not* a VFAT-formatteD ESP, then things will go badly.

In my particular case, the test failed as it tried to mount an
existing ext4-formatted fs (the rootfs from a previous BIOS-boot
test), and this failed with EINVAL.

We should actually validate that the ESP we're proposing to use is
*actually usable*. It's better to fail up front here with a "this is
not as expected" than later on with a generic "failed" message.

-- System Information:
Debian Release: 12.11
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-38-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled


Reply to: