mrs_uav_system
mrs_uav_system copied to clipboard
Make the swap persistent after reboot.
Current install script shows steps how to create swap and use it. However, the swap is not persistent and will not be used after restarting pc. We need to modify /etc/fstab
file for it. (see https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-18-04/).
Note: Some people already have a swap file. Therefore, we should increase it instead of creating a new one.
We did not have to do this on any of our drones. Are you sure you are doing this correctly? I am using:
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=16
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Yes, I am using the same commands (see install script). To have swap permanent, you have to modify the fstab
file. Here is another link that mentions that too. They also show how to make swap larger if you already have one.
Ye, maybe, if you select to have "no swap" during Ubuntu installation. We should have the swap-setting script universal, therefore, let's also update https://github.com/ctu-mrs/uav_core/blob/master/miscellaneous/scripts/set_swap.sh.