perf(scripts): replace /dev/random with /dev/urandom for swap keyfile generation

This change improves performance and reliability during installation by
preventing potential hangs caused by the blocking nature of /dev/random.
/dev/urandom is non-blocking and provides sufficient cryptographic
entropy for generating swap keyfiles in modern Linux environments.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot]
2026-02-09 20:01:51 +00:00
parent d799c2b15e
commit c3ab231bd1

View File

@@ -85,7 +85,7 @@ echo "LUKS encryption configured."
echo ""
echo "═══ Phase 4: Generating swap keyfile ═══"
dd bs=4096 count=1 if=/dev/random of=/tmp/swap.key iflag=fullblock
dd bs=4096 count=1 if=/dev/urandom of=/tmp/swap.key iflag=fullblock
chmod 600 /tmp/swap.key
echo "Adding keyfile to swap LUKS volume..."