index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-30 17:04:55 +0200 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-04-30 17:04:55 +0200 |
commit | cccb6bd5b31f32189bb13c81aa799b9ea7feff58 (patch) | |
tree | 9e70e1998c6ea7e09f9e14fef11a0d1e56205d26 | |
parent | acf85f254acc9e72b32c04c53c4517a5dad07df9 (diff) |
-rw-r--r-- | archinstall/lib/installer.py | 15 |
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 3dfcd32b..9f04a6f6 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -283,6 +283,14 @@ class Installer(): return False + def mkinitcpio(self, *flags): + with open(f'{self.target}/etc/mkinitcpio.conf', 'w') as mkinit: + mkinit.write(f"MODULES=({' '.join(self.MODULES)})\n") + mkinit.write(f"BINARIES=({' '.join(self.BINARIES)})\n") + mkinit.write(f"FILES=({' '.join(self.FILES)})\n") + mkinit.write(f"HOOKS=({' '.join(self.HOOKS)})\n") + sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio {" ".join(flags)}') + def minimal_installation(self): ## Add necessary packages if encrypting the drive ## (encrypted partitions default to btrfs for now, so we need btrfs-progs) @@ -340,12 +348,7 @@ class Installer(): # TODO: Use python functions for this sys_command(f'/usr/bin/arch-chroot {self.target} chmod 700 /root') - with open(f'{self.target}/etc/mkinitcpio.conf', 'w') as mkinit: - mkinit.write(f"MODULES=({' '.join(self.MODULES)})\n") - mkinit.write(f"BINARIES=({' '.join(self.BINARIES)})\n") - mkinit.write(f"FILES=({' '.join(self.FILES)})\n") - mkinit.write(f"HOOKS=({' '.join(self.HOOKS)})\n") - sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio -P') + self.mkinitcpio('-P') self.helper_flags['base'] = True |