updates
This commit is contained in:
+20
-4
@@ -13,11 +13,27 @@ ln -sf /proc/mounts /etc/mtab # this allows us to use umount -a
|
||||
echo "0" >/proc/sys/kernel/printk
|
||||
|
||||
# Activate zram (auto-compression of RAM)
|
||||
# Compressed RAM consumes 1/2 or even 1/4 of original size
|
||||
# Setup static size of 500MB
|
||||
modprobe zram
|
||||
echo $(($(grep MemTotal /proc/meminfo | tr -s " " | cut -d " " -f 2)*2*1024)) > /sys/block/zram0/disksize
|
||||
echo $((512*1024*1024)) > /sys/block/zram0/disksize
|
||||
mkswap /dev/zram0
|
||||
swapon /dev/zram0
|
||||
swapon /dev/zram0 -p 32767
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
|
||||
echo
|
||||
echo "Here is a shell for you:"
|
||||
MEMORYDIR=/memory
|
||||
UNIONDIR=/union
|
||||
|
||||
# Setup empty union
|
||||
mkdir $MEMORYDIR
|
||||
mkdir $UNIONDIR
|
||||
mount -t ramfs ramfs $MEMORYDIR
|
||||
mount -t aufs -o xino=$MEMORYDIR/xino,br=$MEMORYDIR none $UNIONDIR
|
||||
|
||||
# find LiveKit data
|
||||
|
||||
# add to union
|
||||
|
||||
header "You shouldn't be here"
|
||||
echo "If you reached this far, something wrong happened. Here is a shell for you:"
|
||||
/bin/bash
|
||||
|
||||
Reference in New Issue
Block a user