You can Control+Alt+F# to switch to other TTYs, aka non-gui consoles / terminals (depending on distro / init system). From there you can run tint2 or enable swap. One of the Control+Alt+F#'s should get you back the gui, used to be F7, now probably F1. Once on the non-gui variant, you can use Control+Alt+F#, but Alt+F# also works. From the gui you need all the keys.
$ export DISPLAY=:0; tint2 &
$ sudo dd if=/dev/zero of=/SWAP.swap bs=1M count=1000
$ sudo mkswap -v1 /SWAP.swap
$ sudo swapon /SWAP.swap
Creates a 1GB file, formats it for swap, and enables it. Once created, you only need to do that last one to enable it after boot, or add it to /etc/fstab and reboot to automate that process.
$ sudo swapon -s
$ free
To see that swap is there. It's ram as a FILE and a file that is a filesystem on a filesystem. Which is super slow compared to RAM, so you'll probably be aware of when you're using it. Beyond querying the statistics. But it should make things more stable if RAM is why it's having issues.
TBH, for issues like this, a fresh install can often prove the faster solution than trying to figure out what went wrong.
|