diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 29c80af806..621573255a 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -868,6 +868,9 @@ def minimal_installation( pacman_conf.enable(optional_repositories) pacman_conf.apply() + if locale_config: + self.set_vconsole(locale_config) + self.pacman.strap(self._base_packages) self._helper_flags['base-strapped'] = True @@ -1783,6 +1786,29 @@ def chown(self, owner: str, path: str, options: list[str] = []) -> bool: except SysCallError: return False + def set_vconsole(self, locale_config: 'LocaleConfiguration') -> None: + # use the already set kb layout + kb_vconsole: str = locale_config.kb_layout + # this is the default used in ISO other option for hdpi screens TER16x32 + # can be checked using + # zgrep "CONFIG_FONT" /proc/config.gz + # https://wiki.archlinux.org/title/Linux_console#Fonts + + font_vconsole = 'default8x16' + + # Ensure /etc exists + vconsole_dir: Path = self.target / 'etc' + vconsole_dir.mkdir(parents=True, exist_ok=True) + vconsole_path: Path = vconsole_dir / 'vconsole.conf' + + # Write both KEYMAP and FONT to vconsole.conf + vconsole_content = f'KEYMAP={kb_vconsole}\n' + # Corrects another warning + vconsole_content += f'FONT={font_vconsole}\n' + + vconsole_path.write_text(vconsole_content) + info(f'Wrote to {vconsole_path} using {kb_vconsole} and {font_vconsole}') + def set_keyboard_language(self, language: str) -> bool: info(f'Setting keyboard language to {language}')