Swap partition after installation

Hello all, is it possible to make a swap partition AFTER I have done installation?
because I didn’t allot any space for swap while installation.
since I have 4GB RAM so I don’t want it to freeze up when enough memory isn’t present

1 Like

Hi!
It can if you have any allocate space in your disk using gparted or any other partition manager, after that, you need to add the swap partition to /etc/fstab and enable swap.
If you don have any allocate space, you can create a swapfile in your system, it work the same way.
Creating and Enabling a swap partition
Creating and Enabling a Static Swapfile

1 Like

I would recommend to consider systemd-swap.

https://wiki.archlinux.org/index.php/swap

Here is a similar thread:

3 Likes

for zRam/zSwap right? yeah already seen it just wanted to know anything important beforehand.

Why does it say,
Memory: 0MB ? :thinking:

Thank you for the steps.

status
systemctl status systemd-swap.service
● systemd-swap.service - Manage swap spaces on zram, files and partitions.
     Loaded: loaded (/usr/lib/systemd/system/systemd-swap.service; enabled; vendor preset: disabled)
     Active: active (exited) since Sun 2020-08-30 15:11:54 IST; 1h 43min ago
   Main PID: 846 (code=exited, status=0/SUCCESS)
     Status: "Swap unit activation finished"
      Tasks: 0 (limit: 4558)
     Memory: 0B
     CGroup: /systemd-swap.service

Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Removing files in /var/lib/systemd-swap/swapfc/...
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Zswap: backup current configuration: start
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Zswap: backup current configuration: complete
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Zswap: set new parameters: start
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Zswap: Enable: 1, Comp: zstd, Max pool %: 25, Zpool: z3fold
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Zswap: set new parameters: complete
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: Writing destroy info...
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: swapD: pick up devices from systemd-gpt-auto-generator
Aug 30 15:11:49 Homelaptop systemd-swap[846]: INFO: swapD: searching swap devices
Aug 30 15:11:54 Homelaptop systemd[1]: Started Manage swap spaces on zram, files and partitions..

Currently or let’s say at the moment you not need swap space as your programs are happy with the RAM you have. :grin:

time to make them unhappy now :crazy_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.