kairos icon indicating copy to clipboard operation
kairos copied to clipboard

Supply a valid config.yaml for raw images if users dont

Open Itxaka opened this issue 1 year ago • 2 comments

If you create a raw image and dont provide a config file it will generate a raw image thaqt its fully invalid., You cant loging into it, you cant reset, etc..

We should probably provide a default config that at least sets stuff.

example provided by @dnugmanov

#cloud-config
name: "Default user"
stages:
  initramfs:
    - name: "Set default user/pass"
      users:
        kairos:
          passwd: "kairos"
          groups:
            - "admin"
    - name: "Repart image"
      layout:
        device:
          label: COS_RECOVERY
        add_partitions:
          - fsLabel: COS_STATE
            size: 8000
            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 ]'

Itxaka avatar Nov 19 '24 12:11 Itxaka

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 01 '25 02:06 github-actions[bot]

Some parts of the example config are already handled by Auroraboot: https://github.com/kairos-io/AuroraBoot/blob/226823bdb77fc7018ca17b13c9e5ef78482f034a/pkg/ops/rawDiskGeneration.go#L149

I'm not sure not creating a default user is an issue (if we even do that, needs verification). Maybe they have other ways to supply the config (e.g. cloud-init from cloud provider).

jimmykarily avatar Jun 02 '25 07:06 jimmykarily

we do ship a default one nowadays if users dont.

Itxaka avatar Jul 17 '25 15:07 Itxaka