pmbootstrap install: fix cryptsetup warning, related refactoring
Two patches:
pmbootstrap install: fix cryptsetup warning
Create /run/cryptsetup before running "cryptsetup luksFormat" to fix:
WARNING: Locking directory /run/cryptsetup is missing!
pmb/install/format.py: refactor luks related code
format_and_mount_root() => format_luks_root():
* Rename to reflect what it's actually doing
* Move the FDE check from format_luks_root to the only caller
* Make arguments to "cryptsetup luksFormat" more readable
format_and_mount_pm_crypt() => format_and_mount_root():
* Rename to reflect what it's actually doing
* Don't overwrite device if doing FDE; instead provide the proper device
in the caller
The old function names were for historic reasons, early on it was only
possible to create encrypted installations with pmbootstrap.
How to test:
- Run
yes | pmbootstrap install --fde
, verify that the warning is not displayed in stdout - Run
yes | pmbootstrap install
to verify that the non-fde code path still works