Vconsole.conf KEYMAP= FONT=

_base mkinitcpio.conf v40 error (#3928)

* pr1

* pr2

* pr2-2

* pr2-3

* Revert genfstab and pacstrap command changes

* mistake
This commit is contained in:
HADEON 2025-12-08 09:25:20 +01:00 committed by GitHub
parent 57bd613679
commit 6b50815eb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 0 deletions

View File

@ -868,6 +868,9 @@ class Installer:
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 @@ class Installer:
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}')