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
You have no configuration for swap in
/etc/fstab
. Add following line to that file:You have to replace
<uuid>
with theuuid
of your swap partition. To do that, runsudo blkid
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.
After the upgrade to 12.04, certain little anomalies occurred. I was unaware my swap partition wasn't working until I tried to open a large file in Gimp.
blkid
shows:but it is not active according to System Monitor. The UUID was definitely right but no go ... not sure how I got to this command:
File manager showed me a 0 byte icon, filename control, -- so what was supposed to be written there? By what?
I edited the
/etc/fstab
file addingReboot and System Monitor shows it active.
This was the first site I found for help; in my case, the UUID did not work even though it was in fstab, so there is something missing 'in the middle'. This may help someone, who knows.