index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | archinstall/lib/installer.py | 5 | ||||
-rw-r--r-- | archinstall/lib/user_interaction.py | 2 | ||||
-rw-r--r-- | archiso; echo Running | 0 | ||||
-rw-r--r-- | examples/guided.py | 18 |
@@ -21,3 +21,5 @@ SAFETY_LOCK **/**.target **/**.qcow2 **/test.py +**/archiso +/guided.py diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index f6c891a3..e2762603 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -39,7 +39,8 @@ class Installer(): :type hostname: str, optional """ - def __init__(self, target, *, base_packages='base base-devel linux linux-firmware'): + def __init__(self, target, *, base_packages='base base-devel linux linux-firmware', kernels='linux'): + base_packages = base_packages + kernels.replace(',', ' ') self.target = target self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S') self.milliseconds = int(str(time.time()).split('.')[1]) @@ -342,7 +343,7 @@ class Installer(): mkinit.write(f"BINARIES=({' '.join(BINARIES)})\n") mkinit.write(f"FILES=({' '.join(FILES)})\n") mkinit.write(f"HOOKS=({' '.join(HOOKS)})\n") - sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio -p linux') + sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio -P') self.helper_flags['base'] = True diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 70ff7a1e..e38f5311 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -230,6 +230,8 @@ def generic_select(options, input_text="Select one of the above by index or abso 1: first 2: second 3: third option + + it will return the selected text. """ if type(options) == dict: options = list(options) diff --git a/archiso;
echo Running b/archiso;
echo Running new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/archiso; echo Running diff --git a/examples/guided.py b/examples/guided.py index 878412a9..f4cf097e 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -2,6 +2,7 @@ import getpass, time, json, os import archinstall from archinstall.lib.hardware import hasUEFI from archinstall.lib.profiles import Profile +from archinstall.lib.user_interaction import generic_select if archinstall.arguments.get('help'): print("See `man archinstall` for help.") @@ -179,7 +180,6 @@ def ask_user_questions(): # Ask about audio server selection if one is not already set if not archinstall.arguments.get('audio', None): - # only ask for audio server selection on a desktop profile if str(archinstall.arguments['profile']) == 'Profile(desktop)': archinstall.arguments['audio'] = archinstall.ask_for_audio_selection() @@ -188,6 +188,18 @@ def ask_user_questions(): # we will not try to remove packages post-installation to not have audio, as that may cause multiple issues archinstall.arguments['audio'] = None + # Ask what kernel user wants: + while True: + kernel = generic_select(["linux", "linux-lts", "linux-zen", "continue"], "choose a kernel:") + if (archinstall.arguments.get("kernels", None) == None): + archinstall.arguments['kernels'] = kernel + else: + if (kernel == "continue"): + break + archinstall.arguments['kernels'] += "," + kernel + + + # Additional packages (with some light weight error handling for invalid package names) while True: if not archinstall.arguments.get('packages', None): @@ -292,7 +304,7 @@ def perform_installation(mountpoint): Only requirement is that the block devices are formatted and setup prior to entering this function. """ - with archinstall.Installer(mountpoint) as installation: + with archinstall.Installer(mountpoint, kernels=archinstall.arguments['kernels']) as installation: ## if len(mirrors): # Certain services might be running that affects the system during installation. # Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist @@ -373,4 +385,4 @@ def perform_installation(mountpoint): pass ask_user_questions() -perform_installation_steps()
\ No newline at end of file +perform_installation_steps() |