7

I'm installing 20.04 with an Automated Server Install, but I can't see where to put the timezone?

By default it is installing as Etc/UTC but I want something else.

After installing I checked /var/log/installer/autoinstall-user-data and there doesn't seem to be a timezone entry.

And the config reference doesn't mention timezones either.

muru
  • 207,228

3 Answers3

10

The Ubuntu Automated Server Installs Config File Reference describes the cloud-init user-data top level key.

timezone is supported in the user-data timezone module which is documented further in the cloud-init docs.

user-data:
  timezone: Pacific/Auckland

From Discourse - Please Test Autoinstalls Post #85

4

Try a late command

late-commands
type: command list
default: no
commands can be interactive: no

Shell commands to run after the install has completed successfully and any updates and packages installed, just before the system reboots. They are run in the installer environment with the installed system mounted at /target. You can run curtin in-target -- $shell_command (with the version of subiquity released with 20.04 GA you need to specify this as curtin in-target --target=/target -- $shell_command) to run in the target system (similar to how plain in-target can be used in d-i preseed/late_command).

Example:

curtin in-target --target=/target -- timedatectl set-timezone America/New_York

user535733
  • 68,493
1

I encountered this issue and attempted the late command however after booting the installed system the clock remained GMT. The "timedatectl set" only worked for me after the system was installed and not through the automated install process. I substituted the timedatectl command with the following command and was able to get my clock switched to my local timezone:

curtin in-target --target=/target -- cp /usr/share/zoneinfo/America/Chicago /etc/localtime

Gene Soo
  • 41
  • 4