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:
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index a5449662..dbc6d1b4 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -12,8 +12,7 @@ from .storage import storage
from .hardware import *
# Any package that the Installer() is responsible for (optional and the default ones)
-__packages__ = ["base", "base-devel", "linux", "linux-firmware", "efibootmgr", "nano", "ntp", "iwd"]
-__base_packages__ = __packages__[:6]
+__packages__ = ["base", "base-devel", "linux-firmware", "linux", "linux-lts", "linux-zen", "linux-hardened"]
class Installer():
"""
@@ -39,8 +38,7 @@ class Installer():
:type hostname: str, optional
"""
- def __init__(self, target, *, base_packages='base base-devel linux-firmware', kernels='linux'):
- kernels = kernels.split(",")
+ def __init__(self, target, *, base_packages=__packages__[:3], kernels=['linux']):
self.target = target
self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S')
self.milliseconds = int(str(time.time()).split('.')[1])
@@ -53,10 +51,7 @@ class Installer():
self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages
for kernel in kernels:
self.base_packages.append(kernel)
- if hasUEFI():
- self.base_packages.append("efibootmgr")
- else:
- self.base_packages.append("grub")
+
self.post_base_install = []
storage['session'] = self
@@ -364,12 +359,12 @@ class Installer():
boot_partition = partition
elif partition.mountpoint == self.target:
root_partition = partition
- if hasUEFI():
- self.log(f'Adding bootloader {bootloader} to {boot_partition}', level=logging.INFO)
- else:
- self.log(f'Adding bootloader {bootloader} to {root_partition}', level=logging.INFO)
+
+ self.log(f'Adding bootloader {bootloader} to {boot_partition if boot_partition else root_partition}', level=logging.INFO)
if bootloader == 'systemd-bootctl':
+ self.pacstrap('efibootmgr')
+
if not hasUEFI():
raise HardwareIncompatibilityError
# TODO: Ideally we would want to check if another config
@@ -432,6 +427,8 @@ class Installer():
raise RequirementError(f"Could not identify the UUID of {self.partition}, there for {self.target}/boot/loader/entries/arch.conf will be broken until fixed.")
elif bootloader == "grub-install":
+ self.pacstrap('grub')
+
if hasUEFI():
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
sys_command('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')