问题原文
原帖链接 · user283167 · CC BY-SA 4.0
I am running a custom compiled 3.18.9 kernel and I am wondering about the best way to disable swap on the system. I also use init if it makes a difference.
Is it enough to comment or remove the swap line in /etc/fstab to prevent swap from working/mounting at boot or should I recompile the kernel without Support for paging of anonymous memory (swap) to be 100% sure it does not get enabled?
I run encrypted partitions and want to prevent accidental leakage to the hard disk. My system specifications are also great enough that I can survive in a swap-less environment.
已采纳解答
原帖链接 · Aaron Copley · CC BY-SA 3.0
- Identify configured swap devices and files with
cat /proc/swaps. - Turn off all swap devices and files with
swapoff -a. - Remove any matching reference found in
/etc/fstab. - Optional: Destroy any swap devices or files found in step 1 to prevent their reuse. Due to your concerns about leaking sensitive information, you may wish to consider performing some sort of secure wipe.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
