commit 4d9de646b915c2eca77294e70fce8eb7adeaae26 parent 427d6f2be603f866416a7610ec9b47ef7ca8b5f4 Author: awy <awy@awy.one> Date: Thu, 10 Apr 2025 15:18:31 +0300 update Diffstat:
M | install.sh | | | 1 | + |
M | post_chroot.sh | | | 13 | ++++++++++--- |
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/install.sh b/install.sh @@ -162,6 +162,7 @@ export rootpass export userpass export kerneltype export partitions +export encryption cp post_chroot.sh /mnt artix-chroot /mnt ./post_chroot.sh diff --git a/post_chroot.sh b/post_chroot.sh @@ -21,18 +21,25 @@ export LC_COLLATE="C" echo "$hostname" > /etc/hostname PARTUUID_ROOT=$(blkid -s PARTUUID -o value /dev/"$rootdrive") +PARTUUID_CRYPTROOT=$(blkid -s PARTUUID -o value /dev/mapper/cryptlvm) binkernel() { echo "options hid_apple fnmode=0" > /etc/modprobe.d/hid_apple.conf - pacman -S grub os-prober efibootmgr --noconfirm - grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub - sed -i "s#GRUB_CMDLINE_LINUX_DEFAULT=.*#GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet options root=PARTUUID=$PARTUUID_ROOT rw intel_iommu=on\"#g" /etc/default/grub + if [ "$encryption" = 1 ]; then + sed -i "s#GRUB_CMDLINE_LINUX_DEFAULT=.*#GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet options cryptdevice=PARTUUID=$PARTUUID_ROOT:cryptlvm root=PARTUUID=$PARTUUID_CRYPTROOT rw intel_iommu=on\"#g" /etc/default/grub + sed -i "s#HOOKS=.*#HOOKS=(base udev autodetect microcode modconf keyboard keymap consolefont block encrypt lvm2 filesystems fsck)#g" /etc/mkinitcpio.conf + else + sed -i "s#GRUB_CMDLINE_LINUX_DEFAULT=.*#GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet options root=PARTUUID=$PARTUUID_ROOT rw intel_iommu=on\"#g" /etc/default/grub + sed -i "s#HOOKS=.*#HOOKS=(base udev autodetect microcode modconf keyboard keymap consolefont block filesystems fsck)#g" /etc/mkinitcpio.conf + fi case $kerneltype in 1) pacman -S linux-headers --noconfirm ;; 2) pacman -S linux-zen-headers --noconfirm ;; *) printf "Invalid kernel" && exit 1 ;; esac + pacman -S grub os-prober efibootmgr --noconfirm + grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub } customkernel()