mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user