Move swap info from notes to docs

This commit is contained in:
KemoNine 2020-07-31 23:40:07 +00:00
parent a01c944489
commit 4054c480fd
3 changed files with 19 additions and 14 deletions

View file

@ -4,3 +4,4 @@ This folder contains a bunch of general information on how to get the base of a
* [Base Firmware](base.md) * [Base Firmware](base.md)
* [Finalize Arch Setup](finalize_setup.md) * [Finalize Arch Setup](finalize_setup.md)
* [Setup swap (you really do need this)](swap.md)

17
docs/swap.md Normal file
View file

@ -0,0 +1,17 @@
# swap
The below commands will setup 1Gb of swap space as a file on the root filesystem and activate it for use.
``` sh
mkdir /swap
chattr +C /swap
fallocate -l 1024M /swap/swap.1
chmod 600 /swap/swap.1
mkswap /swap/swap.1
swapon /swap/swap.1
echo 'vm.swappiness=1' > /etc/sysctl.d/99-sysctl.conf
echo "/swap/swap.1 none swap defaults 0 0" >> /etc/fstab
swapon -a
```

View file

@ -1,16 +1,3 @@
########################################
# Swap
########################################
mkdir /swap
chattr +C /swap
fallocate -l 1024M /swap/swap.1
chmod 600 /swap/swap.1
mkswap /swap/swap.1
swapon /swap/swap.1
echo 'vm.swappiness=1' > /etc/sysctl.d/99-sysctl.conf
echo "/swap/swap.1 none swap defaults 0 0" >> /etc/fstab
######################################## ########################################
# Tweak journald # Tweak journald
######################################## ########################################