From 4054c480fd707a5a911bf8d3576e317c835faeab Mon Sep 17 00:00:00 2001 From: KemoNine Date: Fri, 31 Jul 2020 23:40:07 +0000 Subject: [PATCH] Move swap info from notes to docs --- docs/README.md | 3 ++- docs/swap.md | 17 +++++++++++++++++ notes.txt | 13 ------------- 3 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 docs/swap.md diff --git a/docs/README.md b/docs/README.md index 5120ad2..4baf301 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,4 +3,5 @@ This folder contains a bunch of general information on how to get the base of a PiFrame deployed. * [Base Firmware](base.md) -* [Finalize Arch Setup](finalize_setup.md) \ No newline at end of file +* [Finalize Arch Setup](finalize_setup.md) +* [Setup swap (you really do need this)](swap.md) diff --git a/docs/swap.md b/docs/swap.md new file mode 100644 index 0000000..adc4905 --- /dev/null +++ b/docs/swap.md @@ -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 + +``` diff --git a/notes.txt b/notes.txt index 6865048..c2f541c 100644 --- a/notes.txt +++ b/notes.txt @@ -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 ########################################