Last active
January 25, 2023 09:22
-
-
Save sowbug/c7f83140581fbe3e6a9b3ddf24891e77 to your computer and use it in GitHub Desktop.
Making an encrypted DVD image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All the code from http://billauer.co.il/blog/2010/10/encrypted-iso-dvd-luks-dm-crypt-fedora-linux/ | |
MB_COUNT=100 | |
VOL_NAME=MyVolName | |
DIR_TO_COPY=/tmp/mydir | |
# Make a 100MB disk image | |
dd if=/dev/zero of=disk.img bs=1M count=$MB_COUNT | |
# become root | |
sudo su | |
# write to the image | |
# ****** NOTE that you'll be prompted three times for a passphrase | |
losetup /dev/loop1 disk.img && \ | |
cryptsetup luksFormat /dev/loop1 && \ | |
cryptsetup luksOpen /dev/loop1 mybackupdisk && \ | |
genisoimage -R -J -joliet-long -graft-points -V $VOL_NAME -o /dev/mapper/mybackupdisk $DIR_TO_COPY | |
# close the device | |
cryptsetup luksClose /dev/mapper/mybackupdisk && \ | |
losetup -d /dev/loop1 | |
# Now you have disk.img that can be burned to a CD/DVD, or just mount it in Linux. | |
# You'll be prompted for the passphrase each time you mount it. |
You're welcome. I'm glad it worked for you.
…On Wed, Nov 18, 2020, 9:20 AM David ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Hi @sowbug <https://github.com/sowbug> !
Finally I've found a working procedure for creation of cdrom/dvd encrypted
using DM-CRYPT!
I searched a lot on the net, finding only guides that were obsolete or
didn't work, I had also asked in the DM-CRYPT mailing list (
https://www.saout.de/pipermail/dm-crypt/2020-November/006628.html) but
without arriving at the expected result, and finally, when I was giving up
hope, I found this yours page that saved me! :-)
I've only changed disk.img to disk.iso, and burned it, and success!
Thanks again ;-)
Davide
Italy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://gist.github.com/c7f83140581fbe3e6a9b3ddf24891e77#gistcomment-3531970>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHMVB47OSPNLOTY4EPMJTSQP66PANCNFSM4T2ILDAQ>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @sowbug !
Finally I've found a working procedure for creation of cdrom/dvd encrypted using DM-CRYPT!
I searched a lot on the net, finding only guides that were obsolete or didn't work, I had also asked in the DM-CRYPT mailing list (https://www.saout.de/pipermail/dm-crypt/2020-November/006628.html) but without arriving at the expected result, and finally, when I was giving up hope, I found this yours page that saved me! :-)
I've only changed disk.img to disk.iso, and burned it, and success!
Thanks again ;-)
Davide
Italy