Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
27
rated 0 times [  27] [ 0]  / answers: 1 / hits: 24937  / 3 Years ago, thu, september 30, 2021, 8:40:35

I am on Ubuntu 12.04, Thinkpad Edge 13, encrypted home. A message in the System Monitor tells me that swap is "not available". I can get it back using the swapon option in gparted (I thought I could also do sudo swapon -a in a terminal, but that does not work). The problem is that I have to swapon after every reboot. How can I switch it back on so it stays on even after a reboot?



my fstab:



# # <file system> <mount point> <type> <options> <dump> <pass> 
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=47641b93-9d12-4e6a-b803-dde28f0e5725 / ext4 errors=remount-ro 0 1

More From » swap

 Answers
2

You have no configuration for swap in /etc/fstab. Add following line to that file:



UUID=<uuid> none   swap    sw    0       0   


You have to replace <uuid> with the uuid of your swap partition. To do that, run sudo blkid



$ sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="88A0D0A1A0D09752" TYPE="ntfs"
/dev/sda2: UUID="0620D9F920D9EFA3" TYPE="ntfs"
/dev/sda5: UUID="c282b418-2045-4852-8789-88a44360a0bb" TYPE="ext4"
/dev/sda6: UUID="f99c6a0c-790a-45ca-a1a9-8874f5a2999b" TYPE="ext4"
/dev/sda7: UUID="4cc2e909-ebd1-4c72-abee-aa32035bf330" TYPE="swap"


This is a list of my partitions, and as you see, /dev/sda7 is my swap partition. So you can copy the value of UUID corresponding to your swap, omitting the quotes, and use it for your fstab file.


[#35224] Saturday, October 2, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elopingapo

Total Points: 206
Total Questions: 110
Total Answers: 114

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
elopingapo questions
Fri, Sep 10, 21, 17:52, 3 Years ago
Tue, May 24, 22, 00:42, 2 Years ago
Sat, Apr 23, 22, 03:16, 2 Years ago
Fri, Jan 13, 23, 06:41, 1 Year ago
;