diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-03-16 10:35:05 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-03-16 10:35:05 (EDT) |
commit | e48fd6ba2e6c075ad1a1182fa197afef114958ab (patch) | |
tree | fff5376fb6cf67dd537ea3a97223972a4023b4d8 | |
parent | 175d90d1b1521d9ed11bb35548111d29a4455f07 (diff) | |
download | pc-inst-e48fd6ba2e6c075ad1a1182fa197afef114958ab.zip pc-inst-e48fd6ba2e6c075ad1a1182fa197afef114958ab.tar.gz pc-inst-e48fd6ba2e6c075ad1a1182fa197afef114958ab.tar.bz2 |
Don't run mkswap in target
-rw-r--r-- | hosts/alsvid200 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hosts/alsvid200 b/hosts/alsvid200 index 298f2f5..166e79c 100644 --- a/hosts/alsvid200 +++ b/hosts/alsvid200 @@ -96,9 +96,12 @@ postinst_pkgs=' do_postinst() { # Make swap file and set vm.swappiness. - in_target fallocate -l 12GiB /var/swap || return 1 - in_target chmod 0600 /var/swap || return 1 - in_target mkswap /var/swap || return 1 + # mkswap needs to be given the full path to the swap file including the + # root file system's mount point, or else this false error happens: + # mkswap: error: /var/swap is mounted; will not make swapspace + fallocate -l 12GiB "${target}/var/swap" || return 1 + chmod 0600 "${target}/var/swap" || return 1 + mkswap "${target}/var/swap" || return 1 printf 'vm.swappiness = 10\n' \ >"${target}/etc/sysctl.d/vm-swappiness.conf" |