This commit is contained in:
oliver
2026-04-21 17:29:54 -03:00
commit 3deb54f5aa
116 changed files with 4551 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <volume_filename>"
exit 1
fi
FILE="/data/$1"
MAPPER_NAME="encrypted_volume"
MOUNT_POINT="/mnt/${MAPPER_NAME}"
dd if=/dev/zero of="$FILE" bs=1M count=10
echo "Setting up LUKS on $FILE..."
cryptsetup luksFormat "$FILE"
cryptsetup close "$MAPPER_NAME" || true
cryptsetup open "$FILE" "$MAPPER_NAME"
mkfs.ext4 /dev/mapper/"$MAPPER_NAME"