commit 95a6a03a560bb386dcc2040daed3452be165c9b3 Author: Konstantin Bukley Date: Wed Oct 15 13:41:32 2025 +0300 chore: init with draft script diff --git a/README.md b/README.md new file mode 100644 index 0000000..175c7ac --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +fuck my shit up and install arch diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e9993a8 --- /dev/null +++ b/install.sh @@ -0,0 +1,117 @@ +# prepare ssd +sgdisk -Z /dev/nvme0n1 # zap all on disk +sgdisk -a 2048 -o /dev/nvme0n1 # new gpt disk 2048 alignment + +sgdisk -n 1::+1G --typecode=1:ef00 --change-name=1:'BOOT' /dev/nvme0n1 # UEFI Boot Partition +sgdisk -n 2::+32G --typecode=2:8200 --change-name=2:'SWAP' /dev/nvme0n1 # SWAP +sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' /dev/nvme0n1 # partition 3 (Root), default start, remaining + +mkfs.vfat -F32 -n "BOOT" /dev/nvme0n1p1 +swapon /dev/nvme0n1p2 +mkfs.btrfs -L ROOT /dev/nvme0n1p3 -f + +mount -t btrfs /dev/nvme0n1p3 /mnt + +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home +btrfs subvolume create /mnt/@var +btrfs subvolume create /mnt/@tmp +btrfs subvolume create /mnt/@.snapshots + +# unmount root to remount with subvolume +umount /mnt + +mount -o subvol=@ /dev/nvme0n1p3 /mnt +mkdir -p /mnt/{home,var,tmp,.snapshots} + +mount -o subvol=@home /dev/nvme0n1p3 /mnt/home +mount -o subvol=@tmp /dev/nvme0n1p3 /mnt/tmp +mount -o subvol=@var /dev/nvme0n1p3 /mnt/var +mount -o subvol=@.snapshots /dev/nvme0n1p3 /mnt/.snapshots + +# mount boot +mkdir -p /mnt/boot/efi +mount -t vfat -L BOOT /mnt/boot/ + +# timedatectl set-ntp true +# pacman -Sy --noconfirm archlinux-keyring # update keyrings to latest to prevent packages failing to install + +iso=$(curl -4 ifconfig.co/country-iso) # grab country code +reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist +cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist + +sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf +pacstrap --noconfirm --needed /mnt \ + base base-devel linux linux-firmware git \ + dhcpcd btrfs-progs amd-ucode nvidia nvidia-utils nvidia-xconfig \ + neovim sudo archlinux-keyring wget pipewire pavucontrol + +genfstab -L /mnt >>/mnt/etc/fstab +cat /mnt/etc/fstab + +bootctl --esp-path=/mnt/boot install + +root_uuid=$(blkid /dev/nvme0n1p3 -s UUID -o value) +cat >/mnt/boot/loader/entries/arch.conf <