From fe82e7d8b50ddb3d17cfe02f7b4891c8e6cf8b6f Mon Sep 17 00:00:00 2001 From: Logan Fick Date: Tue, 2 Dec 2025 14:19:43 -0500 Subject: [PATCH] Added support for using ext4 for root partition. --- install-arch-linux.sh | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/install-arch-linux.sh b/install-arch-linux.sh index 8f81ba9..0f29503 100755 --- a/install-arch-linux.sh +++ b/install-arch-linux.sh @@ -101,12 +101,36 @@ print "Please enter the passphrase you just used to unlock the newly encrypted p cryptsetup open --allow-discards ${root_partition} cryptroot luks_uuid=$(cryptsetup luksDump ${root_partition} | grep 'UUID:' | awk '{print $2}') -print "Formatting /dev/mapper/cryptroot..." -mkfs.btrfs --csum xxhash /dev/mapper/cryptroot +print "What file system would you like for the root partition?" +print " btrfs (Recommended)" +print " ext4" +read filesystem + +case $filesystem in + "ext4") + print "Formatting /dev/mapper/cryptroot as ext4..." + mkfs.ext4 /dev/mapper/cryptroot + ;; + + *) + print "Formatting /dev/mapper/cryptroot as btrfs..." + mkfs.btrfs --csum xxhash /dev/mapper/cryptroot + ;; +esac ## Arch Linux Installation Guide Step 1.11 - Mount the file systems print "Mounting partitions..." -mount -o "noatime,discard=async" /dev/mapper/cryptroot /mnt + +case $filesystem in + "ext4") + mount -o "noatime,discard" /dev/mapper/cryptroot /mnt + ;; + + *) + mount -o "noatime,discard=async" /dev/mapper/cryptroot /mnt + ;; +esac + mount --mkdir -o "fmask=0077,dmask=0077" ${efi_partition} /mnt/boot ## Arch Linux Installation Guide Step 2.2 - Install essential packages @@ -167,7 +191,7 @@ arch-chroot /mnt sh -c "cat > /boot/loader/entries/arch.conf" <