From 5fb1d28ef654e0ae3eafb57e94780c0e0aacb17b Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 14:23:02 +0100 Subject: [PATCH 1/7] Cleaned up --- archinstall/lib/global_menu.py | 5 ++++- archinstall/lib/hardware.py | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index 8c13daf402..7f573a40a1 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -330,7 +330,10 @@ def _prev_applications(self, item: MenuItem) -> str | None: def _prev_tz(self, item: MenuItem) -> str | None: if item.value: - return f'{tr("Timezone")}: {item.value}' + output = f'{tr("Timezone")}: {item.value}' + if rtc_time := SysInfo.hw_clock(): + output += f'\nRTC time: {rtc_time}' + return output return None def _prev_ntp(self, item: MenuItem) -> str | None: diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index e1278dfad4..3bdaa25e91 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -143,6 +143,13 @@ class _SysInfo: def __init__(self) -> None: pass + def hw_clock(self) -> str: + """ + Returns the local time from timedatectl + """ + time = SysCommand('timedatectl show --property=TimeRTC --value').decode().strip() + return f'{time}' + @cached_property def cpu_info(self) -> dict[str, str]: """ @@ -207,6 +214,10 @@ def has_wifi() -> bool: def has_uefi() -> bool: return os.path.isdir('/sys/firmware/efi') + @staticmethod + def hw_clock() -> str: + return _sys_info.hw_clock() + @staticmethod def _graphics_devices() -> dict[str, str]: cards: dict[str, str] = {} From 65373199903778f835207761e9dfbe09ff6b9f54 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 14:25:56 +0100 Subject: [PATCH 2/7] Add PSA about hwclock/settings When UTC default -> Show RTC When tz selected -> Hide RTC --- README.md | 7 +++++++ archinstall/lib/global_menu.py | 5 +++-- archinstall/lib/hardware.py | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b6d5708503..8f3208ef9b 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,13 @@ For a quick fix the below command will install the latest keyrings ```pacman -Sy archlinux-keyring``` +## GPG verification errors pacstrap +This can occur if the timezone selected is incorrect and/or hardware clock in motherboard settings is not set (during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens. This can reset other settings such as Sata Mode, Fast Boot, etc + +Look for RTC field (real-time clock) +```timedatectl status``` +And make sure to set it properly according to your timezone in the menu. NTP will also auto sync if internet is found. + ## How to dual boot with Windows To install Arch Linux alongside an existing Windows installation using `archinstall`, follow these steps: diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index 7f573a40a1..efe98c23f8 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -331,8 +331,9 @@ def _prev_applications(self, item: MenuItem) -> str | None: def _prev_tz(self, item: MenuItem) -> str | None: if item.value: output = f'{tr("Timezone")}: {item.value}' - if rtc_time := SysInfo.hw_clock(): - output += f'\nRTC time: {rtc_time}' + if item.value == 'UTC': + if rtc_time := SysInfo.hw_clock(): + output += f'\nRTC time: {rtc_time}' return output return None diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 3bdaa25e91..338dae4a93 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -145,10 +145,10 @@ def __init__(self) -> None: def hw_clock(self) -> str: """ - Returns the local time from timedatectl + Returns the RTC (hardware clock) time from timedatectl """ - time = SysCommand('timedatectl show --property=TimeRTC --value').decode().strip() - return f'{time}' + time = SysCommand('timedatectl show --property=RTCTimeUSec --value').decode().strip() + return time @cached_property def cpu_info(self) -> dict[str, str]: From d1d56ca0f548bc3b22f9a5372845d06f7b24e4de Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 14:55:33 +0100 Subject: [PATCH 3/7] clarify readme --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8f3208ef9b..ae613aa06c 100644 --- a/README.md +++ b/README.md @@ -185,11 +185,16 @@ For a quick fix the below command will install the latest keyrings ```pacman -Sy archlinux-keyring``` ## GPG verification errors pacstrap -This can occur if the timezone selected is incorrect and/or hardware clock in motherboard settings is not set (during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens. This can reset other settings such as Sata Mode, Fast Boot, etc +This can occur if the timezone selected is incorrect and/or hardware clock in motherboard settings is not accurate (fails during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens this can reset other settings such as Clock, Sata Mode, Fast Boot, etc... -Look for RTC field (real-time clock) -```timedatectl status``` -And make sure to set it properly according to your timezone in the menu. NTP will also auto sync if internet is found. +For offline installs can set manually via: + +``` +timedatectl status +timedatectl set-time "YYYY-MM-DD HH:MM:SS" +``` + +Or in motherboard settings directly ! If you have internet and no misconfiguration, NTP should handle this by default. ## How to dual boot with Windows From b772d34199607a75a3aafc05cfb8f39c620ef457 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 14:59:07 +0100 Subject: [PATCH 4/7] clarify readme2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae613aa06c..c329b2f549 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ timedatectl status timedatectl set-time "YYYY-MM-DD HH:MM:SS" ``` -Or in motherboard settings directly ! If you have internet and no misconfiguration, NTP should handle this by default. +Or in motherboard settings directly ! If you have internet and picked your timezone properly in the menu, NTP should handle this by default. ## How to dual boot with Windows From 34455d3d158f877d318f0d83c8bfaebd24484a1a Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 15:01:57 +0100 Subject: [PATCH 5/7] clarify readme3 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c329b2f549..6dc5342107 100644 --- a/README.md +++ b/README.md @@ -185,9 +185,10 @@ For a quick fix the below command will install the latest keyrings ```pacman -Sy archlinux-keyring``` ## GPG verification errors pacstrap -This can occur if the timezone selected is incorrect and/or hardware clock in motherboard settings is not accurate (fails during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens this can reset other settings such as Clock, Sata Mode, Fast Boot, etc... -For offline installs can set manually via: +This can occur if the **timezone selected** is incorrect and/or hardware clock in motherboard settings is not accurate (fails during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens this can reset other settings such as Clock, Sata Mode, Fast Boot, etc... + +For **offline installs** can set manually via: ``` timedatectl status From edb6a2d9328fb98e4d95b3f388b90780731412d7 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Tue, 16 Dec 2025 15:26:29 +0100 Subject: [PATCH 6/7] Default to None and make mandatory=True --- README.md | 2 +- archinstall/lib/args.py | 4 ++-- archinstall/lib/global_menu.py | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6dc5342107..c3d2d2f047 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ timedatectl status timedatectl set-time "YYYY-MM-DD HH:MM:SS" ``` -Or in motherboard settings directly ! If you have internet and picked your timezone properly in the menu, NTP should handle this by default. +Or in motherboard settings directly ! If you have internet and picked your timezone properly in the menu, NTP handles this by default. ## How to dual boot with Windows diff --git a/archinstall/lib/args.py b/archinstall/lib/args.py index f654345be9..5d0eb0e60f 100644 --- a/archinstall/lib/args.py +++ b/archinstall/lib/args.py @@ -73,7 +73,7 @@ class ArchConfig: packages: list[str] = field(default_factory=list) parallel_downloads: int = 0 swap: bool = True - timezone: str = 'UTC' + timezone: str | None = None services: list[str] = field(default_factory=list) custom_commands: list[str] = field(default_factory=list) @@ -213,7 +213,7 @@ def from_config(cls, args_config: dict[str, Any], args: Arguments) -> 'ArchConfi arch_config.swap = args_config.get('swap', True) - if timezone := args_config.get('timezone', 'UTC'): + if timezone := args_config.get('timezone', None): arch_config.timezone = timezone if services := args_config.get('services', []): diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index efe98c23f8..23eb53947e 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -150,9 +150,10 @@ def _get_menu_options(self) -> list[MenuItem]: MenuItem( text=tr('Timezone'), action=ask_for_a_timezone, - value='UTC', + value=None, preview_action=self._prev_tz, key='timezone', + mandatory=True, ), MenuItem( text=tr('Automatic time sync (NTP)'), @@ -331,10 +332,11 @@ def _prev_applications(self, item: MenuItem) -> str | None: def _prev_tz(self, item: MenuItem) -> str | None: if item.value: output = f'{tr("Timezone")}: {item.value}' - if item.value == 'UTC': - if rtc_time := SysInfo.hw_clock(): - output += f'\nRTC time: {rtc_time}' return output + else: + # Show RTC time when no timezone is selected yet + if rtc_time := SysInfo.hw_clock(): + return f'RTC time: {rtc_time}' return None def _prev_ntp(self, item: MenuItem) -> str | None: From f82e252e040c6cf47c0c6c3cd8a68d625b135903 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Sun, 21 Dec 2025 17:00:25 +0100 Subject: [PATCH 7/7] GPG -> PGP --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3d2d2f047..887986fcb7 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ For a quick fix the below command will install the latest keyrings ```pacman -Sy archlinux-keyring``` -## GPG verification errors pacstrap +## PGP verification errors pacstrap This can occur if the **timezone selected** is incorrect and/or hardware clock in motherboard settings is not accurate (fails during verification of packages at first base-strap). Ie. when CMOS battery is dead and power cut-off happens this can reset other settings such as Clock, Sata Mode, Fast Boot, etc...