All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] systemd: Avoid fsck because time is out of sync on first boot.
@ 2017-11-22 13:30 Kristian Amlie
  2017-11-23 12:13 ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Kristian Amlie @ 2017-11-22 13:30 UTC (permalink / raw)
  To: openembedded-core

By default, systemd uses its build time as the epoch. When systemd is
launched on a system without a real time clock, this time will be
detected as in the future and an fsck will be done.  Setting this to 0
results in an epoch of January 1, 1970 which is detected as an invalid
time and the fsck will be skipped.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
---
 meta/recipes-core/systemd/systemd_234.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 6b8745b..86c04fe 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -170,6 +170,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
                  --with-firmware-path=${nonarch_base_libdir}/firmware \
+                 --with-time-epoch=0 \
                "
 # per the systemd README, define VALGRIND=1 to run under valgrind
 CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] systemd: Avoid fsck because time is out of sync on first boot.
  2017-11-22 13:30 [PATCH v1] systemd: Avoid fsck because time is out of sync on first boot Kristian Amlie
@ 2017-11-23 12:13 ` Burton, Ross
  2017-11-23 12:34   ` Kristian Amlie
  0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2017-11-23 12:13 UTC (permalink / raw)
  To: Kristian Amlie; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

Doesn't sound like something we want to be always on.  Either keep this in
your customisations, or add it as an optional PACKAGECONFIG that you can
turn on.

Ross

On 22 November 2017 at 13:30, Kristian Amlie <kristian.amlie@northern.tech>
wrote:

> By default, systemd uses its build time as the epoch. When systemd is
> launched on a system without a real time clock, this time will be
> detected as in the future and an fsck will be done.  Setting this to 0
> results in an epoch of January 1, 1970 which is detected as an invalid
> time and the fsck will be skipped.
>
> Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
> ---
>  meta/recipes-core/systemd/systemd_234.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_234.bb
> b/meta/recipes-core/systemd/systemd_234.bb
> index 6b8745b..86c04fe 100644
> --- a/meta/recipes-core/systemd/systemd_234.bb
> +++ b/meta/recipes-core/systemd/systemd_234.bb
> @@ -170,6 +170,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
>                   --with-firmware-path=${nonarch_base_libdir}/firmware \
> +                 --with-time-epoch=0 \
>                 "
>  # per the systemd README, define VALGRIND=1 to run under valgrind
>  CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', '
> -DVALGRIND=1', '', d)}"
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2811 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] systemd: Avoid fsck because time is out of sync on first boot.
  2017-11-23 12:13 ` Burton, Ross
@ 2017-11-23 12:34   ` Kristian Amlie
  0 siblings, 0 replies; 3+ messages in thread
From: Kristian Amlie @ 2017-11-23 12:34 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 23/11/17 13:13, Burton, Ross wrote:
> Doesn't sound like something we want to be always on.  Either keep this
> in your customisations, or add it as an optional PACKAGECONFIG that you
> can turn on.

I can of course do that, but maybe this should be the default? It feels
like a bug that all devices without an onboard clock will run fsck on
their first boot.

The build time isn't very reliable either, the sstate cache could cause
it to be very far in the past. At least with a zero epoch you know what
you're getting. Is there a reason for needing the epoch to be the build
time?

-- 
Kristian


> On 22 November 2017 at 13:30, Kristian Amlie
> <kristian.amlie@northern.tech <mailto:kristian.amlie@northern.tech>> wrote:
> 
>     By default, systemd uses its build time as the epoch. When systemd is
>     launched on a system without a real time clock, this time will be
>     detected as in the future and an fsck will be done.  Setting this to 0
>     results in an epoch of January 1, 1970 which is detected as an invalid
>     time and the fsck will be skipped.
> 
>     Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
>     ---
>      meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb> | 1 +
>      1 file changed, 1 insertion(+)
> 
>     diff --git a/meta/recipes-core/systemd/systemd_234.bb
>     <http://systemd_234.bb> b/meta/recipes-core/systemd/systemd_234.bb
>     <http://systemd_234.bb>
>     index 6b8745b..86c04fe 100644
>     --- a/meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb>
>     +++ b/meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb>
>     @@ -170,6 +170,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
>                       --without-python \
>                       --with-sysvrcnd-path=${sysconfdir} \
>                       --with-firmware-path=${nonarch_base_libdir}/firmware \
>     +                 --with-time-epoch=0 \
>                     "
>      # per the systemd README, define VALGRIND=1 to run under valgrind
>      CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', '
>     -DVALGRIND=1', '', d)}"
>     --
>     2.7.4
> 
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-23 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 13:30 [PATCH v1] systemd: Avoid fsck because time is out of sync on first boot Kristian Amlie
2017-11-23 12:13 ` Burton, Ross
2017-11-23 12:34   ` Kristian Amlie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.