diff --git a/archinstall/lib/args.py b/archinstall/lib/args.py index fa2e44fd6b..aaa63fb448 100644 --- a/archinstall/lib/args.py +++ b/archinstall/lib/args.py @@ -42,6 +42,7 @@ class Arguments: script: str = "guided" mountpoint: Path = Path("/mnt") skip_ntp: bool = False + skip_wkd: bool = False debug: bool = False offline: bool = False no_pkg_lookups: bool = False @@ -319,6 +320,12 @@ def _define_arguments(self) -> ArgumentParser: help="Disables NTP checks during installation", default=False, ) + parser.add_argument( + "--skip-wkd", + action="store_true", + help="Disables checking if archlinux keyring wkd sync is complete.", + default=False, + ) parser.add_argument( "--debug", action="store_true", diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index dd90271dfb..d3f02480f0 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -196,14 +196,15 @@ def _verify_service_stop(self) -> None: # while self._service_state('pacman-init') not in ('dead', 'failed', 'exited'): # time.sleep(1) - info(tr("Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.")) - # Wait for the timer to kick in - while self._service_started("archlinux-keyring-wkd-sync.timer") is None: - time.sleep(1) + if not arch_config_handler.args.skip_wkd: + info(tr("Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.")) + # Wait for the timer to kick in + while self._service_started("archlinux-keyring-wkd-sync.timer") is None: + time.sleep(1) - # Wait for the service to enter a finished state - while self._service_state("archlinux-keyring-wkd-sync.service") not in ("dead", "failed", "exited"): - time.sleep(1) + # Wait for the service to enter a finished state + while self._service_state("archlinux-keyring-wkd-sync.service") not in ("dead", "failed", "exited"): + time.sleep(1) def _verify_boot_part(self) -> None: """ diff --git a/docs/help/known_issues.rst b/docs/help/known_issues.rst index 450817eab4..bf039dcbc4 100644 --- a/docs/help/known_issues.rst +++ b/docs/help/known_issues.rst @@ -19,6 +19,39 @@ Restarting ``systemd-timesyncd.service`` might work but most often you need to c If you know your time is correct on the machine, you can run ``archinstall --skip-ntp`` to ignore time sync. +Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete. `#2679`_ +------------------------------ + +The ``archlinux-keyring-wkd-sync.service`` or ``archlinux-keyring-wkd-sync.timer`` can hang "indefinitely" some times. +This is usually due to an inability to reach the key servers, or a slow connection towards key servers. + +The script ``/usr/bin/archlinux-keyring-wkd-sync`` can be run manually, to verify if it's executing slowly or not. + +If ``systemctl show --property=ActiveEnterTimestamp --no-pager archlinux-keyring-wkd-sync.timer`` shows nothing, it means the built-in sync never finished. Likewise ``systemctl show --no-pager -p SubState --value archlinux-keyring-wkd-sync.service`` most likely shows ``dead``, which means the service never completed. + +To fix this, try the following: + +.. code-block:: console + + # killall gpg-agent + # rm -rf /etc/pacman.d/gnupg + # pacman-key --init + # pacman-key --populate + # pacman -Sy archlinux-keyring + # systemctl restart archlinux-keyring-wkd-sync.timer + +.. note:: + + If you know the ISO is the latest, and that you have valid GPG keys, try ``archinstall --skip-wkd`` to ignore waiting for the sync. + + If you skip WKD sync, you might end up with: + + .. code-block:: console + + > error: archinstall: signature from "Anton Hvornum (Torxed) " is unknown trust + > :: File /var/cache/pacman/pkg/archinstall-1.2.3-4-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)). + > Do you want to delete it? [Y/n] + Missing Nvidia Proprietary Driver `#2002`_ ------------------------------------------ @@ -87,11 +120,12 @@ This means that feature requests like supporting filesystems such as `ZFS`_ can This will allow for unsupported usage of AUR during installation. -.. _#2213: https://github.com/archlinux/archinstall/issues/2213 -.. _#2185: https://github.com/archlinux/archinstall/issues/2185 -.. _#2144: https://github.com/archlinux/archinstall/issues/2144 -.. _#2002: https://github.com/archlinux/archinstall/issues/2002 .. _#1686: https://github.com/archlinux/archinstall/issues/1686 +.. _#2002: https://github.com/archlinux/archinstall/issues/2002 +.. _#2144: https://github.com/archlinux/archinstall/issues/2144 +.. _#2185: https://github.com/archlinux/archinstall/issues/2185 +.. _#2213: https://github.com/archlinux/archinstall/issues/2213 +.. _#2679: https://github.com/archlinux/archinstall/issues/2679 .. _linux-headers: https://archlinux.org/packages/core/x86_64/linux-headers/ .. _nvidia-dkms: https://archlinux.org/packages/extra/x86_64/nvidia-dkms/ .. _x86_64: https://wiki.archlinux.org/title/Frequently_asked_questions#What_architectures_does_Arch_support? diff --git a/tests/test_args.py b/tests/test_args.py index 650260f0fd..3467bd006e 100644 --- a/tests/test_args.py +++ b/tests/test_args.py @@ -34,6 +34,7 @@ def test_default_args(monkeypatch: MonkeyPatch) -> None: script="guided", mountpoint=Path("/mnt"), skip_ntp=False, + skip_wkd=False, debug=False, offline=False, no_pkg_lookups=False, @@ -63,6 +64,7 @@ def test_correct_parsing_args( "--mountpoint", "/tmp", "--skip-ntp", + "--skip-wkd", "--debug", "--offline", "--no-pkg-lookups", @@ -87,6 +89,7 @@ def test_correct_parsing_args( script="execution_script", mountpoint=Path("/tmp"), skip_ntp=True, + skip_wkd=True, debug=True, offline=True, no_pkg_lookups=True,