-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting CONFIG_NTP_MODE=0 (in order to then install chrony) makes initial install fail #6986
Comments
Actually the time sync mode configured in At which stage exactly did it fail? Otherwise, I suggest to leave NTP mode untouched for first boot and then apply it with the automation script. You can use this command after chrony was installed: /boot/dietpi/func/dietpi-set_software ntpd-mode 0 |
To reproduce minimally i loaded the image fresh from the dietpi website: No worries about the password in the config, it's public / randomized on build: ssh into the image and it shows this: Choosing take over and cancel to investigate the state of the image:
The logs don't seem to be very useful:
dietpi-firstboot.log: Anything else in regards to logs i can get you? Edit: |
That will be a perfectly good work-around for the usecase in question. |
The early setup steps all succeded. Is there some |
Not that i can see:
|
dietpi-update stage 0 log: http://sprunge.us/oiBnJG To get the log i added logging to this line: https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-login#L188 systemd-timesyncd systemd service seems to only runs after that first dietpi-update (it does run as the journal shows and it hasn't yet run because the time isn't set yet) |
stage0 dietpi-update will fail for CONFIG_NTP_MODE=0 due to wrong time set on first boot. In mode 0 the user is expected to take care of time sync but that is not possible on first boot. Unconditionally sync time before stage0 dietpi-update to fix this issue. Fixes: MichaIng#6986
Yeah that approach didn't work because it doesn't wait for network / wait for timesync success. (the commit above that references the issue that wasn't really ready) It's quite tricky to add some sort of exception for In regards to the logging i've tested some simple changes and made a PR but feel free to just close the PR and add logging as you see fit :) |
Weird: In the journalctl log it shows that the time was correctly set:
But during the APT update, it is at an older time. As if it somehow got set back later. EDIT: Ah right, because it is already set to mode 0, it is not waiting for the time sync. Okay indeed this is not optimal: The systemd-timesyncd service is disabled later after But in general, it actually also makes sense to set the time sync mode to 0 only after an additional time sync daemon has been installed, not before. Probably best is to better/clearer split For this particular case we could also force the updater to wait for timesyncd only during first boot. Just as you suggested. |
Well the issue with this option is that settings 1-4 are perfectly valid to set before first boot, just option 0 is not. |
Creating a bug report/issue
Required Information
G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=2 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng'
bookworm 0
Linux adsb-feeder 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
RPi 4 Model B (aarch64)
Additional Information (if applicable)
YES
Steps to reproduce
chrony
for better time sync when tracking ADS-B planesCONFIG_NTP_MODE=0
in dietpi.txt (so that we can installchrony
in theAutomation_Custom_Script.sh
)Expected behaviour
CONFIG_NTP_MODE=0
right after network is brought up, DietPi should get the current time from NTP and then continue the initial setup with the correct time so things completechrony
chrony
noninteractively in a way that changes the CONFIG_NTP_MODE. If there's a way to do that, we haven't found the documentation for thatActual behaviour
Mentions
@wiedehopf
The text was updated successfully, but these errors were encountered: