mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 17:35:37 -04:00
Improve LUKS check and use luksUuid instead of uuid.
This commit is contained in:
parent
c83e67b421
commit
f861c13dad
3 changed files with 6 additions and 6 deletions
|
@ -100,9 +100,9 @@ def create_systemd_boot_conf(uuid, conf_path, kernel_line):
|
||||||
if partition["fs"] == "linuxswap":
|
if partition["fs"] == "linuxswap":
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
|
|
||||||
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
|
if partition["mountPoint"] == "/" and partition["isLuks"]:
|
||||||
cryptdevice_params = [
|
cryptdevice_params = [
|
||||||
"cryptdevice=UUID={!s}:{!s}".format(partition["uuid"],
|
"cryptdevice=UUID={!s}:{!s}".format(partition["luksUuid"],
|
||||||
partition["luksMapperName"]),
|
partition["luksMapperName"]),
|
||||||
"root=/dev/mapper/{!s}".format(partition["luksMapperName"])
|
"root=/dev/mapper/{!s}".format(partition["luksMapperName"])
|
||||||
]
|
]
|
||||||
|
|
|
@ -50,9 +50,9 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
||||||
if partition["fs"] == "linuxswap":
|
if partition["fs"] == "linuxswap":
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
|
|
||||||
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
|
if partition["mountPoint"] == "/" and partition["isLuks"]:
|
||||||
cryptdevice_params = [
|
cryptdevice_params = [
|
||||||
"cryptdevice=UUID={!s}:{!s}".format(partition["uuid"],
|
"cryptdevice=UUID={!s}:{!s}".format(partition["luksUuid"],
|
||||||
partition["luksMapperName"]),
|
partition["luksMapperName"]),
|
||||||
"root=/dev/mapper/{!s}".format(partition["luksMapperName"])
|
"root=/dev/mapper/{!s}".format(partition["luksMapperName"])
|
||||||
]
|
]
|
||||||
|
|
|
@ -30,7 +30,7 @@ def mount_partitions(root_mount_point, partitions):
|
||||||
:param partitions:
|
:param partitions:
|
||||||
"""
|
"""
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
if not partition["mountPoint"]:
|
if "mountPoint" not in partition or not partition["mountPoint"]:
|
||||||
continue
|
continue
|
||||||
# Create mount point with `+` rather than `os.path.join()` because
|
# Create mount point with `+` rather than `os.path.join()` because
|
||||||
# `partition["mountPoint"]` starts with a '/'.
|
# `partition["mountPoint"]` starts with a '/'.
|
||||||
|
@ -40,7 +40,7 @@ def mount_partitions(root_mount_point, partitions):
|
||||||
if fstype == "fat16" or fstype == "fat32":
|
if fstype == "fat16" or fstype == "fat32":
|
||||||
fstype = "vfat"
|
fstype = "vfat"
|
||||||
|
|
||||||
if "luksMapperName" in partition:
|
if partition["isLuks"]:
|
||||||
libcalamares.utils.debug("about to mount {!s}".format(partition["luksMapperName"]))
|
libcalamares.utils.debug("about to mount {!s}".format(partition["luksMapperName"]))
|
||||||
libcalamares.utils.mount(partition["luksMapperName"],
|
libcalamares.utils.mount(partition["luksMapperName"],
|
||||||
mount_point,
|
mount_point,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue