(Semi) Auto Installer Instructions¶
Rather than have to run several dozen commands to install and configure ntp, run this script.
This script is only Semi-Automatic since you'll be needed to confirm some installs and change some config files. If the install fails, either check the log or try running the install manually by following Manual Installation Instructions. If this also fails, check Troubleshooting, Debugging, and More! for help.
You can find a video of the following process here: https://youtu.be/Zn6aIcaM4XM
Create a directory of your choice and place it somewhere where you won't move the files inside since they'll be needed at each boot of the system. Copy ntpAuto.sh, the auto-installer, and ntpConfigBoot.sh, the script to run every boot, into that directory.
Open a terminal and run the following commands to properly start the script:
sudo -i cd <PATH TO THE AUTOSCRIPT FOLDER GOES HERE> chmod 777 ntpAuto.sh ./ntpAuto.sh
At this point, the script will run and begin installing the needed software. This may take some time so feel free to do something else while everything installs, however please note you may be prompted to allow certain packages to install so stay close and check from time to time.
Once the installs are done, the configuration process will begin. This will require you to change a few config files. The first file will be the
minnow-pps-gpio.cfile. When this opens, scroll down slightly and change the “PPS_GPIO” pin number to the proper number for you board. With the GPS lure this number is 340.
Save and exit the file using [Ctrl] + [O], [ENTER], and [CTRL]+[X].
The next file to edit will be the modules file. In this file simply scroll to the bottom and add “pps-gpio”
Save and exit again. The PPS settings will now be set up.
The next file to open will be ntp.conf. In this file edit the lines at the bottom to match:
server 127.127.20.0 mode 18 minpoll 4 maxpoll 4 iburst prefer fudge 127.127.20.0 flag1 1 flag2 0 flag3 0 time2 0.0 stratum 1 server 127.127.22.0 minpoll 1 maxpoll 1 #ATOM (PPS) fudge 127.127.22.0 refid PPS # enable PPS API
Save and exit ntp.conf. Next, the usr.sbin.ntpd file will open. Scroll to the bottom and add “capability ipc_owner“ if it is not already present, and save the file.
Finally rc.local will open. Scroll down to the exit line and press enter to make a new line above it. On this line enter
<FILEPATH TO THE AUTOSCRIPT FOLDER>/ntpConfigBoot.sh. For example, this might be
/home/ubuntu/Desktop/Autoscript/ntpConfigBoot.shif you extracted to your desktop. This is the important file that needs to be kept. If you ever move this file, be sure to update the rc.local file to match as this script autoconfigures the system on startup and is needed to work.
After a reboot, the clock should now be installed and begin honing in on the time. You can run the ntp.sh script (located in the zip file) to automatically check every 15 seconds for the clock values.
If you would like to broadcast this time to your local network, please check Broadcasting the Time.