I continued to perfect the solution for the Ubuntu swap partition problem (although I just upgrated to 1G of memory so it doesn’t manifest itself as quickly as before, w00t!), and would like to share my results:
- As posted earlier, you can use the
freecommand to check if your swap partition is activated (on the last line where it says
Swapyou should see a non-zero value if it’s active)
- From ubuntuguide: you can use the
sudo fdisk -lcommand to find your swap partition (you can identify it by the system type where it should say
Linux swap / Solaris). Alternatively you can use gparted (not installed by default) to visually view your partition scheme.
- If you want to go the UUID route, you can find out the UUID which corresponds to a certain partition by doing
sudo vol_id -u device(in my case this would translate to
sudo vol_id -u /dev/hda5) – thanks to this blog post
- Now you have enough information to adjust your
/etc/fstabfile to point it to the corect swap partition. After restart, you should issue the
freecommand again to make sure that your swap partition got mounted properly.
One reason for using the old
/dev syntax would be that gparted seems to change the UUID of the swap partition when it moves it around (most recently I lost my swap partition when I was resizing the partitions on my machine).