Fail to encrypt loop back device using cryptsetup

5

2

The file is mounted to /dev/loop0. # losetup /dev/loop0 /path/to/container1. While trying to set up encryption getting error:

root@ubuntu:/# cryptsetup --verbose --cipher "aes-cbc-essiv:sha256" --key-size 256 --verify-passphrase luksFormat /dev/loop0

WARNING!
========
This will overwrite data on /dev/loop0 irrevocably.

Are you sure? (Type uppercase yes): yes
Command failed with code 22: Invalid argument

How to resolve this problem?


Used tutorial: http://www.g-loaded.eu/2005/11/10/encrypt-devices-using-dm-crypt-and-luks/

J.Olufsen

Posted 2012-04-27T12:56:59.167

Reputation: 2 534

1Are you sure? (Type uppercase yes): yes >> MUST be >> Are you sure? (Type uppercase yes): YES – J.Olufsen – 2012-04-27T13:08:20.383

Answers

6

The program asks you to type yes in Uppercase, just to make sure that you really read the message and you know what you are doing, instead of just "pressing next" of "pressing enter"...

So, you need to type YES to work.

woliveirajr

Posted 2012-04-27T12:56:59.167

Reputation: 3 820