mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
Swap + LUKS configuration.
Based on patches from crazy@frugalware.org and V3n3RiX. (presumably) FIXES #730
This commit is contained in:
parent
cc26fc085a
commit
cec7132d2c
2 changed files with 32 additions and 11 deletions
|
@ -11,6 +11,8 @@
|
|||
# Copyright 2015, Philip Mueller <philm@manjaro.org>
|
||||
# Copyright 2016-2017, Teo Mrnjavac <teo@kde.org>
|
||||
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||
# Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
# Copyright 2017, Gabriel Craciunescu <crazy@frugalware.org>
|
||||
#
|
||||
# Calamares is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -104,16 +106,22 @@ def create_systemd_boot_conf(uuid, conf_path, kernel_line):
|
|||
|
||||
cryptdevice_params = []
|
||||
|
||||
# Take over swap settings:
|
||||
# - unencrypted swap partition sets swap_uuid
|
||||
# - encrypted root sets cryptdevice_params
|
||||
for partition in partitions:
|
||||
if partition["fs"] == "linuxswap":
|
||||
has_luks = "luksMapperName" in partition
|
||||
if partition["fs"] == "linuxswap" and not has_luks:
|
||||
swap_uuid = partition["uuid"]
|
||||
|
||||
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
|
||||
if partition["mountPoint"] == "/" and has_luks:
|
||||
cryptdevice_params = ["cryptdevice=UUID="
|
||||
+ partition["luksUuid"]
|
||||
+ ":"
|
||||
+ partition["luksMapperName"],
|
||||
"root=/dev/mapper/"
|
||||
+ partition["luksMapperName"],
|
||||
"resume=/dev/mapper/"
|
||||
+ partition["luksMapperName"]]
|
||||
|
||||
if cryptdevice_params:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue