#1005729 Automatic partitioning fails on arm64 d-i with error message partman: mkfs.vfat: Not enough or too many clusters for filesystem

Package:
src:partman-efi
Source:
partman-efi
Submitter:
Thomas Glanzmann
Date:
2022-02-14 03:54:03 UTC
Severity:
normal
Tags:
#1005729#5
Date:
2022-02-14 03:51:05 UTC
From:
To:
Hello,
when installing Debian on an arm64 m1 machine, I get the following error during
auto partitioning or when creating a EFI System Partition with more than 256 MB:

partman: mkfs.vfat: Not enough or too many clusters for filesystem - try less or more sectors per cluster

When I try to manually create mkfs.vfat on the same system it works:

(air) [~] lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 465.9G  0 disk
├─nvme0n1p1 259:1    0   500M  0 part
├─nvme0n1p2 259:2    0 371.6G  0 part
├─nvme0n1p3 259:3    0   2.3G  0 part
├─nvme0n1p4 259:4    0     1G  0 part /boot/efi
├─nvme0n1p5 259:5    0  85.5G  0 part /
└─nvme0n1p6 259:6    0     5G  0 part
nvme0n2     259:7    0     3M  0 disk
nvme0n3     259:8    0   128M  0 disk
(air) [~] umount /boot/efi
(air) [~] mkfs.vfat /dev/nvme0n1p4
mkfs.fat 4.2 (2021-01-31)
(air) [~] mkfs.vfat -F 16 /dev/nvme0n1p4
mkfs.fat 4.2 (2021-01-31)

The sector size is report as 4096:

(air) [~] blockdev --getss /dev/nvme0n1
4096

The issue seems to be related to:

https://sources.debian.org/src/partman-efi/94/commit.d/format_efi/?hl=15#L66

Since mkfs.vfat don't have issue with creating file systems on block devices
with a sector size other than 4096, it is probably best to remove the whole code
block that sets the sectors per cluster and sector size. Find attached a patch.