My Device: Raspberry PiRaspberry Pi
Situation: Automatic Force-Restoration of Swap service
For some unknown reason, Raspbian OS permanently reloads the swap service at every reboot. Here are the steps I have to do after every reboot:
- sudo sync
- sudo swapoff -a
- sudo apt-get purge -y dphys-swapfile
- sudo rm /var/swap
- sudo sync
This stop swap, but it's back on a reboot. Writing this list into a script makes the script vanish upon a reboot with swap service activated.
Here are the other attempts I've tried and tried to kill the swap service:
- sudo update-rc.d dphys-swapfile disable
- sudo rm /etc/init.d/dphys-swapfile
- sudo dphys-swapfile disable
- sudo dphys-swapfile swapoff
- sudo dphys-swapfile uninstall
- sudo echo "CONF_SWAPSIZE=0" > /etc/dphys-swapfile
- sudo rm /etc/dphys-swapfile
- sudo chmod -x /etc/init.d/dphys-swapfile
All attempts to kill the swap service failed! Upon a reboot, a 100MB swapfile is restored and activated.