Skip to content

Commit

Permalink
WiP: cryptsetup 2.6.1 : bonify log grabber helper and put it under in…
Browse files Browse the repository at this point in the history
…itrd/bin/test_reencrypt_ram.sh

To test and report results:
- Please got to recovery shell (hit r frenetically the moment bootsplash flickers)
- Have a USB thumb drive connected with either fat32/etx3/ext4/exFAT
- Type "test_" and then tab tab. Type enter when you see test_reencrypt_ram.sh
- Wait for test to be over. This is when "Done." is showed.
- Disconnect USB Thumb drive.
- Upload from another computer the content of "ram_reencrypt.log" to github PR

Signed-off-by: Thierry Laurion <[email protected]>
  • Loading branch information
tlaurion committed Nov 28, 2023
1 parent af13404 commit bf2891c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 18 additions & 0 deletions initrd/bin/test_reencrypt_ram.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
echo "Mounting USB drive to /media"
mount-usb --mode rw

echo "PLACEHOLDER - Creating 8GB file in /tmp" | tee -a /media/ram_reencrypt.log
dd if=/dev/zero of=/tmp/disk8gb.raw bs=1M count=8k | tee -a /media/ram_reencrypt.log
echo "This is test passphrase used to create LUKS key" > /tmp/passphrase.txt

#cryptsetup benchmark | tee -a /media/ram_reencrypt.log

echo "PLACEHOLDER - Creating LUKS container on /tmp/disk8gb.raw..." | tee -a /media/ram_reencrypt.log
cryptsetup luksFormat /tmp/disk8gb.raw --debug --batch-mode --key-file /tmp/passphrase.txt | tee -a /media/ram_reencrypt.log

echo "PLACEHOLDER - Reeencrypting LUKS container on /tmp/disk8gb.raw..." | tee -a /media/ram_reencrypt.log
cryptsetup reencrypt /tmp/disk8gb.raw --disable-locks --force-offline-reencrypt --debug --batch-mode --key-file /tmp/passphrase.txt | tee -a /media/ram_reencrypt.log

echo "PLACEHOLDER - Unmounting USB drive from /media"
umount /media
echo "Done. You can remove USB drive now and upload ram_reencrypt.log from another computer to github PR."
4 changes: 0 additions & 4 deletions initrd/test_reencrypt_ram.sh

This file was deleted.

0 comments on commit bf2891c

Please sign in to comment.