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:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user