From 829ff069348c9b5d62cabc0139904c1d088fb40a Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 6 Sep 2024 13:13:40 -0500 Subject: [PATCH] Fixed NVME setup 2 --- preinstall2nvme.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 preinstall2nvme.sh diff --git a/preinstall2nvme.sh b/preinstall2nvme.sh new file mode 100644 index 0000000..d4170c6 --- /dev/null +++ b/preinstall2nvme.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Create your user account following the README instructions before running this. +# Edit hostname on line 26 if desired + +# 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 archdesk > /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 + +echo "title Arch" > /boot/loader/entries/arch.conf +echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf +echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf + +echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/nvme0n1p3) rw" >> /boot/loader/entries/arch.conf + +# install dhcpd service + +sudo pacman -S dhcpcd --noconfirm --needed + +sudo systemctl enable dhcpcd@ADAPTER.service # EDIT "ADAPTER" WITH YOUR ADAPTER IN IP LINK + +# install NetworkManager + +sudo pacman -S networkmanager --noconfirm --needed +sudo systemctl enable NetworkManager.service + + +echo "-------------------------------------------------" +echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" +echo "-------------------------------------------------" \ No newline at end of file