From 50f04d1a9aec7f42839f65f49c586dfc947efd62 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 11 Nov 2025 20:43:18 -0500 Subject: [PATCH] steps --- README.MD | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.MD b/README.MD index 7f00d54..6175b24 100644 --- a/README.MD +++ b/README.MD @@ -1,7 +1,8 @@ # LUKS-Encrypted Disk Images on Linux ## Using your package manager: (apt, etc...) install the following: -## Requires: cryptsetup, losetup, mount, umount, findmnt, blkid +## Requires: cryptsetup [Exmaple:$ sudo apt install cryptsetup] +## As well as: losetup, mount, umount, findmnt, blkid ## Optional: VBoxManage (VirtualBox), virsh (libvirt) ## 1st Make a symbloic link to your bin path: @@ -9,22 +10,36 @@ sudo ln -s "$(pwd)/luks-img.sh" /usr/local/bin/ ``` +## Make a folder for images and change into it. +``` +mkdir -p "$HOME/DiskImages" +cd "$HOME/DiskImages" +``` + ## Quick Starts ``` 1) Create & mount a new 4 GB encrypted image: sudo luks-img.sh create --file mydisk.img --size 4G -2) Open & mount an existing image: -sudo luks-img.sh open --file mydisk.img --mount /mnt/luks - -3) Close (unmount, close mapper, detach loop): +2) Close (unmount, close mapper, detach loop): sudo luks-img.sh close --file mydisk.img -4) Backup the LUKS header: +3) Open & mount an existing image: +sudo luks-img.sh open --file mydisk.img --mount /mnt/mydisk + +4) Change DIR perms and change into it. +sudo chown $USER:$USER /mnt/mydisk +cd /mnt/mydisk + +NOW copy data to it, and use it... + +5) Backup the LUKS header: sudo luks-img.sh header-backup --file mydisk.img --out mydisk.header *) Add a new key using an existing keyfile: sudo luks-img.sh add-key --file mydisk.img --keyfile /path/newkey --existing-keyfile /path/oldkey + +When Done - Repeat step #2 to CLOSE ``` ### If you want to add the image file to a VM: