* eoli3n <1907...@bugs.launchpad.net> [2020-12-08 13:30]: > If i run autoinstall with that user-data file, autoinstall doesn't run > and subiquity prompt for language setting. > > #cloud-config > runcmd: > - systemctl daemon-reload > - systemctl restart gdm3 > autoinstall: > version: 1 > packages: > - gdm3 > locale: fr_FR.UTF-8 > user-data: > timezone: Europe/Paris > refresh-installer: > update: yes > identity: > hostname: localhost > username: premier > password: $1$l03JsARH$DCxHdrzUH8SRmeDk3/3rU1 > > If I use that user-data file, runcmd seems not to run at the end of > cloud-config after first reboot. > > #cloud-config > autoinstall: > version: 1 > packages: > - gdm3 > locale: fr_FR.UTF-8 > user-data: > timezone: Europe/Paris > refresh-installer: > update: yes > identity: > hostname: localhost > username: premier > password: $1$l03JsARH$DCxHdrzUH8SRmeDk3/3rU1 > runcmd: > - systemctl daemon-reload > - systemctl restart gdm3 > > How should i use runcmd ?
I think part of this confusion is that subiquity has it's autoinstall format[1], which looks rather similar to cloud-config, but it's the same and depending on *where* you need things to run (say in the installer environment, or on firstboot) then you need to adjust the config structure. I believe if you want to pass a user-data section in the autoinstall file[2]. It would look like this: #cloud-config autoinstall: version: 1 locale: fr_FR.UTF-8 refresh-installer: update: yes user-data: locale: fr_FR.UTF-8 hostname: localhost users: - name: premier gecos: premier passwd: "$1$l03JsARH$DCxHdrzUH8SRmeDk3/3rU1" shell: /bin/bash groups: "admin,sudo" lock_passwd: False packages: - gdm3 timezone: Europe/Paris runcmd: - systemctl daemon-reload - systemctl restart gdm3 The autoinstaller will merge the 'user-data' section of the autoinstall cloud-config it normally generates and then place this config in the target OS so that in first boot cloud init will do all of the things you need. > > FYI, even if i restart gmd3 manually with Fr locale set and generated, > it is still in english. Then only timezone test is ok, if i > restart manually after cloud-config, clock is well configured. Looking at the config I think if you use the user-data key in autoinstall conf you can be sure that all of the required bits (locale, timezone, packages, etc) do what's needed. 1. https://ubuntu.com/server/docs/install/autoinstall-reference 2. https://github.com/CanonicalLtd/subiquity/blob/main/examples/autoinstall-user-data.yaml Ryan -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1907107 Title: cloud-init runs too late at first startup after ubuntu autoinstall To manage notifications about this bug go to: https://bugs.launchpad.net/subiquity/+bug/1907107/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs