Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- LANG="en"
- REGION="US"
- S2_SCRIPT_URL=""
- read -p "\nEnter the disk to use for the installation (eg. /dev/sda):" INSTALL_DISK
- printf "fdisk will now be launched. On a disk with a GPT partition table, do the following:\n - Create a 512MB partition of the type EFI BOOT (code '1')\n - Create a partition for the linux filesystem."
- read -p "\nPress enter to continue: " NOOP
- fdisk $INSTALL_DISK
- read -p "\nEnter the path to the new EFI partition (eg. /dev/sda1): " EFI_PART
- read -p "\nEnter the path to the new LINUX partition (eg. /dev/sda2): " SYS_PART
- echo "Formatting partitions"
- set -x
- mkfs.fat -F32 $EFI_PART
- mkfs.xfs $SYS_PART
- set +x
- echo "Finding fastest pacman mirrors"
- set -x
- pacman -Syy
- pacman -S --noconfirm reflector rsync wget
- cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
- reflector -c "$REGION" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
- set +x
- echo "Installing base system"
- set -x
- mount $SYS_PART /mnt
- pacstrap /mnt base linux linux-firmware nano vim
- genfstab -U /mnt >> /mnt/etc/fstab
- mkdir /mnt/boot/efi
- mount $EFI_PART /mnt/boot/efi
- set +x
- echo "Downloading stage 2 install script"
- set -x
- wget $S2_SCRIPT_URL -O /mnt/arch-install-s2.sh
- set +x
- echo "Chroot to new base system"
- arch-chroot /mnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement