Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] System time the kernel method
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Sat Jun 15, 2019 2:34 pm    Post subject: [Solved] System time the kernel method Reply with quote

I was fallowing this method of setting up the sys and hw clocks https://wiki.gentoo.org/wiki/System_time#In-kernel_method
Since I use sysklogd it is recommend to add osclock to the same run level, which I did, but during boot I'm getting:
Code:
The command variable is undefined.
There is nothing for osclock to start.
If this is what you intend, please write a start function.
This will become a failure in a future release.

Yellow warnings. Should I ignore it or what? Does it still necessary to have osclock alongside sysklogd?

Also additional question, I've deleted the fsck from boot, and now I have
Code:
Dynamic Runlevel: needed/wanted
  fsck

In rc-status, what does this runlevel mean, how do I get rid of it?


Last edited by etnull on Mon Jun 17, 2019 1:03 am; edited 2 times in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7368

PostPosted: Sat Jun 15, 2019 5:27 pm    Post subject: Reply with quote

The yellow tells you it's a warning and not fatal, but as the message tells you, it will change in near future, and the yellow will becomes red

The dynamic runlevel "wanted/need" is the level where a service is start because another service need it.
the way to remove fsck is to remove the service that do need it ; well, if you want my opinion, openrc saved you there, what you're doing is not really a good idea.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Sat Jun 15, 2019 6:01 pm    Post subject: Reply with quote

Ok, it seems that a lot of other services require fsck for some reason.. I decided to live it in boot runlevel and will just use 0 0 in my fstab.
My understanding about the yellow warnings is that osclock doesn't do anything, except making other services not to complain about missing hwclock (osclock doesn't start anything), hence the warning, it's kind of a reminder for technically "useless" service. Why should it turn red in the future though?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14957

PostPosted: Sat Jun 15, 2019 7:36 pm    Post subject: Reply with quote

It will become red when it becomes a hard error instead of a warning. According to the output you quoted, the maintainer intends to promote it to a hard error at some point, because your current configuration is useless. Presumably, most people who have that configuration don't intend to have it, so they would welcome a diagnostic telling them that they need to fix their configuration. If you intend for it to do nothing, follow the instructions now, so that it recognizes your intent.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Sat Jun 15, 2019 9:52 pm    Post subject: Reply with quote

Hu wrote:
It will become red when it becomes a hard error instead of a warning. According to the output you quoted, the maintainer intends to promote it to a hard error at some point, because your current configuration is useless. Presumably, most people who have that configuration don't intend to have it, so they would welcome a diagnostic telling them that they need to fix their configuration. If you intend for it to do nothing, follow the instructions now, so that it recognizes your intent.

Which instructions? I did exactly what is recommended in such setup:
Code:
It could however happen hwclock being started as dependency of another rc-service, e.g. sysklogd. In this case the rc-service osclock should be added to the same runlevel as the dependent rc-service.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Mon Jun 17, 2019 1:03 am    Post subject: Reply with quote

I was able to get rid of these warnings by editing the osclock script itself (it's in the /etc/init.d/), by adding:
Code:
start()
{
        return 0
}

I hope it won't break each system update, I don't know why it is not like this by default, in this context the warnings for osclock are useless.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3082

PostPosted: Mon Jun 17, 2019 6:38 am    Post subject: Re: [Solved] System time the kernel method Reply with quote

etnull wrote:
I was fallowing this method of setting up the sys and hw clocks https://wiki.gentoo.org/wiki/System_time#In-kernel_method
Since I use sysklogd it is recommend to add osclock to the same run level, which I did, but during boot I'm getting:

You'd better decide between In-kernel method and OpenRC. 'In-kernel method' does not use runlevels.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Mon Jun 17, 2019 7:48 am    Post subject: Re: [Solved] System time the kernel method Reply with quote

charles17 wrote:
etnull wrote:
I was fallowing this method of setting up the sys and hw clocks https://wiki.gentoo.org/wiki/System_time#In-kernel_method
Since I use sysklogd it is recommend to add osclock to the same run level, which I did, but during boot I'm getting:

You'd better decide between In-kernel method and OpenRC. 'In-kernel method' does not use runlevels.

I think what it means it that the kernel itself will manage RTC and SYS clock and synchronize them upon boot/shutdown, it doesn't synchronize the time itself, for that you would still use ntp, which you run as a service.
Quote:
The Set the RTC time based on NTP synchronization kernel option is currently supported by chrony[1], NTP and OpenNTPD since version 5.9p1[2].

Maybe I understood it incorrectly, but I haven't seen any servers for clock synchronization in the kernel, otherwise from where it would take accurate time?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3082

PostPosted: Mon Jun 17, 2019 10:20 am    Post subject: Re: [Solved] System time the kernel method Reply with quote

etnull wrote:
Maybe I understood it incorrectly, but I haven't seen any servers for clock synchronization in the kernel, otherwise from where it would take accurate time?

What I tried to say is that mentions regarding osclock refers to OpenRC.
It (osclock) is only needed if you use /etc/init.d/hwclock. And if you didn't configure for OpenRC you don't use hwclock.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 288

PostPosted: Mon Jun 17, 2019 10:49 am    Post subject: Re: [Solved] System time the kernel method Reply with quote

I don't, but a lot of other services require it and they start it automatically, osclock prevents this from happening.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3082

PostPosted: Mon Jun 17, 2019 11:42 am    Post subject: Re: [Solved] System time the kernel method Reply with quote

etnull wrote:
I don't, but a lot of other services require it and they start it automatically, osclock prevents this from happening.

Sorry for making confusion. You are right. Already had this discussion almost two years ago.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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