bengalih
Senior Member
So I was able to cut 100 seconds off my boot time by fixing up some things with my configuration.
The delay was coming from the disk-check script that is executed in pre-mount:
pre-mount
disk-check
My problem was that my WAN connection doesn't get enabled until *after* disk mount because I use wpa_supplicant stored on the drive to do authentication.
Initially I had just removed the timer, but then I found a cleaner way to sync to a local time server and set ntp_ready to 1 fore the disk-check regardless (then put it back to 0 afterwards in a post-mount to allow the system to continue as normal).
Anyway - I was curious why the ntp sync is so important here to block for almost 2 minutes? Had I no local timesync server (and even now, it is possible that the sync will fail for any number of reasons), the process would still continue after 100 seconds regardless if time was synced or not. So, clearly it isn't an imperative, but I'd like to know why is is so important here?
thanks.
The delay was coming from the disk-check script that is executed in pre-mount:
pre-mount
Code:
#!/bin/sh
. /jffs/addons/amtm/disk-check # Added by amtm
Code:
while [ "$(nvram get ntp_ready)" = "0" ] && [ "$ntptimer" -lt "$ntptimeout" ]; do
ntptimer=$((ntptimer+1))
sleep 1
done
My problem was that my WAN connection doesn't get enabled until *after* disk mount because I use wpa_supplicant stored on the drive to do authentication.
Initially I had just removed the timer, but then I found a cleaner way to sync to a local time server and set ntp_ready to 1 fore the disk-check regardless (then put it back to 0 afterwards in a post-mount to allow the system to continue as normal).
Anyway - I was curious why the ntp sync is so important here to block for almost 2 minutes? Had I no local timesync server (and even now, it is possible that the sync will fail for any number of reasons), the process would still continue after 100 seconds regardless if time was synced or not. So, clearly it isn't an imperative, but I'd like to know why is is so important here?
thanks.
Last edited: