mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-11-22 02:46:31 +03:00
Fix swap creation for low memory systems
This commit is contained in:
parent
14de907f4d
commit
74ad30e212
@ -276,7 +276,7 @@ function create_swapfile {
|
||||
truncate -s 0 /var/swap/swapfile
|
||||
chattr +C /var/swap/swapfile
|
||||
chmod 600 /var/swap/swapfile
|
||||
dd if=/dev/zero of=/var/swap/swapfile bs=1G count="$swap_size" status=progress
|
||||
dd if=/dev/zero of=/var/swap/swapfile bs=100M count="$((${swap_size}*10))" status=progress
|
||||
mkswap --label SwapFile /var/swap/swapfile
|
||||
swapon /var/swap/swapfile
|
||||
gcc -O2 "$HOME"/btrfs_map_physical.c -o "$HOME"/btrfs_map_physical
|
||||
|
2
vli.sh
2
vli.sh
@ -387,7 +387,7 @@ function create_swapfile {
|
||||
truncate -s 0 /var/swap/swapfile
|
||||
chattr +C /var/swap/swapfile
|
||||
chmod 600 /var/swap/swapfile
|
||||
dd if=/dev/zero of=/var/swap/swapfile bs=1G count="$swap_size" status=progress
|
||||
dd if=/dev/zero of=/var/swap/swapfile bs=100M count="$((${swap_size}*10))" status=progress
|
||||
mkswap --label SwapFile /var/swap/swapfile
|
||||
swapon /var/swap/swapfile
|
||||
gcc -O2 "$HOME"/btrfs_map_physical.c -o "$HOME"/btrfs_map_physical
|
||||
|
Loading…
Reference in New Issue
Block a user