Added rd.luks.name to grubcfg
This commit is contained in:
parent
5769c9c6da
commit
543de65f33
@ -135,10 +135,13 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
plymouth_bin = libcalamares.utils.target_env_call(
|
plymouth_bin = libcalamares.utils.target_env_call(
|
||||||
["sh", "-c", "which plymouth"]
|
["sh", "-c", "which plymouth"]
|
||||||
)
|
)
|
||||||
|
mkinitcpio_systemd = libcalamares.utils.target_env_call(
|
||||||
|
["sh", "-c", "grep -q 'sd-encrypt' /etc/mkinitcpio.conf"]
|
||||||
|
)
|
||||||
# Shell exit value 0 means success
|
# Shell exit value 0 means success
|
||||||
have_plymouth = plymouth_bin == 0
|
have_plymouth = plymouth_bin == 0
|
||||||
have_dracut = dracut_bin == 0
|
have_dracut = dracut_bin == 0
|
||||||
|
have_systemd = mkinitcpio_systemd == 0
|
||||||
|
|
||||||
use_splash = ""
|
use_splash = ""
|
||||||
swap_uuid = ""
|
swap_uuid = ""
|
||||||
@ -215,6 +218,10 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
if swap_outer_mappername:
|
if swap_outer_mappername:
|
||||||
kernel_params.append(f"resume=/dev/mapper/{swap_outer_mappername}")
|
kernel_params.append(f"resume=/dev/mapper/{swap_outer_mappername}")
|
||||||
|
|
||||||
|
# When using rd.luks.name you can omit rd.luks.uuid
|
||||||
|
if have_systemd:
|
||||||
|
kernel_params.append(f"rd.luks.name={partition['luksUuid']}={partition['luksMapperName']}")
|
||||||
|
|
||||||
overwrite = libcalamares.job.configuration.get("overwrite", False)
|
overwrite = libcalamares.job.configuration.get("overwrite", False)
|
||||||
|
|
||||||
grub_config_items = {}
|
grub_config_items = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user