Imported Upstream version 2.6.1
[platform/upstream/cryptsetup.git] / man / cryptsetup-luksFormat.8.adoc
1 = cryptsetup-luksFormat(8)
2 :doctype: manpage
3 :manmanual: Maintenance Commands
4 :mansource: cryptsetup {release-version}
5 :man-linkstyle: pass:[blue R < >]
6 :COMMON_OPTIONS:
7 :ACTION_LUKSFORMAT:
8
9 == Name
10
11 cryptsetup-luksFormat - initialize a LUKS partition and set the initial passphrase
12
13 == SYNOPSIS
14
15 *cryptsetup _luksFormat_ [<options>] <device> [<key file>]*
16
17 == DESCRIPTION
18
19 Initializes a LUKS partition and sets the initial passphrase (for
20 key-slot 0), either via prompting or via <key file>. Note that if the
21 second argument is present, then the passphrase is taken from the file
22 given there, without the need to use the --key-file option. Also note
23 that for both forms of reading the passphrase from a file you can give
24 '-' as file name, which results in the passphrase being read from stdin
25 and the safety-question being skipped.
26
27 You cannot call luksFormat on a device or filesystem that is mapped or
28 in use, e.g., mounted filesystem, used in LVM, active RAID member, etc. The
29 device or filesystem has to be un-mounted in order to call luksFormat.
30
31 To use specific version of LUKS format, use _--type luks1_ or _type luks2_.
32
33 *<options>* can be [--hash, --cipher, --verify-passphrase, --key-size,
34 --key-slot, --key-file (takes precedence over optional second argument),
35 --keyfile-offset, --keyfile-size, --use-random, --use-urandom, --uuid,
36 --volume-key-file, --iter-time, --header, --pbkdf-force-iterations,
37 --force-password, --disable-locks, --timeout, --type, --offset,
38 --align-payload (deprecated)].
39
40 For LUKS2, additional *<options>* can be [--integrity,
41 --integrity-no-wipe, --sector-size, --label, --subsystem, --pbkdf,
42 --pbkdf-memory, --pbkdf-parallel, --disable-locks, --disable-keyring,
43 --luks2-metadata-size, --luks2-keyslots-size, --keyslot-cipher,
44 --keyslot-key-size, --integrity-legacy-padding].
45
46 *WARNING:* Doing a luksFormat on an existing LUKS container will make
47 all data in the old container permanently irretrievable unless you have a
48 header backup.
49
50 include::man/common_options.adoc[]
51 include::man/common_footer.adoc[]