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