To create a swap (or any) partition on a disk, none of the disk's partitions can be mount
ed. Boot from a Live Cd, or your installation medium in "Try Ubuntu" mode.
Run gparted
, make sure (in the upper right corner of gparted
's screen) you're manipulating the correct disk.
Use gparted
to move/resize partitions to create available space as big as you want your swap to be.
Create a partition in the available space, format it as 'swap'.
Boot back into your normal system.
Use blkid
to find the UUID, read man fstab
to see how to add swap to /etc/fstab
.
Then swapon
your new partition,
swapoff
and rm
your swapfile.
Thanks for your input! Looks like this might work too: https://askubuntu.com/questions/6769/hibernate-and-resume-from-a-swap-file
– ssssstut Mar 23 '24 at 08:14