From 8944bc93a5e6ba6e398a0b07f82d766707a76711 Mon Sep 17 00:00:00 2001 From: Logan Fick Date: Mon, 26 May 2025 11:15:35 -0400 Subject: [PATCH] Added support for asynchronous and periodic TRIM. --- install-arch-linux.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install-arch-linux.sh b/install-arch-linux.sh index 9d3c2fb..267063b 100755 --- a/install-arch-linux.sh +++ b/install-arch-linux.sh @@ -98,7 +98,7 @@ cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --hash sha512 --key- print "Unlocking ${root_partition}..." print "Please enter the passphrase you just used to unlock the newly encrypted partition." -cryptsetup open ${root_partition} cryptroot +cryptsetup open --allow-discards ${root_partition} cryptroot luks_uuid=$(cryptsetup luksDump ${root_partition} | grep 'UUID:' | awk '{print $2}') print "Formatting /dev/mapper/cryptroot..." @@ -106,7 +106,7 @@ mkfs.btrfs --csum xxhash /dev/mapper/cryptroot ## Arch Linux Installation Guide Step 1.11 - Mount the file systems print "Mounting partitions..." -mount -o noatime /dev/mapper/cryptroot /mnt +mount -o "noatime,discard=async" /dev/mapper/cryptroot /mnt mount --mkdir -o "fmask=0077,dmask=0077" ${efi_partition} /mnt/boot ## Arch Linux Installation Guide Step 2.2 - Install essential packages @@ -165,17 +165,20 @@ arch-chroot /mnt sh -c "cat > /boot/loader/entries/arch.conf" < /boot/loader/entries/arch-fallback.conf" <