2

I have an Ubuntu 16.04 installation mounted using overlayroot as a read only partition.

I also have a read write partition on the same drive.

I need to be able to change the timezone setting of the PC but without disabling overlayroot. I can see that the timezone is saved in the file /etc/timezone but obviously any changes made with overlayroot active will be lost after reboot.

I tried disabling overlayroot and then deleting the /etc/timezone file and replacing it with a symbolic link with the same name to a timezone file on my Read/Write partition. I thought that any changes to the /etc/timezone file by the operating system might them be saved in the timezone file on my read/write drive. However on testing I see that the GUI time/date setting utility is actually overwriting the symbolic link, and also the RTC seems to get reset to 12:00am.


I've spent a few hours on this and come to understand that the overlayroot-chroot command will allow me to make changes to the underlying read only operating system. I tried using the following ...

sudo overlayroot-chroot
timedatectl set-timezone "Europe/Paris"
exit

This all appears to work at first but after rebooting the time has reset back to the original setting - "Australia/Sydney". After some testing I can see that even after using the 'sudo overlayroot-chroot' command, the timedatectl command is still writing to the overlay filesystem and all changes are lost after rebooting.

I know the chroot is working because I can make permanent changes to files in the /etc/ directory.

Why is timedatectl not able to write into the chroot?

Eliah Kagan
  • 119,640

0 Answers0