mirror of
https://github.com/classy-giraffe/easy-arch.git
synced 2025-11-17 19:40:55 +00:00
Update easy-arch.sh
This commit is contained in:
parent
bd77fef350
commit
438e071245
1 changed files with 7 additions and 14 deletions
21
easy-arch.sh
21
easy-arch.sh
|
|
@ -142,7 +142,7 @@ kernel_selector
|
||||||
|
|
||||||
# Pacstrap (setting up a base sytem onto the new root).
|
# Pacstrap (setting up a base sytem onto the new root).
|
||||||
echo "Installing the base system (it may take a while)."
|
echo "Installing the base system (it may take a while)."
|
||||||
pacstrap /mnt base $kernel $microcode linux-firmware btrfs-progs grub grub-btrfs efibootmgr snapper reflector base-devel snap-pac
|
pacstrap /mnt base $kernel $microcode linux-firmware btrfs-progs grub grub-btrfs efibootmgr snapper reflector base-devel snap-pac zram-generator
|
||||||
|
|
||||||
network_selector
|
network_selector
|
||||||
|
|
||||||
|
|
@ -233,19 +233,12 @@ systemctl enable grub-btrfs.path --root=/mnt &>/dev/null
|
||||||
echo "Enabling systemd-oomd."
|
echo "Enabling systemd-oomd."
|
||||||
systemctl enable systemd-oomd --root=/mnt &>/dev/null
|
systemctl enable systemd-oomd --root=/mnt &>/dev/null
|
||||||
|
|
||||||
# Setting up ZRAM
|
# ZRAM configuration
|
||||||
MEMSIZE=$(awk '/^Mem/ {print $2}' <(free -m))
|
bash -c 'cat > /mnt/etc/systemd/zram-generator.conf' <<-'EOF'
|
||||||
if [ "${MEMSIZE}" -ge "8192" ]; then
|
[zram0]
|
||||||
ZRAMSIZE=8192
|
zram-fraction = 1
|
||||||
else
|
max-zram-size = 8192
|
||||||
ZRAMSIZE=${MEMSIZE}
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'zram' > /mnt/etc/modules-load.d/zram.conf
|
|
||||||
echo 'options zram num_devices=1' > /mnt/etc/modprobe.d/zram.conf
|
|
||||||
echo 'KERNEL=="zram0", ATTR{disksize}="'"${ZRAMSIZE}"'M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"' > /mnt/etc/udev/rules.d/99-zram.rules
|
|
||||||
echo '# ZRAM' >> /mnt/etc/fstab
|
|
||||||
echo '/dev/zram0 none swap defaults 0 0' >> /mnt/etc/fstab
|
|
||||||
|
|
||||||
# Finishing up
|
# Finishing up
|
||||||
echo "Done, you may now wish to reboot (further changes can be done by chrooting into /mnt)."
|
echo "Done, you may now wish to reboot (further changes can be done by chrooting into /mnt)."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue