Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.

hpr2791 :: LUKS like truecrypt

Klaatu demonstrates how to use LVM and cryptsetup to create and use portable encrypted filesystems

<< First, < Previous, Latest >>

Hosted by Klaatu on Monday 2019-04-15 is flagged as Clean and is released under a CC-BY-SA license.
Tags: encryption.

Listen in ogg, spx, or mp3 format. | Comments (0)

Part of the series: Privacy and Security

In this open series, you can contribute shows that are on the topic of Privacy and Security

Create an empty file of a predetermined size:

$ fallocate --length 512M foo.img

Create a LUKS container on it:

$ cryptsetup --verify-passphrase luksFormat foo.img

Set it up:

$ sudo cryptsetup luksOpen foo.img foo
$ ls /dev/mapper

Make a file system on it:

$ sudo mkfs.ext2 /dev/mapper/foo

If you don't need it for anything now, you can close it:

$ sudo cryptsetup luksClose foo
$ ls /dev/mapper

Mount it as a usable filesystem:

$ sudo mkdir /crypt
$ sudo mount /dev/mapper/foo /crypt

Depending on your system configuration, you may need to set up reasonable permissions:

$ sudo mkdir /crypt/mystuff
$ sudo chown klaatu:users /crypt/mystuff
$ sudo chmod 770 /crypt/mystuff
$ echo "hello world" >> /crypt/mystuff/file.txt

When you're finished using your encrypted vault, unmount and close it:

$ sudo umount /crypt
$ sudo cryptsetup luksClose foo

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr2791.wav

<< First, < Previous, Latest >>


Subscribe to the comments RSS feed.

<< First, < Previous, Latest >>

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the P in HPR stand for ?
Are you a spammer →
Who hosted this show →
What does HPR mean to you ?