SYSTEMD-C...GENERATOR(8)
๐ NAME ๐
systemd-cryptsetup-generator โ bestie, it's the unit generator for /etc/crypttab ๐ (yes that's systemd-cryptsetup-generator(8) in full, say it with your chest)
โจ SYNOPSIS โจ
/usr/lib/systemd/system-generators/systemd-cryptsetup-generator
๐ฆ DESCRIPTION ๐ฆ
okay so listen. systemd-cryptsetup-generator is a generator โ and what it does is it takes your /etc/crypttab and translates it into native systemd units. Early. At boot. And also whenever the system manager's config gets reloaded. โจ
It'll create systemd-cryptsetup@.service(8) units as necessary โ as many as it needs, whenever it needs them. no cap.
And for the record: systemd-cryptsetup-generator implements systemd.generator(7). ๐
๐ KERNEL COMMAND LINE ๐
She understands the following kernel command line parameters, bestie. Every single one. Let's go:
luks=,rd.luks=โ takes a boolean argument. Defaults to"yes". If"no", it disables the generator entirely โ like, whole thing, gone.rd.luks=is honored only in the initrd, whileluks=is honored by both the main system and in the initrd.
Added in version 186. ๐ธ
luks.crypttab=,rd.luks.crypttab=โ takes a boolean argument. Defaults to"yes". If"no", the generator just ignores any devices configured in/etc/crypttab(luks.uuid=will still work however, so don't panic).rd.luks.crypttab=is honored only in initrd whileluks.crypttab=is honored by both the main system and in the initrd.
Added in version 186. ๐ธ
luks.uuid=,rd.luks.uuid=โ takes a LUKS superblock UUID as argument. This will activate the specified device as part of the boot process, as if it was listed in/etc/crypttab. You can specify this option more than once to set up multiple devices โ she's flexible like that ๐ .rd.luks.uuid=is honored only in the initrd, whileluks.uuid=is honored by both the main system and in the initrd.
If /etc/crypttab contains entries with the same UUID, then the name, keyfile and options specified there will be used. Otherwise, the device will have the name "luks-UUID".
If /etc/crypttab exists, only those UUIDs specified on the kernel command line will be activated in the initrd or the real root. ๐ซถ
Added in version 186. ๐ธ
luks.name=,rd.luks.name=โ takes a LUKS super block UUID followed by an"="and a name. This impliesrd.luks.uuid=orluks.uuid=and will additionally make the LUKS device given by the UUID appear under the provided name. iconic behavior honestly.
This parameter is the analogue of the first crypttab(5) field volume-name.
rd.luks.name= is honored only in the initrd, while luks.name= is honored by both the main system and in the initrd.
Added in version 218. ๐ธ
luks.data=,rd.luks.data=โ takes a LUKS super block UUID followed by a"="and a block device specification for the device hosting encrypted data.
For those entries specified with rd.luks.uuid= or luks.uuid=, the data device will be set to the one specified by rd.luks.data= or luks.data= of the corresponding UUID.
LUKS data device parameter is useful for specifying encrypted data devices with detached headers specified in luks.options entry containing "header=" argument. For example:
rd.luks.uuid=b40f1abf-2a53-400a-889a-2eccc27eaa40
rd.luks.options=b40f1abf-2a53-400a-889a-2eccc27eaa40=header=/path/to/luks.hdr
rd.luks.data=b40f1abf-2a53-400a-889a-2eccc27eaa40=/dev/sdx
Hence, in this case, we will attempt to unlock LUKS device assembled from data device "/dev/sdx" and LUKS header (metadata) put in "/path/to/luks.hdr" file. This syntax is for now only supported on a per-device basis, i.e. you have to specify LUKS device UUID. ๐ง
This parameter is the analogue of the second crypttab(5) field encrypted-device.
rd.luks.data= is honored only in the initrd, while luks.data= is honored by both the main system and in the initrd.
Added in version 247. ๐ธ
luks.key=,rd.luks.key=โ takes a password file name as argument, or a LUKS super block UUID followed by a"="and a password file name.
For those entries specified with rd.luks.uuid= or luks.uuid=, the password file will be set to the one specified by rd.luks.key= or luks.key= of the corresponding UUID, or the password file that was specified without a UUID.
It is also possible to specify an external device which should be mounted before we attempt to unlock the LUKS device. systemd-cryptsetup will use password file stored on that device. Device containing password file is specified by appending colon and a device identifier to the password file path. For example:
rd.luks.uuid=b40f1abf-2a53-400a-889a-2eccc27eaa40
rd.luks.key=b40f1abf-2a53-400a-889a-2eccc27eaa40=/keyfile:LABEL=keydev
Hence, in this case, we will attempt to mount file system residing on the block device with label "keydev". This syntax is for now only supported on a per-device basis, i.e. you have to specify LUKS device UUID. ๐ง
This parameter is the analogue of the third crypttab(5) field key-file.
rd.luks.key= is honored only in the initrd, while luks.key= is honored by both the main system and in the initrd.
Added in version 202. ๐ธ
luks.options=,rd.luks.options=โ takes a LUKS super block UUID followed by an"="and a string of options separated by commas as argument. This will override the options for the given UUID. override, periodt.
If only a list of options, without a UUID, is specified, they apply to any UUIDs not specified elsewhere, and without an entry in /etc/crypttab.
This parameter is the analogue of the fourth crypttab(5) field options.
It is possible to specify an external device which should be mounted before we attempt to unlock the LUKS device. systemd-cryptsetup will assemble LUKS device by combining data device specified in luks.data with detached LUKS header found in "header=" argument. For example:
rd.luks.uuid=b40f1abf-2a53-400a-889a-2eccc27eaa40
rd.luks.options=b40f1abf-2a53-400a-889a-2eccc27eaa40=header=/luks.hdr:LABEL=hdrdev
rd.luks.data=b40f1abf-2a53-400a-889a-2eccc27eaa40=/dev/sdx
Hence, in this case, we will attempt to mount file system residing on the block device with label "hdrdev", and look for "luks.hdr" on that file system. Said header will be used to unlock (decrypt) encrypted data stored on /dev/sdx. This syntax is for now only supported on a per-device basis, i.e. you have to specify LUKS device UUID. ๐ง
rd.luks.options= is honored only by initial RAM disk (initrd) while luks.options= is honored by both the main system and in the initrd.
Added in version 208. ๐ธ
๐ SEE ALSO ๐
systemd(1), crypttab(5), systemd-cryptsetup@.service(8), systemd-cryptenroll(1), cryptsetup(8), systemd-fstab-generator(8)
okay that's the whole page bestie, you ate it ๐ โจ this one's from systemd 262.1, mwah, go unlock something ๐ซถ๐๐
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms