From 6d242b67f943fec6ee6abb532fff1fc83ff9c1c1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 12 Apr 2024 22:05:47 +0200 Subject: [PATCH] [bootloader] Start building kernel parameters earlier - drop unnecessary variable - build "quiet splash rw" first --- src/modules/bootloader/main.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index d09508fae..89058eaae 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -131,7 +131,12 @@ def have_program_in_target(program : str): def get_kernel_params(uuid): + # Configured kernel parameters (default "quiet"), if plymouth installed, add splash + # screen parameter and then "rw". kernel_params = libcalamares.job.configuration.get("kernelParams", ["quiet"]) + if have_program_in_target("plymouth"): + kernel_params.append("splash") + kernel_params.append("rw") partitions = libcalamares.globalstorage.value("partitions") swap_uuid = "" @@ -140,17 +145,10 @@ def get_kernel_params(uuid): cryptdevice_params = [] - has_plymouth = have_program_in_target("plymouth") has_dracut = have_program_in_target("dracut") uses_systemd_hook = libcalamares.utils.target_env_call(["/usr/bin/grep", "-q", "^HOOKS.*systemd", "/etc/mkinitcpio.conf"]) == 0 use_systemd_naming = has_dracut or uses_systemd_hook - # If plymouth installed, add splash screen parameter early - if has_plymouth: - kernel_params.append("splash") - - kernel_params.append("rw") - # Take over swap settings: # - unencrypted swap partition sets swap_uuid # - encrypted root sets cryptdevice_params