Open Itxaka opened 2 hours ago
You need to create partition before resetting, your disk should have enough free space in the end of the disk where COS_RECOVERY
is located or separate disk.
I am using:
- name: "Repart image"
layout:
device:
label: COS_RECOVERY
add_partitions:
- fsLabel: COS_STATE
size: 50000 <-- adjust this.
pLabel: state
- fsLabel: COS_PERSISTENT
pLabel: persistent
size: 0
filesystem: "ext4"
- name: "Deploy kairos"
commands:
- kairos-agent --debug reset --unattended
- touch /usr/local/.deployed
- reboot
if: '[ -f "/run/cos/recovery_mode" ] && [ ! -e /usr/local/.deployed ]'
yeah, this used to work automatically without the need for creating the partition, as the reset would recreate it. There is even a comment on the reset part as we could not remember where the state recreation was needed for: https://github.com/kairos-io/kairos-agent/blob/main/pkg/action/reset.go#L119
Reset fails in arm images because it cant find the state partition. But on RAW images we only ship the recovery and oem partition so this doesnt work.