From fd4594d08cbf6de37bdd82e31af64fbec6cce4b5 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 21 Mar 2021 20:56:15 +0100 Subject: Added a mkinitcpio configuration for non-btrfs volumes but where encryption is still used. Also added keymap to the HOOKS so that we can get non-us layouts depending on the locale chosen during installation. --- archinstall/lib/installer.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 1c66f6ac..2200db8e 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -290,13 +290,22 @@ class Installer(): # TODO: Use python functions for this sys_command(f'/usr/bin/arch-chroot {self.mountpoint} chmod 700 /root') + # Configure mkinitcpio to handle some specific use cases. + # TODO: Yes, we should not overwrite the entire thing, but for now this should be fine + # since we just installed the base system. if self.partition.filesystem == 'btrfs': with open(f'{self.mountpoint}/etc/mkinitcpio.conf', 'w') as mkinit: - ## TODO: Don't replace it, in case some update in the future actually adds something. mkinit.write('MODULES=(btrfs)\n') mkinit.write('BINARIES=(/usr/bin/btrfs)\n') mkinit.write('FILES=()\n') - mkinit.write('HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)\n') + mkinit.write('HOOKS=(base udev autodetect modconf block encrypt filesystems keymap keyboard fsck)\n') + sys_command(f'/usr/bin/arch-chroot {self.mountpoint} mkinitcpio -p linux') + elif self.partition.encrypted: + with open(f'{self.mountpoint}/etc/mkinitcpio.conf', 'w') as mkinit: + mkinit.write('MODULES=()\n') + mkinit.write('BINARIES=()\n') + mkinit.write('FILES=()\n') + mkinit.write('HOOKS=(base udev autodetect modconf block encrypt filesystems keymap keyboard fsck)\n') sys_command(f'/usr/bin/arch-chroot {self.mountpoint} mkinitcpio -p linux') self.helper_flags['base'] = True -- cgit v1.2.3-70-g09d2