pull/2/head
beech 8 months ago
parent d574100ced
commit 77634af32f
  1. 8
      install1.sh
  2. 16
      install2.sh

@ -1,6 +1,5 @@
#!/usr/bin/env bash
# This WILL format and partition 1 drive in your system. It is recommended to run the script with only 1 drive installed.
# Selected drive is /dev/sda, replace sda with specified drive if you have multiple. List drives with 'lsblk'
# Change boot, SWAP, and root partition sizes to your needs in lines 15-17
echo "-------------------------------------------------"
@ -29,7 +28,7 @@ sgdisk -n 2:0:8G $DISK # partition 2 (SWAP - change to desired size)
sgdisk -n 3:0:75G $DISK # partition 3 (root - change to desired size)
sgdisk -n 4:0:0 $DISK # partition 4 (home, remaining space)
# set partition types
# partition types
sgdisk -t 1:ef00 $DISK
sgdisk -t 2:8200 $DISK
sgdisk -t 3:8300 $DISK
@ -41,7 +40,6 @@ sgdisk -c 2:"swap" $DISK
sgdisk -c 3:"root" $DISK
sgdisk -c 4:"home" $DISK
# make filesystems
echo -e "\nCreating Filesystems...\n$HR"
mkfs.fat -F32 ${DISK}1 # FAT32 boot partition
@ -50,7 +48,6 @@ swapon ${DISK}2 # enable SWAP
mkfs.ext4 ${DISK}3
mkfs.ext4 ${DISK}4
# mount partitions
echo "-------------------------------------------------"
echo "Mounting Partitions"
echo "-------------------------------------------------"
@ -63,7 +60,6 @@ mount ${DISK}4 /mnt/home
cp install2.sh /mnt/
# set download mirrors
echo "-------------------------------------------------"
echo "Enabling Parallel Downloads"
echo "-------------------------------------------------"
@ -86,8 +82,6 @@ echo "-------------------------------------------------"
echo "Installed - Generating fstab"
echo "-------------------------------------------------"
# generate fstab
genfstab -U -p /mnt >> /mnt/etc/fstab
echo "-------------------------------------------------"

@ -19,42 +19,28 @@ echo "Create a USER password (should be different from root)."
passwd $Username
# File edits for user permissions
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
echo "Defaults rootpw" >> /etc/sudoers
# generate locales
sudo pacman -S bash-completion --noconfirm --needed
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
# set timezone & link HW clock
ln -s /usr/share/zoneinfo/America/Chicago > /etc/localtime
hwclock --systohc --utc
# set hostname - edit archdesk with preferred hostname
echo "Set hostname (name of your PC on the network)."
read -r -p "Enter the hostname: " HOSTNAME
echo ${HOSTNAME} > /etc/hostname
# Enable TRIM
systemctl enable fstrim.timer
# mount efivars
mount -t efivarfs efivarfs /sys/firmware/efi/efivars/
# install bootloader
bootctl install
touch /boot/loader/entries/arch.conf
@ -65,8 +51,6 @@ echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf
echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) rw" >> /boot/loader/entries/arch.conf
# install NetworkManager
sudo pacman -S networkmanager --noconfirm --needed
sudo pacman -S git --noconfirm --needed
sudo sed -i '/^\#\[multilib\]/s/^#//' /etc/pacman.conf