Update install.sh

This commit is contained in:
proledatarian 2022-10-18 14:34:45 +00:00
parent 39c5e529ad
commit dde60935d8
1 changed files with 16 additions and 16 deletions

View File

@ -201,6 +201,7 @@ btrfs subvolume create /mnt/@home &&
btrfs subvolume create /mnt/@snapshots &&
umount /mnt &&
echo
echo "Mounting.." &&
mount -o compress=zstd,subvol=@root /dev/mapper/main /mnt &&
@ -236,21 +237,21 @@ echo "Base system installed."
echo
# Generating fstab.
echo "Generating fstab."
echo "Generating fstab.."
genfstab -Up /mnt > /mnt/etc/fstab &&
echo "Done."
echo
# Setting hostname.
echo "Setting hostname"
echo "Setting hostname.."
echo $host > /mnt/etc/hostname &&
echo "Done."
echo
# Setting locale.
echo "Setting and generating locale."
echo "Setting and generating locale.."
#localegen=$(cat /mnt/etc/locale.gen)
cat <<EOF >/mnt/etc/locale.gen
cat << EOF >/mnt/etc/locale.gen
en_US.UTF-8 UTF-8
#de_DE.UTF-8 UTF-8
EOF
@ -282,39 +283,38 @@ echo "Done."
echo
# Editing mkinitcpio.conf.
echo "Editing /etc/mkinitcpio.conf."
echo
echo "Editing /etc/mkinitcpio.conf.."
#sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf &&
sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf &&
echo "Done."
echo
# Creating inital ramdisk.
echo "Creating inital ramdisk for linux-zen."
echo "Creating inital ramdisk for linux-zen.."
arch-chroot /mnt mkinitcpio -p linux-zen &&
echo "Done."
echo
# Enable network and display manager.
echo "Enabling Networkmanager and display manager (sddm)."
echo "Enabling Networkmanager and display manager (sddm).."
arch-chroot /mnt systemctl enable NetworkManager sddm &&
echo "Done."
echo
# Set root password
echo "Setting root password:"
echo "Setting root password.."
echo -en "$pwrt\n$pwrt" | arch-chroot /mnt passwd
echo "Done."
echo
# Install bootloader.
echo "Installing systemd-boot."
echo "Installing systemd-boot.."
arch-chroot /mnt bootctl --path=/boot install &&
echo "Done."
echo
# Set bootloader entry.
echo "Setting up bootloader."
echo "Setting up bootloader.."
cat << EOF > /mnt/boot/loader/entries/arch.conf &&
title Arch Linux
linux /vmlinuz-linux-zen
@ -348,7 +348,7 @@ echo "Done."
echo
# Set username, password and group.
echo "Adding user."
echo "Adding user.."
arch-chroot /mnt useradd -m $user &&
echo -en "$pwur\n$pwur" | arch-chroot /mnt passwd $user &&
arch-chroot /mnt gpasswd -a $user wheel &&
@ -357,7 +357,7 @@ echo "Done."
echo
# Enabling sddm auto-login.
echo "Enabling auto-login."
echo "Enabling auto-login.."
mkdir /mnt/etc/sddm.conf.d &&
cat << EOF > /mnt/etc/sddm.conf.d/autologin.conf
[Autologin]
@ -368,7 +368,7 @@ echo "Done."
echo
# Unmounting and rebooting.
echo "Unmounting system."
echo "Unmounting system.."
umount /mnt/boot &&
umount /mnt &&
echo "Done."
@ -377,5 +377,5 @@ echo
clear
echo "Installation finished!"
echo "Press [Enter] to shut down, then remove the installation media and start your system."
poweroff
#echo "Press [Enter] to shut down, then remove the installation media and start your system."
#poweroff