I accidentally deleted my swap partition via gparted.
(I'm still logged in the system so restoring should be easier) Can someone help me please? I'm not sure how to configure it because the Ubuntu installation did it automatically.
There are 3 partitions right now:
/dev/sda1 -> Ubuntu installation root, mounted at '/'
/dev/sda2 -> Windows partition
/dev/sda3 -> Fedora partition
and /dev/sda4
if im not mistaken was the swap partition (4GB size)
Just use gparted again to create the additional
/dev/sda4
partition, and format it as type "linux swap".Example:
Here, I deleted the my
/dev/sda6
swap partition in the highlighted space:Right-click on that unallocated space, and click on New; choose type "linux-swap", click on Add:
Apply changes
Right-click on the new swap partition and choose "swapon":
Unless you removed it, the swap entry in
/etc/fstab
should still be there.grep swap.*sw /etc/fstab
, and you should see a long line like:If you do not see such a line, obtain the UUID using
sudo blkid | grep swap
, and add a line in this format to/etc/fstab
.If you do see such a line, but the UUID does not match what was returned by
blkid
, then edit fstab to match. (Note: The line in fstab should not be commented out, i.e., it should not start with #.)Run
free -m
to verify the swap partition is active.