Make compatible with cryptsetup's encrypt hook
This merge request makes archiso
hook compatible with the correct output of the encrypt
hook, that can so be enabled
and configured to handle LUKS encrypted archiso systems.
Changes
When the encrypt
successfully ends, it exports a static root
variable
containing the path of the device mapper representing the root device
(by default /dev/mapper/root
).
Since the root device here is on a file on the bootmnt
and not on a disk directly,
I've changed the cryptsetup encrypt
hook to support an intermediate mount for bootmnt
on /run/cryptdev
.
Compatibility is obtained by bind mounting /run/cryptdev
to bootmnt
and replacing the loopmount with root
if it exists.
Value of archisodevice
has been changed from
/dev/disk/by-label/$archisolabel
to
dev/disk/by-uuid/$archisouuid
to avoid boot problems when multiple archisolabel
'd devices are inserted.
Depends on nested cryptkey support cryptsetup
merge request (where should it be submitted for review?).
Solves #14 and #15 (moved).
See specular MR on archlinux/archiso!217 (closed).
Merge request reports
Activity
mentioned in merge request archlinux/archiso!217 (closed)
mentioned in issue archlinux/archiso#156 (closed)
- Resolved by Tallero Tallero
- Resolved by Tallero Tallero
- Resolved by Tallero Tallero
mentioned in issue #14
If something like this were to be merged (no guarantees here), IMHO it should be in a separate optional
archiso_something
hook.It would probably either need a special kernel command line parameter to detect and set a correct
mount_handler
or some special handling in thearchiso
hook. I'd prefer the first option if possible.Check now.
I've published the changes to command-line kernel paramaters parsing I had to add to the
encrypt
hook to have it support opening bothcryptdevice
andcryptkey
from files instead than just disks on cryptsetup-nested-cryptkey.Edited by Tallero Tallero