This commit is contained in:
mfgbhatti 2022-02-19 14:31:12 +00:00
parent 02b4bf41d2
commit 8e4a592db1
2 changed files with 16 additions and 3 deletions

View File

@ -56,7 +56,7 @@ sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
# pacman -Sy --noconfirm # pacman -Sy --noconfirm
refresh_pacman refresh_pacman
echo "Installing desktop" echo "Installing $DESKTOP"
case "$DESKTOP" in case "$DESKTOP" in
"default") "default")
while IFS= read -r LINE; do while IFS= read -r LINE; do
@ -187,7 +187,7 @@ systemd)
else else
echo -e "title\tArchTitus\nlinux\t/vmlinuz-linux\ninitrd\t/initramfs-linux.img\ninitrd\t/$IMG\noptions\troot=PARTUUID=$PART_UUID rw" >/boot/loader/entries/arch.conf echo -e "title\tArchTitus\nlinux\t/vmlinuz-linux\ninitrd\t/initramfs-linux.img\ninitrd\t/$IMG\noptions\troot=PARTUUID=$PART_UUID rw" >/boot/loader/entries/arch.conf
fi fi
echo -e "default arch\ntimeout 5" >/boot/loader/loader.conf echo -e "default arch\ntimeout\t5" >/boot/loader/loader.conf
else else
echo "ERROR! Systemd-boot is not supported for BIOS systems" echo "ERROR! Systemd-boot is not supported for BIOS systems"
exit 1 exit 1
@ -220,7 +220,7 @@ none)
;; ;;
esac esac
echo "Adding User" echo "Adding User and hostname"
if [ "$(id -u)" = "0" ]; then if [ "$(id -u)" = "0" ]; then
if [[ "$LAYOUT" -eq 1 ]]; then if [[ "$LAYOUT" -eq 1 ]]; then
groupadd libvirt groupadd libvirt
@ -238,10 +238,16 @@ fi
# Making sure to edit mkinitcpio conf if luks is selected # Making sure to edit mkinitcpio conf if luks is selected
# add encrypt in mkinitcpio.conf before filesystems in hooks # add encrypt in mkinitcpio.conf before filesystems in hooks
if [[ "$LVM" -eq 1 ]]; then if [[ "$LVM" -eq 1 ]]; then
echo "LVM hooks added"
sed -i "/^HOOK/s/filesystems/${HOOKS[*]}/" /etc/mkinitcpio.conf sed -i "/^HOOK/s/filesystems/${HOOKS[*]}/" /etc/mkinitcpio.conf
elif [[ "$LUKS" -eq 1 ]]; then elif [[ "$LUKS" -eq 1 ]]; then
echo "LUKS hooks added"
sed -i "s/^HOOK.*/HOOKS=(${HOOKS[*]})/" /etc/mkinitcpio.conf sed -i "s/^HOOK.*/HOOKS=(${HOOKS[*]})/" /etc/mkinitcpio.conf
elif [[ "$LAYOUT" -eq 1 ]]; then
echo "Btrfs module added"
sed -i '/^MODULES=/s/(/(btrfs/' /etc/mkinitcpio.conf
fi fi
if [[ -f "/etc/mkinitcpio.conf" ]]; then if [[ -f "/etc/mkinitcpio.conf" ]]; then

View File

@ -63,6 +63,13 @@ sequence() {
arch-chroot /mnt /root/ArchTitus/1-setup.sh arch-chroot /mnt /root/ArchTitus/1-setup.sh
arch-chroot /mnt /usr/bin/runuser -u "$USERNAME" -- /home/"$USERNAME"/ArchTitus/2-user.sh arch-chroot /mnt /usr/bin/runuser -u "$USERNAME" -- /home/"$USERNAME"/ArchTitus/2-user.sh
arch-chroot /mnt /root/ArchTitus/3-post-setup.sh arch-chroot /mnt /root/ArchTitus/3-post-setup.sh
logo
echo -ne "
------------------------------------------------------------------------
Automated Arch Linux Installer
-------------------------------------------------------------------------
Done - Please Eject Install Media and Reboot
"
} }
logo logo