V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 41s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-27 00:49:52 +02:00
parent 5d926a04ef
commit cfa95318df
4 changed files with 21 additions and 5 deletions

View File

@@ -111,7 +111,8 @@ partitioning() {
if [[ "${var_end}" == "-1" ]]; then
var_dev_size=$(blockdev --getsize64 "/dev/${var_dev}")
var_dev_end=$(( var_dev_size - 16 * 1024 * 1024 ))
var_end_arg=$(( var_dev_end / 1024 / 1024 ))
var_end_mib=$(( var_dev_end / 1024 / 1024 ))
var_end_arg="${var_end_mib}MiB"
else
var_end_arg="${var_end}"
fi

View File

@@ -108,7 +108,7 @@ partition_encryption() {
do_log "info" "file_only" "3220() Stored in HashMap [HMP_EPHEMERAL_DEV] : '${var_mount_path}' -> '${HMP_EPHEMERAL_DEV["${var_mount_path}"]}'"
do_log "info" "file_only" "3220() Stored in HashMap [HMP_EPHEMERAL_ENCLABEL]: '${var_mount_path}' -> '${HMP_EPHEMERAL_ENCLABEL["${var_mount_path}"]}'"
do_log "info" "file_only" "3220() Stored in HashMap [HMP_EPHEMERAL_FS_LABEL]: '${var_mount_path}' -> '${HMP_EPHEMERAL_ENCLABEL["${var_mount_path}"]}'"
do_log "info" "file_only" "3220() Stored in HashMap [HMP_EPHEMERAL_FS_LABEL]: '${var_mount_path}' -> '${HMP_EPHEMERAL_FS_LABEL["${var_mount_path}"]}'"
continue
;;
@@ -149,7 +149,7 @@ partition_encryption() {
do_log "info" "file_only" "3220() Partition: '/dev/${var_dev}${var_part}' opened as '/dev/mapper/${var_encryption_label}'."
### Create luksDump log entry.
printf "#------------------------------------------------------------------#" >> "${DIR_LOG}/${var_dev}_cryptsetup_luksdump.log"
printf "#------------------------------------------------------------------#\n" >> "${DIR_LOG}/${var_dev}_cryptsetup_luksdump.log"
cryptsetup luksDump "/dev/${var_dev}${var_part}" >> "${DIR_LOG}/${var_dev}_cryptsetup_luksdump.log"
### Store UUID of the LUKS container.

View File

@@ -184,7 +184,22 @@ mount_partition() {
--offset 2048 --cipher aes-xts-plain64 --key-size 512 \
--sector-size 4096 "/dev/disk/by-label/${var_fs_label}" "${var_encryption_label}"
mkdir -p "${TARGET}/tmp"
mkfs.ext4 "/dev/mapper/${var_encryption_label}"
# TODO: Remove Debug
### Debug Begin
[[ -b "/dev/mapper/${var_encryption_label}" ]] || {
do_log "error" "file_only" "Mapper-Device: '/dev/mapper/${var_encryption_label}' non-existing."
}
echo "lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL /dev/mapper/${var_encryption_label}"
lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL /dev/mapper/"${var_encryption_label}"
echo "/dev/mapper/${var_encryption_label}"
blkid /dev/mapper/"${var_encryption_label}"
echo "safe_exec mkfs.ext4 -E nodiscard,lazy_itable_init=1,lazy_journal_init=1 /dev/mapper/${var_encryption_label} ${ERR_MOUNTING_DEV}"
safe_exec mkfs.ext4 -E nodiscard,lazy_itable_init=1,lazy_journal_init=1 "/dev/mapper/${var_encryption_label}" "${ERR_MOUNTING_DEV}" || return "${ERR_MOUNTING_DEV}"
#mkfs.ext4 -E nodiscard,lazy_itable_init=1,lazy_journal_init=1 "/dev/mapper/${var_encryption_label}"
sleep 30
### Debug End
# TODO: Remove Debug
### Build the command in an array to keep word boundaries intact
declare -a ary_cmd2=(mount)