From 20241976cb2c1e0f9a7c562591b6a8be0b36024e Mon Sep 17 00:00:00 2001 From: proledatarian Date: Sat, 12 Feb 2022 18:54:06 +0000 Subject: [PATCH] Update install.sh --- install.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..018c664 --- /dev/null +++ b/install.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# Updating mirrors using reflector. +echo "Updating mirrors.." +echo-e +#reflector --verbose --latest 10 --country Germany --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist +reflector --verbose --latest 10 --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && +echo -e +echo "Done." + +# Installing base system. +echo "Installing basic packages.." +echo -e +pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm && +echo -e +echo "Base system installed." +echo -e + +# Generating fstab. +echo "Generating fstab." +genfstab -Up /mnt > /mnt/etc/fstab && +echo "Installed fstab." + +# Setting hostname. +echo "Please enter a hostname:" +read host && +echo $host > /mnt/etc/hostname +echo "Hostname set." + +# Setting locale. +echo "Setting and generating locale." +echo -e +localegen=$(cat /mnt/etc/locale.gen) +cat </mnt/etc/locale.gen +en_US.UTF-8 UTF-8 +de_DE.UTF-8 UTF-8 +EOF +echo "${localegen}" >>/mnt/etc/locale.gen +arch-chroot /mnt locale-gen +echo "LANG=de_DE.UTF-8" >/mnt/etc/locale.conf +echo -e +echo "Done." + +# Editing mkinitcpio.conf. +echo "Editing /etc/mkinitcpio.conf." +echo -e +sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf && +sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf && +echo -e +echo "Done." + +# Creating inital ramdisk. +echo "Creating inital ramdisk for linux-zen." +echo -e +arch-chroot /mnt mkinitcpio -p linux-zen && +echo "Done." + +# Enable network and display manager. +echo "Enabling Networkmanager and display manager (sddm)." +echo -e +arch-chroot /mnt systemctl enable NetworkManager sddm && +echo -e +echo "Done."