[bootloader] Start building kernel parameters earlier
- drop unnecessary variable - build "quiet splash rw" first
This commit is contained in:
parent
b4edf52198
commit
6d242b67f9
@ -131,7 +131,12 @@ def have_program_in_target(program : str):
|
|||||||
|
|
||||||
|
|
||||||
def get_kernel_params(uuid):
|
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"])
|
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")
|
partitions = libcalamares.globalstorage.value("partitions")
|
||||||
swap_uuid = ""
|
swap_uuid = ""
|
||||||
@ -140,17 +145,10 @@ def get_kernel_params(uuid):
|
|||||||
|
|
||||||
cryptdevice_params = []
|
cryptdevice_params = []
|
||||||
|
|
||||||
has_plymouth = have_program_in_target("plymouth")
|
|
||||||
has_dracut = have_program_in_target("dracut")
|
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
|
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
|
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:
|
# Take over swap settings:
|
||||||
# - unencrypted swap partition sets swap_uuid
|
# - unencrypted swap partition sets swap_uuid
|
||||||
# - encrypted root sets cryptdevice_params
|
# - encrypted root sets cryptdevice_params
|
||||||
|
Loading…
Reference in New Issue
Block a user