-
Notifications
You must be signed in to change notification settings - Fork 38
Description
From https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1991554:
I modified the Ubuntu Server image so the root partition is encrypted. Since the Raspberry Pi 4b does not have hardware acceleration for AES I use adiantum for encryption. To take full advantage of its advertised performance gains, I used '--sector-size 4096' with cryptsetup. A requirement for this parameter to work is that the containing partition is aligned, at its start and end, to sector counts evenly divisible by 8.
When unlocking the partition, cryptsetup does apperently check if partition boundaries are evenly divisible by 8. On the first boot this is true, for any consecutive it is not. To me it seems cloud-init resizes the root partition (through growpart) to the maximum size possible. Sadly by doing so it interferes with the peculiar alignment requirements of cryptsetup.
It would be great if the root partition could end at an 1MiB boundary after resize.
In order for cloud-init to do this, growpart would need to support ending at a particular boundary, which I currently see no flags to make that happen.