Sunday, 15 February 2015

Automatically setting the date/time on Snappy Ubuntu Core

The Raspberry Pi 2 doesn't come with an RTC by default, so when your OS boots it doesn't know what time it is and it defaults to 1970. This breaks all kinds of things, including SSL connections. Here is how to install ntpdate, which will set the correct time on startup (assuming your RPi has network connectivity).

First download the required deb file to your desktop and scp them over to your RPi:

Then on the RPi remount the system partition read-write and install the packages:
sudo mount -o remount,rw /
sudo dpkg -i *.deb
sudo mount -o remount,ro /

Now reboot and once done, check with the date command if your system thinks it's 2015. The time will be in UTC, but for most servers that's actually what you want.

Have fun!

No comments: