Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/user_interaction.py14
-rw-r--r--examples/guided.py7
2 files changed, 17 insertions, 4 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 822f63be..9d09d8f1 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -7,7 +7,7 @@ from .output import log, LOG_LEVELS
from .storage import storage
from .networking import list_interfaces
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.
## Some return the keys from the options, some the values?
@@ -143,7 +143,17 @@ def ask_for_a_timezone():
level=LOG_LEVELS.Warning,
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():
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()
diff --git a/examples/guided.py b/examples/guided.py
index c86f2b4b..643e2c94 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -64,6 +64,8 @@ def ask_user_questions():
partition_mountpoints[partition] = None
except archinstall.UnknownFilesystemFormat as err:
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.
if (option := archinstall.ask_for_disk_layout()) == 'abort':
@@ -190,7 +192,7 @@ def ask_user_questions():
# Additional packages (with some light weight error handling for invalid package names)
while True:
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.")
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)
if archinstall.arguments.get('mirror-region', None):
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():
installation.set_hostname(archinstall.arguments['hostname'])
if archinstall.arguments['mirror-region'].get("mirrors",{})!= None: