[bootloader] Start building kernel parameters earlier

- drop unnecessary variable
- build "quiet splash rw" first
This commit is contained in:
Adriaan de Groot 2024-04-12 22:05:47 +02:00
parent b4edf52198
commit 6d242b67f9

View File

@ -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