Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-21 20:56:15 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-21 20:56:15 +0100
commitfd4594d08cbf6de37bdd82e31af64fbec6cce4b5 (patch)
tree138f97299a045209729dd3aa6e7a2919cd8ba3fe /archinstall/lib/installer.py
parent795b1ef55b600ae86e104897f803ec16db697c73 (diff)
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.
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py13
1 files changed, 11 insertions, 2 deletions
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