From 52d319d23ea2274198532f79af1727cc217dff4b Mon Sep 17 00:00:00 2001 From: Adil Date: Thu, 28 Oct 2021 22:42:48 -0400 Subject: [PATCH 1/9] Fix: variable $nc not substituted $nc in sed should be used between " insted of ' No need for sudo --- 1-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-setup.sh b/1-setup.sh index 9787056..1d68750 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -25,9 +25,9 @@ echo "-------------------------------------------------" echo "Changing the makeflags for "$nc" cores." TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') if [[ $TOTALMEM -gt 8000000 ]]; then -sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$nc"/g' /etc/makepkg.conf +sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf echo "Changing the compression settings for "$nc" cores." -sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g' /etc/makepkg.conf +sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf fi echo "-------------------------------------------------" echo " Setup Language to US and set locale " From a08edc2071c60cb81044aaf17f1889bff5b3c2e1 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Thu, 28 Oct 2021 20:28:07 -0700 Subject: [PATCH 2/9] Adds $SCRIPTHOME var, replacing hardcoded file paths Just adds dynamic file repo naming for people forking the project. When they rename their repository, it will maintain the validity of the file paths, which used to be hard coded, hopefully this makes forking the project less error prone, and increases portability --- 0-preinstall.sh | 2 +- 1-setup.sh | 6 +++--- 2-user.sh | 4 ++-- 3-post-setup.sh | 5 ----- archtitus.sh | 18 ++++++++++++++---- kderice-backup.sh | 2 +- kderice-restore.sh | 4 ++-- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 557574b..b96b396 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -122,7 +122,7 @@ linux /vmlinuz-linux initrd /initramfs-linux.img options root=LABEL=ROOT rw rootflags=subvol=@ EOF -cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus +cp -R ${SCRIPT_DIR} /mnt/root/$SCRIPTHOME cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" echo "-- Check for low memory systems <8G --" diff --git a/1-setup.sh b/1-setup.sh index 9787056..3bf8f12 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -219,14 +219,14 @@ fi echo -e "\nDone!\n" if ! source install.conf; then read -p "Please enter username:" username -echo "username=$username" >> ${HOME}/ArchTitus/install.conf +echo "username=$username" >> ${HOME}/$SCRIPTHOME/install.conf fi if [ $(whoami) = "root" ]; then useradd -m -G wheel,libvirt -s /bin/bash $username passwd $username - cp -R /root/ArchTitus /home/$username/ - chown -R $username: /home/$username/ArchTitus + cp -R /root/$SCRIPTHOME /home/$username/ + chown -R $username: /home/$username/$SCRIPTHOME read -p "Please name your machine:" nameofmachine echo $nameofmachine > /etc/hostname else diff --git a/2-user.sh b/2-user.sh index 841f04a..a89aaab 100755 --- a/2-user.sh +++ b/2-user.sh @@ -55,9 +55,9 @@ for PKG in "${PKGS[@]}"; do done export PATH=$PATH:~/.local/bin -cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/ +cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/ArchTitus/kde.knsv +konsave -i $HOME/$SCRIPTHOME/kde.knsv sleep 1 konsave -a kde diff --git a/3-post-setup.sh b/3-post-setup.sh index 12c73f4..e636006 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -46,8 +46,3 @@ sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers # Replace in the same state cd $pwd -echo " -############################################################################### -# Done - Please Eject Install Media and Reboot -############################################################################### -" diff --git a/archtitus.sh b/archtitus.sh index db537b3..c981a50 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -1,7 +1,17 @@ #!/bin/bash +# Find the name of the folder the scripts are in +export SCRIPTHOME="$(basename -- $PWD)" +echo "Scripts are in dir named $SCRIPTHOME" + bash 0-preinstall.sh - arch-chroot /mnt /root/ArchTitus/1-setup.sh - source /mnt/root/ArchTitus/install.conf - arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/ArchTitus/2-user.sh - arch-chroot /mnt /root/ArchTitus/3-post-setup.sh \ No newline at end of file + arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh + source /mnt/root/$SCRIPTHOME/install.conf + arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh + arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh + +echo " +############################################################################### +# Done - Please Eject Install Media and Reboot +############################################################################### +" \ No newline at end of file diff --git a/kderice-backup.sh b/kderice-backup.sh index dbc109f..883e40a 100755 --- a/kderice-backup.sh +++ b/kderice-backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -cp -r $HOME/.config/kitty $HOME/ArchTitus/dotfiles/kitty +cp -r $HOME/.config/kitty $HOME/$SCRIPTHOME/dotfiles/kitty konsave -s kde konsave -e kde \ No newline at end of file diff --git a/kderice-restore.sh b/kderice-restore.sh index ee2b8aa..4b3a481 100755 --- a/kderice-restore.sh +++ b/kderice-restore.sh @@ -1,8 +1,8 @@ #!/bin/bash export PATH=$PATH:~/.local/bin -cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/ +cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/ArchTitus/kde.knsv +konsave -i $HOME/$SCRIPTHOME/kde.knsv sleep 1 konsave -a kde From 2c33e38f2045c9d904820dbd26dfba6c9c9675f8 Mon Sep 17 00:00:00 2001 From: anthonp Date: Fri, 29 Oct 2021 23:48:40 -0500 Subject: [PATCH 3/9] Update 0-preinstall.sh Small typo toward EOF. 0-setup vs 1-setup. --- 0-preinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 557574b..e908314 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -141,5 +141,5 @@ if [[ $TOTALMEM -lt 8000000 ]]; then echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab #Add swap to fstab, so it KEEPS working after installation. fi echo "--------------------------------------" -echo "-- SYSTEM READY FOR 0-setup --" +echo "-- SYSTEM READY FOR 1-setup --" echo "--------------------------------------" From 56af0194ae59c6d206fce602f1a20949554bf846 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sun, 31 Oct 2021 13:18:24 -0500 Subject: [PATCH 4/9] filelight fix --- 1-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-setup.sh b/1-setup.sh index 8f22386..679da42 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -96,7 +96,7 @@ PKGS=( 'egl-wayland' 'exfat-utils' 'extra-cmake-modules' -'filelite' +'filelight' 'flex' 'fuse2' 'fuse3' From 41709928c7f51bdf9c5aa6103104412258894650 Mon Sep 17 00:00:00 2001 From: Kqpa <76552592+Kqpa@users.noreply.github.com> Date: Mon, 1 Nov 2021 08:54:34 +0300 Subject: [PATCH 5/9] wifi-menu is no more --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b754006..165f03a 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,15 @@ __[Arch Linux Installation Guide](https://github.com/rickellis/Arch-Linux-Instal ### No Wifi -```bash -sudo wifi-menu -``` +#1: Run `iwctl` + +#2: Run `device list`, and find your device name. + +#3: Run `station [device name] scan` + +#4: Run `station [device name] get-networks` + +#5: Find your network, and run `station [device name] connect [network name]`, enter your password and run `exit`. You can test if you have internet connection by running `ping google.com`. ## Credits From fdd79d35f6e423be9297c4f97c2c0f428ed135d1 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Mon, 1 Nov 2021 13:04:41 -0500 Subject: [PATCH 6/9] Boot Fixes --- 0-preinstall.sh | 8 -------- 3-post-setup.sh | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 855a3f1..95c2373 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -106,14 +106,6 @@ echo "--------------------------------------" pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed genfstab -U /mnt >> /mnt/etc/fstab echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf -echo "--------------------------------------" -echo "-- GRUB Bootloader Installation --" -echo "--------------------------------------" -if [[ ! -d "/sys/firmware/efi" ]]; then - grub-install --boot-directory=/mnt/boot ${DISK} -else - grub-install --efi-directory=/mnt/boot ${DISK} -fi cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" diff --git a/3-post-setup.sh b/3-post-setup.sh index a550d20..326e5ee 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -9,7 +9,14 @@ #------------------------------------------------------------------------- echo -e "\nFINAL SETUP AND CONFIGURATION" - +echo "--------------------------------------" +echo "-- GRUB Bootloader Installation --" +echo "--------------------------------------" +if [[ ! -d "/sys/firmware/efi" ]]; then + grub-install --boot-directory=/boot ${DISK} +else + grub-install --efi-directory=/boot ${DISK} +fi grub-mkconfig -o /boot/grub/grub.cfg # ------------------------------------------------------------------------ From c8caa02826f3f29036aaf3cb9545c4462049264a Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 3 Nov 2021 14:05:41 -0500 Subject: [PATCH 7/9] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b78f314 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Chris Titus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From f43c3f71b1d42aa4c99ba5ce616a1a1b26b506fa Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 3 Nov 2021 14:11:35 -0500 Subject: [PATCH 8/9] Fix BIOS Boot Added checks for efi and bios at different points --- 0-preinstall.sh | 6 ++++++ 3-post-setup.sh | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 63058dd..84b15d8 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -109,6 +109,12 @@ echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" +echo "--GRUB BIOS Bootloader Install&Check--" +echo "--------------------------------------" +if [[ ! -d "/sys/firmware/efi" ]]; then + grub-install --boot-directory=/boot ${DISK} +fi +echo "--------------------------------------" echo "-- Check for low memory systems <8G --" echo "--------------------------------------" TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') diff --git a/3-post-setup.sh b/3-post-setup.sh index 326e5ee..ba51c5d 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -10,11 +10,9 @@ echo -e "\nFINAL SETUP AND CONFIGURATION" echo "--------------------------------------" -echo "-- GRUB Bootloader Installation --" +echo "-- GRUB EFI Bootloader Install&Check--" echo "--------------------------------------" -if [[ ! -d "/sys/firmware/efi" ]]; then - grub-install --boot-directory=/boot ${DISK} -else +if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} fi grub-mkconfig -o /boot/grub/grub.cfg From 009b76e2376eb1259f4de231003704318360e1d3 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Wed, 3 Nov 2021 23:45:26 -0700 Subject: [PATCH 9/9] update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f1a9a1f..8e189eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ install.conf -installlog.txt \ No newline at end of file +installlog.txt +archnikus.code-workspace \ No newline at end of file