From 21cbbd2d61b4020817c31cc61ea665301866e0c8 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Thu, 4 Sep 2025 17:09:58 -0400 Subject: Update arch install and setup scripts. Add paq clone to the install script --- distro/arch-install.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 distro/arch-install.sh (limited to 'distro/arch-install.sh') diff --git a/distro/arch-install.sh b/distro/arch-install.sh new file mode 100755 index 0000000..6cfb095 --- /dev/null +++ b/distro/arch-install.sh @@ -0,0 +1,77 @@ +#!/bin/sh +set -ex + +do_edit() { +printf "Edit \"$1\" ? : " +read -r resp +case $resp in + Y|y) arch-chroot "${_install_path}" nvim "$1" ;; + *) ;; +esac +} + +do_chroot() { + arch-chroot "$_install_path" "$@" +} + +_install_path="${INSTALL_PATH:-/mnt}" +_tz="${TZ:-America/New_York}" +_hostname="${INSTALL_HOSTNAME:-arch}" +PACSTRAP="${PACSTRAP:-1}" + +set +x +if ! awk '{print $2}' /proc/mounts | grep -q '^'"$_install_path"'$' ; then + echo "Cannot install to \"$_install_path\" because it is not a mountpoint" + echo "if you've mounted somewhere other than /mnt use:" + echo " env INSTALL_PATH= ./arch-install.sh" + echo where '' is the mount point in question + exit 1 +fi +set -x + +if [ $PACSTRAP -eq 1 ] ; then +pacstrap -K "$_install_path" \ + arch-install-scripts \ + base \ + base-devel \ + cryptsetup \ + dosfstools \ + e2fsprogs \ + efibootmgr \ + git \ + gptfdisk \ + grub \ + linux \ + linux-firmware \ + linux-firmware-marvell \ + lvm2 \ + networkmanager \ + nvim \ + sof-firmware \ + tmux \ + xfsprogs \ + +fi + + +genfstab -U "$_install_path" >> "${_install_path}/etc/fstab" + +do_edit /etc/fstab + +do_edit /etc/locale.gen + +do_chroot locale-gen + +do_chroot ln -sf "/usr/share/zoneinfo/$_tz" /etc/localtime + +do_edit /etc/mkinitcpio.conf + +do_chroot mkinitcpio -p linux + +do_edit /etc/default/grub + +do_chroot grub-install --target=x86_64-efi --removable --efi-directory=/boot/efi + +do_chroot grub-mkconfig -o /boot/grub/grub.cfg + +do_chroot passwd -- cgit v1.2.3