I created on nanoPI (Ubuntu Xenial) swap file on attached USB SSD HDD partition (not seperate partition but already existing) using such commands:
Code:
$ dd if=/dev/zero of=/path/to/swapfile bs=1M count=1024 # For 1GB swap file
$ mkswap /path/to/swapfile
$ swapon /path/to/swapfile
And set in /etc/sysctl.conf
My current /etc/fstab file looks like this:
Code:
LABEL=DYSK /home/pi/domoticz ext4 defaults,noatime,rw 1 2
/home/pi/domoticz/log /var/log none rw,bind 0 0
LABEL=4TB /home/pi/4TB ext4 defaults,noauto,noatime,rw 0 0
tmpfs /home/pi/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=150K,uid=pi,gid=pi 0 0
tmpfs /var/LOG tmpfs nodev,nosuid,size=10M 0 0
media:/TMP /home/pi/MEDIA nfs rw,noauto,soft 0 0
Where LABEL=DYSK is related to /dev/sda1, that is 120 GB SSD HDD (connected via USB).
My question is. What is the proper syntax of entry in /etc/fstab for swap file (not partition) to be mounted automatically during boot time?