SwapVolumeConfig on system disk causes boot failure
Bug Report
Description
With a SwapVolumeConfig like so (in theory, the encryption shouldn't matter, but that could be a cause as well):
apiVersion: v1alpha1
kind: SwapVolumeConfig
name: swap1
provisioning:
diskSelector:
match: system_disk
minSize: 2GiB
maxSize: 2GiB
encryption:
provider: luks2
keys:
- kms:
endpoint: <removed>
slot: 0
The installation works fine on first boot, but after a cold boot/hard restart (outside of Talos), the system is unable to boot and is kicked into a GRUB recovery menu.
Logs
No logs are present as the boot process is interrupted. The swap partition seems to be created at the beginning of the disk, and the prior GRUB config likely targets the wrong partition after.
Environment
- Talos version: v1.12.0-beta.0
- Kubernetes version: v1.33.5
- Platform: Generic Cloud
Would you be able to get the console logs when talos is getting installed and rebooted? Also doesn't the provider offer UEFI?
I wonder if it's not related to swap at all, but rather any cold reboot doesn't work for you?
Would you be able to get the console logs when talos is getting installed and rebooted? Also doesn't the provider offer UEFI?
I have not tried UEFI - I'll give that a try. In any case, this setup should still work with BIOS/Legacy as well.
I wonder if it's not related to swap at all, but rather any cold reboot doesn't work for you?
No, the issue I'm facing only occurs when I have that SwapVolumeConfig applied. Looking at the disk partitions, the swap partition is the first one, so I assume GRUB ends up targeting the wrong partition.