Commit 7c25a98e authored by Tails developers's avatar Tails developers

Kexec the running kernel for the memory wipe feature.

Using a 686-pae kernel at memory wipe time might fix
bugs/sdmem_does_not_clear_all_memory.
parent 91ab49a4
#!/bin/sh
running_on_amd64_hardware() {
egrep '^flags[[:space:]]+:' /proc/cpuinfo | uniq | grep -qw lm
running_pae_kernel() {
uname -r | grep -qs '686-pae$'
}
case "$1" in
kernel)
boot_kernel="$2"
# if running_on_amd64_hardware ; then
# echo "$boot_kernel" | sed -e 's,/vmlinuz$,/vmlinuz3,'
# else
echo "$boot_kernel"
# fi
if running_pae_kernel ; then
echo "$boot_kernel" | sed -e 's,/vmlinuz$,/vmlinuz2,'
else
echo "$boot_kernel"
fi
;;
initrd)
boot_initrd="$2"
# if running_on_amd64_hardware ; then
# echo "$boot_initrd" | sed -e 's,/initrd\.img$,/initrd3.img,'
# else
echo "$boot_initrd"
# fi
if running_pae_kernel ; then
echo "$boot_initrd" | sed -e 's,/initrd\.img$,/initrd2.img,'
else
echo "$boot_initrd"
fi
;;
*)
usage "$0 kernel|initrd"
......
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