Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting the clock? (SOLVED..TBC)
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
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Fri Aug 28, 2020 6:02 am    Post subject: Setting the clock? (SOLVED..TBC) Reply with quote

What is the best way to set the clock? I have taken the steps to make activate kernel modules for network time sync, but I must be missing the client software.
Would I need to next install the ntp package? And then configure it to synchronize with some server?


Last edited by LIsLinuxIsSogood on Fri Aug 28, 2020 9:34 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Fri Aug 28, 2020 6:20 am    Post subject: Reply with quote

I believe the network time sync in the kernel was for bootp, pxe, or something similar, where network is available at kernel boot. Standard kernel boot is usually slightly different.

If you're using systemd you should set up the builtin systemd-timesyncd (simple ntp client) to get ntp unless you need to distribute time to other machines on your network - in which you probably should run the full ntp.

If you're not using systemd you can use net-misc/ntpclient or the full net-misc/ntp, openntpd, or ntpsec. Pick one.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Fri Aug 28, 2020 7:23 am    Post subject: Re: Setting the clock? Reply with quote

LIsLinuxIsSogood wrote:
What is the best way to set the clock? I have taken the steps to make activate kernel modules for network time sync, but I must be missing the client software.
Would I need to next install the ntp package? And then configure it to synchronize with some server?

Have you seen there is the System time wiki article explaining the In-kernel method and the OpenRC method and an overview of implementations?.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Fri Aug 28, 2020 8:48 am    Post subject: Reply with quote

charles17, I've already looked at it and can make no sense of it at all. I guess I should have mentioned that too already, but it seems at times like these a wiki page like the one on System time (thanks for the link) would present too many options and not enough discussion regarding each one. I am however relieved to hear that I can just go about installing a ntp-client, since I do run openrc. Unfortunately the OpenRC section and In-kernel method sections of the System Time link appear incomplete at least to me.


EDIT:
I am unfortunately unable to find the package net-misc/ntpclient in gentoo repository ???

EDIT:
I did go through with net-misc/ntp installation and the service daemon seems to work fine, I wonder if it might make sense to leave turn on and off this service manually OR just run the program "ntpdate pool.ntp.org" in the future when I notice the clock being off by more than a few seconds. The wiki suggests some potential malicious paths that are opened up by running a ntp service. I will play with it and see what I can figure out.

Thanks for the help, marking it as solved...or to be continued.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Fri Aug 28, 2020 9:45 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
EDIT:
I am unfortunately unable to find the package net-misc/ntpclient in gentoo repository ???

Thanks for the information: https://gitweb.gentoo.org/repo/gentoo.git/log/net-misc/ntpclient
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Fri Aug 28, 2020 9:50 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
... OR just run the program "ntpdate pool.ntp.org" in the future when ...

Do not forget to write hwclock:
Code:
ntpdate pool.ntp.org && hwclock -w
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4152
Location: Bavaria

PostPosted: Fri Aug 28, 2020 9:51 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
I am unfortunately unable to find the package net-misc/ntpclient in gentoo repository ???

You have to emerge the package "ntp", it includes the ntp-client.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3625

PostPosted: Fri Aug 28, 2020 5:55 pm    Post subject: Reply with quote

May be worth reading: Compare...
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sat Aug 29, 2020 12:17 am    Post subject: Reply with quote

If you really don't want to install anything, seems that busybox also has an ntpd variant.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
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