Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Raspberry Pi ntpdate and systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Tue Sep 02, 2014 11:28 pm    Post subject: [SOLVED] Raspberry Pi ntpdate and systemd Reply with quote

I am having a Raspberry Pi installed with Gentoo/Linux 3.12.26 and systemd.

Although my setup includes timedatectl set-ntp true the time is not set properly after a reboot. I am getting my login banner before I get a message saying my eth0 interface is up and running. So, I guess the network time synchronization never occured when it was supposed to and even if ntpd is running the more than 44 years out synchronization prevents any synchronization to occurs at this point.

How am I supposed to setup systemd to make sure the network interface is up, then time is syncd and after that the boot procedure can continue?

Manually I have to do either:

Code:
# timedatectl set-ntp false
# ntpdate mysynchost
# timedatectl set-ntp true


or

Code:
# systemctl start ntpdate
# systemctl daemon-reload


This is beside the fact many files are created with a timestamp starting 1970-01-01 00:00:00 UTC.

This is annoying.

Any hints?
_________________
Achille Talon Hop!


Last edited by AchilleTalon on Mon Sep 08, 2014 5:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Tue Sep 02, 2014 11:58 pm    Post subject: Reply with quote

Have you tried enabling ntpdate.service?
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Wed Sep 03, 2014 1:24 am    Post subject: Reply with quote

Yes, it doesn't work neither. In fact, setting timedatectl set-ntp true is supposed to do that.

However, this time I am getting an error in the journal saying it cannot find the hosts, I guess this happens since the interface initialisation is not completed or has not even yet started when the command is issued. The name resolution is not yet active, I must conclude the dhcp protocol has not provided yet an address, gateway and DNS to the interface.


It is really something with the order things happen. I am getting the message the interface after the initialisation is completed and I have gotten the login banner. The interface should have been initialised way before that.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Mon Sep 08, 2014 5:26 pm    Post subject: Reply with quote

The problem resolved itself. Maybe some piece of software was still hanging around since the only thing I did is to do an emerge --depclean.

The only time the problem reappear, is when I overwrite my system image with my backup image and boot the first time. After setting the time and date, it holds, even if I shutdown and unplug the Raspberry Pi.

I really don't know what exactly solved the problem and cannot be useful to anyone that may encounter a similar problem in the future.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum