1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

TEST-70-TPM2: use "truncate" to generate disk image

Let'se operate on a sparse file here, to reuduce memory use.
This commit is contained in:
Lennart Poettering 2022-08-19 11:19:59 +02:00
parent 1dad9cd766
commit d8776eed9b

View File

@ -5,10 +5,9 @@ set -o pipefail
export SYSTEMD_LOG_LEVEL=debug
# Prepare fresh disk image
img="/var/tmp/test.img"
dd if=/dev/zero of=$img bs=1024k count=20 status=none
truncate -s 20M $img
echo -n passphrase >/tmp/passphrase
cryptsetup luksFormat -q --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --use-urandom $img /tmp/passphrase