From: Antonio Alvarez Feijoo Date: Tue, 12 May 2026 07:18:08 +0000 (+0200) Subject: feat(chrony): introducing the chrony module X-Git-Tag: 112~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d64d0b99dd7267764272dbc4a210ccbda2db3db;p=thirdparty%2Fdracut-ng.git feat(chrony): introducing the chrony module This new module relies on chrony to add support for NTP in the initrd. By default, it also uses NTP sources from DHCP. It provides two new kernel command line options: - `rd.ntp`: it can be used multiple times to specify server, pool and peer time sources. - `rd.ntp.nodhcp`: it disables the use of NTP sources from DHCP. In some environments, it's necessary to fetch live images from HTTPS URLs. The problem is that the hardware clock may be off, so the validation of the SSL certificates may fail if the time is out of sync. Also, some systems may not have access to DHCP for security reasons, that's why we need a way to configure them on the kernel command line. --- diff --git a/.github/labeler.yml b/.github/labeler.yml index 5328dd076..a946883ad 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -88,6 +88,10 @@ caps: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]caps/*' +chrony: + - changed-files: + - any-glob-to-any-file: 'modules.d/[0-9][0-9]chrony/*' + cifs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]cifs/*' diff --git a/.github/workflows/daily-network.yml b/.github/workflows/daily-network.yml index 8c5b760ee..a8c8f5f11 100644 --- a/.github/workflows/daily-network.yml +++ b/.github/workflows/daily-network.yml @@ -40,6 +40,7 @@ jobs: test: - "31" - "60" + - "61" exclude: - container: arch:latest architecture: {runner: 'ubuntu-24.04-arm', tag: 'arm'} @@ -50,6 +51,17 @@ jobs: # https://github.com/dracut-ng/dracut/issues/1988 - container: debian:sid architecture: {runner: 'ubuntu-24.04-arm', tag: 'arm'} + # In Debian/Ubuntu both chrony and systemd-timesyncd provide + # the virtual package time-daemon, so systemd-timesyncd + # would have to be removed, breaking test 41. + - container: debian:latest + test: "61" + - container: debian:sid + test: "61" + - container: ubuntu:devel + test: "61" + - container: ubuntu:rolling + test: "61" container: image: ghcr.io/dracut-ng/${{ matrix.container }} options: '--device=/dev/kvm --privileged' diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5a1449b15..aa5c8de89 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -190,6 +190,13 @@ jobs: test: - "31" - "60" + - "61" + exclude: + # In Debian/Ubuntu both chrony and systemd-timesyncd provide + # the virtual package time-daemon, so systemd-timesyncd + # would have to be removed, breaking test 41. + - container: ubuntu:devel + test: "61" container: image: ghcr.io/dracut-ng/${{ matrix.container }} options: '--device=/dev/kvm' diff --git a/doc_site/modules/ROOT/pages/modules/network.adoc b/doc_site/modules/ROOT/pages/modules/network.adoc index 04f0eb53b..9a300c021 100644 --- a/doc_site/modules/ROOT/pages/modules/network.adoc +++ b/doc_site/modules/ROOT/pages/modules/network.adoc @@ -6,6 +6,9 @@ |=== | Module | Description +| chrony +| Adds support for synchronizing the internal clock via Network Time Protocol (NTP) + | cifs | https://docs.kernel.org/admin-guide/cifs/index.html[CIFS], https://repology.org/project/cifs-utils[cifs-utils] diff --git a/man/dracut.cmdline.7.adoc b/man/dracut.cmdline.7.adoc index 43dbafd94..82ac51944 100644 --- a/man/dracut.cmdline.7.adoc +++ b/man/dracut.cmdline.7.adoc @@ -729,6 +729,27 @@ interface name. Better name it "bootnet" or "bluesocket". list of physical (ethernet) interfaces. Bridge without parameters assumes bridge=br0:eth0 +NTP +~~~ +Requires the dracut 'chrony' module. + +**rd.ntp=**__{server|pool|peer}__:____[:__