summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-08 15:49:42 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-08 15:49:42 (EST)
commit5ceae8dbe5ef37f3f6051ae1fd1bbc98772edbd8 (patch)
tree85a93feaa5d653221c8332969b6fe01ccc733e29 /hosts
parenta5c81f2a3d802b373a3d89afbeeb70851853fe93 (diff)
downloadpc-inst-5ceae8dbe5ef37f3f6051ae1fd1bbc98772edbd8.zip
pc-inst-5ceae8dbe5ef37f3f6051ae1fd1bbc98772edbd8.tar.gz
pc-inst-5ceae8dbe5ef37f3f6051ae1fd1bbc98772edbd8.tar.bz2
Make swap file
Diffstat (limited to 'hosts')
-rw-r--r--hosts/alsvid20013
1 files changed, 10 insertions, 3 deletions
diff --git a/hosts/alsvid200 b/hosts/alsvid200
index 077e5c0..964e897 100644
--- a/hosts/alsvid200
+++ b/hosts/alsvid200
@@ -5,10 +5,10 @@ part_script='
,+,83,*
'
-# fs mp type options dump pass
+# fs mp type options dump pass
fstab='
- @DEV1@ / ext4 errors=remount-ro 0 1
- /var/swap swap swap defaults 0 0
+ @DEV1@ / ext4 errors=remount-ro 0 1
+ /var/swap0 swap swap defaults,pri=100 0 0
'
mirror='http://httpredir.debian.org/debian'
@@ -91,6 +91,13 @@ postinst_pkgs='
do_postinst()
{
+ # Make swap file and set vm.swappiness.
+ in_target fallocate -l 4GiB /var/swap0
+ in_target chmod 0600 /var/swap0
+ in_target mkswap /var/swap0
+ printf 'vm.swappiness = 10\n' \
+ >"${target}/etc/sysctl.d/vm-swappiness.conf"
+
# Add "deb-src" line and backports.
cat >"${target}/etc/apt/sources.list" <<-EOF
deb http://httpredir.debian.org/debian jessie main