index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-29 08:23:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 08:23:01 +0000 |
commit | 455dd24614be1dcad7ef193bde6efaea6d901b59 (patch) | |
tree | 5309cbfed3632e51831267673632678cc6b11e98 /archinstall/lib | |
parent | 1238199ed8022fbfaedcf746527b5d8c1ad975b9 (diff) | |
parent | 2d02e806f2ae5341752a0ceb532e5c239a164ee7 (diff) |
-rw-r--r-- | archinstall/lib/hardware.py | 4 | ||||
-rw-r--r-- | archinstall/lib/installer.py | 21 |
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index d6cf982c..e9c63e41 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -3,6 +3,8 @@ from .general import sys_command from .networking import list_interfaces, enrichIfaceTypes from typing import Optional +__packages__ = ['xf86-video-amdgpu', 'xf86-video-ati', 'xf86-video-intel', 'xf86-video-nouveau', 'xf86-video-fbdev', 'xf86-video-vesa', 'xf86-video-vmware', 'nvidia', 'mesa'] + AVAILABLE_GFX_DRIVERS = { # Sub-dicts are layer-2 options to be selected # and lists are a list of packages to be installed @@ -18,7 +20,7 @@ AVAILABLE_GFX_DRIVERS = { 'mesa' : ['mesa'], 'fbdev' : ['xf86-video-fbdev'], 'vesa' : ['xf86-video-vesa'], - 'vmware' : ['xf86-video-vmware'] + 'vmware / virtualbox' : ['xf86-video-vmware'] } def hasWifi()->bool: 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') |