Commit 180c767e authored by Tails developers's avatar Tails developers
Browse files

Add opt-in way to debug memory wipe feature.

Pass sdmemdebug=1 to the kexec'd kernel if debug=wipemem is set on the Tails
main kernel cmdline. Then, in kexec'd initramfs, sleep instead of halt/reboot if
sdmemdebug=1.
parent e2ffa211
......@@ -15,6 +15,9 @@ case "$1" in
start)
echo "KERNEL_IMAGE=\"$(/usr/local/bin/tails-get-bootinfo kernel)\"" >> "$KEXEC_CONF"
echo "INITRD=\"$(/usr/local/bin/tails-get-bootinfo initrd)\"" >> "$KEXEC_CONF"
if grep -qw debug=wipemem /proc/cmdline; then
echo 'APPEND="${APPEND} sdmemdebug=1"' >> "$KEXEC_CONF"
fi
;;
*)
echo "Usage: $0 start" >&2
......
......@@ -34,6 +34,11 @@ if [ -n "${sdmem}" ] ; then
/usr/bin/sdmem "-${sdmemopts}"
fi
if [ "${sdmemdebug}" = 1 ] ; then
echo "Going to sleep 10 minutes. Happy dumping!"
sleep 600
fi
case "${sdmem}" in
halt)
/sbin/halt -fndp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment