rebase
This commit is contained in:
parent
636a7b95d5
commit
7afba65c26
|
|
@ -7,7 +7,7 @@ from .output import log, LOG_LEVELS
|
||||||
from .storage import storage
|
from .storage import storage
|
||||||
from .networking import list_interfaces
|
from .networking import list_interfaces
|
||||||
from .general import sys_command
|
from .general import sys_command
|
||||||
from .hardware import AVAILABLE_GFX_DRIVERS
|
from .hardware import AVAILABLE_GFX_DRIVERS, hasUEFI
|
||||||
|
|
||||||
## TODO: Some inconsistencies between the selection processes.
|
## TODO: Some inconsistencies between the selection processes.
|
||||||
## Some return the keys from the options, some the values?
|
## Some return the keys from the options, some the values?
|
||||||
|
|
@ -144,6 +144,16 @@ def ask_for_a_timezone():
|
||||||
fg='red'
|
fg='red'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def ask_for_bootloader() -> str:
|
||||||
|
bootloader = "systemd-bootctl"
|
||||||
|
if hasUEFI==False:
|
||||||
|
bootloader="grub-install"
|
||||||
|
else:
|
||||||
|
bootloader_choice = input("Would you like to use Grub as a bootloader over systemd-boot [y/N] ").lower()
|
||||||
|
if bootloader_choice == "y":
|
||||||
|
bootloader="grub-install"
|
||||||
|
return bootloader
|
||||||
|
|
||||||
def ask_for_audio_selection():
|
def ask_for_audio_selection():
|
||||||
audio = "pulseaudio" # Default for most desktop environments
|
audio = "pulseaudio" # Default for most desktop environments
|
||||||
pipewire_choice = input("Would you like to install pipewire instead of pulseaudio as the default audio server? [Y/n] ").lower()
|
pipewire_choice = input("Would you like to install pipewire instead of pulseaudio as the default audio server? [Y/n] ").lower()
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ def ask_user_questions():
|
||||||
except archinstall.UnknownFilesystemFormat as err:
|
except archinstall.UnknownFilesystemFormat as err:
|
||||||
archinstall.log(f" {partition} (Filesystem not supported)", fg='red')
|
archinstall.log(f" {partition} (Filesystem not supported)", fg='red')
|
||||||
|
|
||||||
|
archinstall.arguments["bootloader"] = archinstall.ask_for_bootloader()
|
||||||
|
|
||||||
# We then ask what to do with the partitions.
|
# We then ask what to do with the partitions.
|
||||||
if (option := archinstall.ask_for_disk_layout()) == 'abort':
|
if (option := archinstall.ask_for_disk_layout()) == 'abort':
|
||||||
archinstall.log(f"Safely aborting the installation. No changes to the disk or system has been made.")
|
archinstall.log(f"Safely aborting the installation. No changes to the disk or system has been made.")
|
||||||
|
|
@ -190,7 +192,7 @@ def ask_user_questions():
|
||||||
# Additional packages (with some light weight error handling for invalid package names)
|
# Additional packages (with some light weight error handling for invalid package names)
|
||||||
while True:
|
while True:
|
||||||
if not archinstall.arguments.get('packages', None):
|
if not archinstall.arguments.get('packages', None):
|
||||||
print("Only packages such as base, base-devel, linux, linux-firmware, efibootmgr and optional profile packages are installed.")
|
print("Only packages such as base, base-devel, linux, linux-firmware, efibootmgr(in uefi systems) and optional profile packages are installed.")
|
||||||
print("If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.")
|
print("If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.")
|
||||||
archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
|
archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
|
||||||
|
|
||||||
|
|
@ -303,7 +305,8 @@ def perform_installation(mountpoint):
|
||||||
# Set mirrors used by pacstrap (outside of installation)
|
# Set mirrors used by pacstrap (outside of installation)
|
||||||
if archinstall.arguments.get('mirror-region', None):
|
if archinstall.arguments.get('mirror-region', None):
|
||||||
archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium
|
archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium
|
||||||
|
if hasUEFI()==False:
|
||||||
|
installation.base_packages.replace("efibootmgr","")# if we aren't on a uefi system why install efibootmgr
|
||||||
if installation.minimal_installation():
|
if installation.minimal_installation():
|
||||||
installation.set_hostname(archinstall.arguments['hostname'])
|
installation.set_hostname(archinstall.arguments['hostname'])
|
||||||
if archinstall.arguments['mirror-region'].get("mirrors",{})!= None:
|
if archinstall.arguments['mirror-region'].get("mirrors",{})!= None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue