diff --git a/chroot.sh b/chroot.sh index 2a72f84..ee7e751 100755 --- a/chroot.sh +++ b/chroot.sh @@ -1,15 +1,17 @@ # This file will be executed automatically once in chroot +# Set time zone ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime -cp /root/arch-dev-vm/locale.gen /etc/locale.gen - -hwclock --systohc - driveName=cat /root/arch-dev-vm/drive +hwclock --systohc + +# Generate locales +cp /root/arch-dev-vm/locale.gen /etc/locale.gen locale-gen +# Configure locale, kb layout & hostname echo "LANG=en_GB.UTF-8" > /etc/locale.conf echo "KEYMAP=de_CH-latin1" > /etc/vconsole.conf echo "arch-dev-vm" > /etc/hostname @@ -22,14 +24,15 @@ echo " sleep 2 -# mkinitcpio -P -plymouth-set-default-theme -R script +# Copy mkinitcpio config over to enable plymouth +# cp /root/arch-dev-vm/mkinitcpio.conf /etc/mkinitcpio.conf +# TODO: plymouth-set-default-theme -R script # Test boot mode (if efi or csm) - bootMode=cat /sys/firmware/efi/fw_platform_size -if ["$bootMode" == '64' ]; then +# Install grub (bootloader) +if [["$bootMode" == '64' ]]; then echo " ==> Detected EFI boot mode. Setting up accordingly. @@ -61,6 +64,7 @@ echo " read -p "Choose a password: " pwd +# Create users useradd -m arch-is-best passwd arch-is-best << EOD ${pwd} @@ -86,8 +90,8 @@ to finish up setup " +# Head into userland with userland.sh script chmod 777 /home/arch-is-best/arch-dev-vm/vscode-extensions - su arch-is-best -c /home/arch-is-best/arch-dev-vm/userland.sh diff --git a/install.sh b/install.sh index 7d45626..5db1ffa 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,8 @@ for you. This script doesn't check for EFI compatibility yet " + +# List all drives connected lsblk echo " @@ -47,12 +49,14 @@ echo " " sleep 2 +# Unmount and wipe selected drive umount -R /mnt wipefs -a "/dev/$driveName" sleep 2 +# Format disk using fstab echo -e " g n @@ -79,6 +83,7 @@ echo " " +# Format & sync time timedatectl echo "y\n" | mkfs.ext4 "/dev/${driveName}3" @@ -87,6 +92,8 @@ mount "/dev/${driveName}3" /mnt mkdir /mnt/boot mount "/dev/${driveName}2" /mnt/boot + +# Install packages pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootmgr grub man git xfce4 base-devel fish sudo gdm plymouth neovim --noconfirm