Disable swapfile in drive manager.

Hi.

Under drive manager I can set the size of the swapfile, but I cannot select to disable it.
Where can I set the value to 0, meaning disabled swapfile.

I am going to make some headless video players (not connected to net), reading the video file from a USB stick.

My goal is to make it as robust as possible, as I know it will not be shutdown correctly, but simply powered off.

If I remove the swopfile, is it then possible to select the RO option in drive manager, and is there anything else I can do to prevent a corrupted SD card - and I don’t need any cron functionality, as the only thing is shall do is starting video looping on start up, and do that forever, until powered off.

There still needs a tiny swap file just in case (for stability), but setting the swappiness to 0 will keep it from swapping until it absolutely needs it.

Maybe, but the question was, where can I set the swappines to 0 in drive-manager?

As I can see it, the only thing I am able to set is the size.

And as mentioned before, the goal is to make a headless device - so I would actually prefer a crash (and a restart) than a corrupted sd card.

https://askubuntu.com/questions/103915/how-do-i-configure-swappiness

sysctl vm.swappiness=0

Actually it should be set to 1 not 0, zero disables completely on newer kernel

chrnobel
Open dietpi-drive_manager, go to your root drive/partition select swapfile and enter 0.

This will disable and remove the swap file. Swappiness does not need to be adjusted. If you have an external drive, I would instead enable the swap file on that external drive.

I would not disable cron jobs, since those include some core maintenance tasks. Although if you want to run the system completely R/O, then this is probably okay. Note that DietPi (it’s scripts) will most likely behave a bid strange or prompt errors when root is R/O. It is not really made for that. Some task for the feature to have a R/O mode.

Fair enough.

I have actually switched to Alpine instead, as it fits better to my need - runs entirely in RAM.

chrnobel
If you don’t require Debian functionalities but an in-RAM OS, I found TinyCore to be veeery tiny :slight_smile:.