V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m40s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m40s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -64,6 +64,9 @@ generate_crypttab() {
|
||||
# the underlying encrypted device (LUKS/dm-crypt) passes TRIM commands to the physical drive or not. The '/etc/fstab' determines
|
||||
# whether and how the file system itself generates the discard operations and sends them down through the LUKS layer.
|
||||
#
|
||||
# For non-ephemeral devices the respective UUID of the LUKS-device is used.
|
||||
# For the ephemeral devices the respective PART UUID of the host dummy partition is used.
|
||||
#
|
||||
# RECOMMENDED: 'discard' enables the TRIM commands to be forwarded by the dm-crypt layer to the SSD/physical device. If ones do
|
||||
# not specify discard in the '/etc/crypttab', dm-crypt blocks TRIM by default. This would render a discard in the '/etc/fstab'
|
||||
# ineffective.
|
||||
@@ -78,6 +81,8 @@ EOF
|
||||
var_encryption_label="${HMP_PATH_ENCLABEL["${var_key}"]}"
|
||||
var_luks_uuid="${HMP_PATH_LUKSUUID["${var_key}"]}"
|
||||
|
||||
[[ "${var_key}" == "/recovery" ]] && continue
|
||||
|
||||
if [[ "${VAR_DROPBEAR}" == "true" ]]; then
|
||||
|
||||
if [[ "${var_key}" == "/" ]]; then
|
||||
@@ -112,16 +117,17 @@ EOF
|
||||
for var_key in "${!HMP_EPHEMERAL_ENCLABEL[@]}"; do
|
||||
|
||||
var_ephemeral_enclabel="${HMP_EPHEMERAL_ENCLABEL["${var_key}"]}"
|
||||
var_host_uuid="${HMP_PATH_FSUUID["${var_key}"]}"
|
||||
var_host_uuid="${HMP_PATH_PARTUUID["${var_key}"]}"
|
||||
|
||||
|
||||
case "${var_key}" in
|
||||
|
||||
SWAP)
|
||||
write_crypttab "${var_ephemeral_enclabel}" "UUID=${var_host_uuid}" "/dev/urandom" "plain,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,discard,swap"
|
||||
write_crypttab "${var_ephemeral_enclabel}" "UUID=${var_host_uuid}" "/dev/random" "plain,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,discard,swap"
|
||||
;;
|
||||
|
||||
/tmp)
|
||||
write_crypttab "${var_ephemeral_enclabel}" "UUID=${var_host_uuid}" "/dev/urandom" "plain,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,discard,tmp=ext4"
|
||||
write_crypttab "${var_ephemeral_enclabel}" "UUID=${var_host_uuid}" "/dev/random" "plain,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,discard,tmp=ext4"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user