GUIDE - Setting up a RTC on raspberry pi on OMV 4 / Stretch

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GUIDE - Setting up a RTC on raspberry pi on OMV 4 / Stretch

      Hi all,

      I don't really use a RTC on my boards any more as fake-hwclock and the default config seems to work quite well. But a few people have asked me about RTC on OMV 4. So here are the steps that seem to work well for me.

      I am starting with the latest/clean OMV 4 for RPI - from the downloads section of the OMV website.

      1. Install the RTC onto the board - I have an old post that shows where it goes

      Guide for installing a real time clock RTC in a raspberry pi on OMV 3 (jessie)

      2. Add the following to the end of /boot/config.txt - use a good text editor or just use: sudo nano /boot/config.txt

      dtparam=i2c_arm=on
      dtoverlay=i2c-rtc,ds3231

      Before proceeding further, reboot after making this change and check if the RTC has been detected. You should find an entry in the syslog showing that the RTC has been identified/registered. If not, you need to troubleshoot further and it is likely that either the RTC is not installed correctly or wrong driver etc...

      Jun 10 08:43:34 RPI kernel: [4.401953] rtc-ds1307 1-0068: registered as rtc0

      3. Edit the file /lib/udev/hwclock-set: sudo nano /lib/udev/hwclock-set and comment out the following code - this section of code is near the beginning of the file

      #if [ -e /run/systemd/system ] ; then
      # exit 0
      #fi

      4. All that is left to do is to stop/disable fake-hwclock. This is really easy now as it runs as a service. so from the cli over ssh.

      sudo systemctl status fake-hwclock.service - this will tell you that fake-hwclock service is running
      sudo systemctl stop fake-hwclock.service - this will stop the service
      sudo systemctl disable fake-hwclock.service - this will disable the service so it will not start the service at system startup.


      5. reboot the RPI and from the cli check the following.

      sudo hwclock -r - if working this should show the correct time straight after a reboot
      sudo timedatectl status - this command produces a similar output but gives more info

      That's it!
    • It would be helpful to move this post to the Guides section of the forum.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119
    • Users Online 2

      2 Guests