Commit 2f318432 authored by pico.dev's avatar pico.dev Committed by GitHub

Merge pull request #33 from picodotdev/sid

Use periodic TRIM for SSD
parents 88f004f0 05537fa3
......@@ -17,15 +17,14 @@ Currently these scripts are for me but maybe they are useful for you too.
### Features
* GPT
* UEFI, BIOS
* GPT, UEFI, BIOS
* LVM and no LVM
* _root_ partition encrypted and no encrypted
* LVM on LUKS when LVM and encrypted
* File system formats ext4, btrfs (no swap), xfs
* Optional file swap
* WPA WIFI network installation
* TRIM for SSD storage
* Periodic TRIM for SSD storage
* VirtualBox guest utils
* Intel processors microcode
* Users creation and add to sudoers
......
......@@ -12,5 +12,6 @@ if [ -f alis.asciinema ]; then
cp alis.asciinema /mnt/var/log/alis.asciinema
fi
umount -R /mnt/boot
umount -R /mnt
reboot
\ No newline at end of file
......@@ -12,5 +12,6 @@ if [ -f alis-recovery.asciinema ]; then
cp alis-recovery.asciinema /mnt/var/log/alis-recovery.asciinema
fi
umount -R /mnt/boot
umount -R /mnt
reboot
\ No newline at end of file
......@@ -341,7 +341,7 @@ function partition() {
PARTITION_OPTIONS=""
if [ "$DEVICE_TRIM" == "true" ]; then
PARTITION_OPTIONS="defaults,noatime,discard"
PARTITION_OPTIONS="defaults,noatime"
fi
mount -o "$PARTITION_OPTIONS" "$DEVICE_ROOT" /mnt
......@@ -374,6 +374,10 @@ function install() {
sed -i 's/#Color/Color/' /mnt/etc/pacman.conf
sed -i 's/#TotalDownload/TotalDownload/' /mnt/etc/pacman.conf
if [ "$DEVICE_TRIM" == "true" ]; then
arch-chroot /mnt systemctl enable fstrim.timer
fi
}
function kernels() {
......@@ -393,8 +397,7 @@ function configuration() {
fi
if [ "$DEVICE_TRIM" == "true" ]; then
sed -i 's/relatime/noatime,discard/' /mnt/etc/fstab
sed -i 's/swap defaults/swap defaults,discard/' /mnt/etc/fstab
sed -i 's/relatime/noatime/' /mnt/etc/fstab
sed -i 's/issue_discards = 0/issue_discards = 1/' /mnt/etc/lvm/lvm.conf
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment