Question
why is my swap partition being used after reboot?
Context
My system has two swap areas in Linux Ubuntu:
sudo swapon --show
NAME TYPE SIZE USED PRIO
/dev/nvme0n1p7 partition 977M 0B -2
/media/EXT4/swapfile file 4G 0B -3
I disabled swap partition:
sudo swapon --show
NAME TYPE SIZE USED PRIO
/media/EXT4/swapfile file 4G 0B -3
and edited /etc/fstab:
UUID=8a098c42-9f6a-4f04-8dac-87298f1f460d / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=CC3B-B509 /boot/efi vfat umask=0077 0 1
# swap was on /dev/nvme0n1p7 during installation
# UUID=0379c3e0-faa9-4bd8-a7ce-4bc1d2d1d9a2 none swap sw 0 0
# 4TB HDD, linux partition
UUID="847df9cc-ba11-469f-a36e-ac4228c005f8" /media/EXT4 ext4 user,errors=remount-ro,auto,exec,rw
# 4TB HDD, windows partition
UUID="2A2506563E8741C6" /media/NTFS ntfs user,errors=remount-ro,auto,exec,rw,uid=1000,gid=1000
/media/EXT4/swapfile none swap sw 0 0
Problem
after reboot the partition is used as swap area:
sudo swapon --show
NAME TYPE SIZE USED PRIO
/dev/nvme0n1p7 partition 977M 0B -2
/media/EXT4/swapfile file 4G 0B -3
Further information
Here is the information of linux-swap:
it shows the UUID in fstab is commented out for swap partition.
These are the flags for linux-swap: (none are used)
I do not have Autofs installed on my system.
cat /etc/fstab. – mook765 Mar 10 '19 at 13:54/etc/fstab.bakwhich has the linux-swap. – linuxUser123 Mar 10 '19 at 14:07/media/EXT4/swapfile none swap sw 0 0... suggesting that you didn't actually disable it. – Thomas Ward Jul 28 '19 at 00:35/media/– linuxUser123 Jul 29 '19 at 06:35