ubuntu-rockchip
ubuntu-rockchip copied to clipboard
Swap file automatically generates on boot
Hi,
I'm using the ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5-plus image and there is a 1GB swap file in root that automatically generates every reboot. This is on a SD card so I definitely don't want a swap file to be generated on reboot. I have to manually disable swap by logging into SSH after rebooting. Deleting the file doesn't prevent it from regenerating on reboot.
This file doesn't exist in /etc/fstab. Is this documented anywhere? I can't find any details about this on google. What's the best method to permanently disable this?
Or does the x-systemd.growfs automatically generate it?
try:
sudo systemctl stop swapfile.swap sudo systemctl stop mkswap.service
sudo systemctl mask mkswap.service sudo systemctl mask swapfile.swap
sudo rm -rf /swapfile
Yes, I had to mask it. Disabling the services didn't work.
Thank you so much :)
Wouldn't that also disable swap file generation on other specified devices? For example, I might want to put a swap file on the nvme drive.
The problem is the 1GB swap file still generates regardless on the root partition of the SD card, I've tested that.