43b1146b09838386c600211594e4980e455a3a2f
[platform/upstream/cryptsetup.git] / misc / dracut_90reencrypt / README
1 Example of simple dracut module for reencryption of system
2 LUKS drive on-the-fly.
3
4 Install in /usr/[share|lib]/dracut/modules.d/90reencrypt, then
5 build special intramfs "with dracut -a reencrypt -o crypt".
6 Reencrypt module doesn't work (has a conflict) with crypt module as
7 of now. After successfull reencryption reboot using original initramfs.
8
9 Dracut then recognize argument rd.luks.reencrypt=name:size,
10 e.g. rd.luks.reencrypt=sda2:52G means only 52G of device
11 will be reencrypted (default is whole device).
12 (Name is kernel name of device.)
13
14 Also, you may specify keyslot which you want to use for reencryption,
15 rd.luks.reencrypt_keyslot=<keyslot_number>. Bear in mind that if you
16 use this option, all other keyslots will be deactivated.
17
18 Another argument, rd.luks.reencrypt_key=/dev/sda:/path/to/keyfile
19 can be used to read password for specific keyslot from device containing
20 filesystem with a keyfile (file with a password). If you omit reencrypt_key
21 argument, reencryption would work only in case a LUKS container has
22 exactly one keyslot activated.
23
24 Arguments rd.luks.reencrypt_keyslot and rd.luks.reencrypt_key are not
25 mandatory.
26
27 Note that reencryption context is stored in ramdisk, any
28 fail can mean complete lost of data!
29
30 Copyright (C) 2012 Milan Broz <gmazyland@gmail.com>
31
32 This copyrighted material is made available to anyone wishing to use,
33 modify, copy, or redistribute it subject to the terms and conditions
34 of the GNU General Public License v.2.
35
36 You should have received a copy of the GNU General Public License
37 along with this program; if not, write to the Free Software Foundation,
38 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.