From 3060cec1b2a2c5eb74fa3980f8a6d1155ed009a0 Mon Sep 17 00:00:00 2001 From: OlaYZen Date: Sun, 12 Dec 2021 02:44:12 +0100 Subject: [PATCH] v1.0 --- 0-preinstall.sh.bak | 133 ----------------------- 1-setup.sh.bak | 255 -------------------------------------------- 2-user.sh.bak | 65 ----------- olaios.sh.bak | 13 --- 4 files changed, 466 deletions(-) delete mode 100644 0-preinstall.sh.bak delete mode 100644 1-setup.sh.bak delete mode 100644 2-user.sh.bak delete mode 100644 olaios.sh.bak diff --git a/0-preinstall.sh.bak b/0-preinstall.sh.bak deleted file mode 100644 index d28eabe..0000000 --- a/0-preinstall.sh.bak +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env bash -#--------------------------------------------- -# ██████ ██ █████ ██ ██████ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -#██ ██ ██ ███████ ██ ██ ██ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -# ██████ ███████ ██ ██ ██ ██████ ███████ -#--------------------------------------------- -SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -echo "-------------------------------------------------" -echo "Setting up mirrors for optimal download " -echo "-------------------------------------------------" -iso=$(curl -4 ifconfig.co/country-iso) -timedatectl set-ntp true -pacman -S --noconfirm pacman-contrib terminus-font -setfont ter-v22b -sed -i 's/^#Para/Para/' /etc/pacman.conf -pacman -S --noconfirm reflector rsync grub -cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup -echo -e "----------------------------------------------" -echo -e " ██████ ██ █████ ██ ██████ ███████ " -echo -e " ██ ██ ██ ██ ██ ██ ██ ██ ██ " -echo -e " ██ ██ ██ ███████ ██ ██ ██ ███████ " -echo -e " ██ ██ ██ ██ ██ ██ ██ ██ ██ " -echo -e " ██████ ███████ ██ ██ ██ ██████ ███████ " -echo -e "-------------------------------------------------------------------------" -echo -e "-Setting up $iso mirrors for faster downloads" -echo -e "-------------------------------------------------------------------------" - -reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist -mkdir /mnt - - -echo -e "\nInstalling prereqs...\n$HR" -pacman -S --noconfirm gptfdisk btrfs-progs - -echo "-------------------------------------------------" -echo "-------select your disk to format----------------" -echo "-------------------------------------------------" -lsblk -echo "Please enter disk to work on: (example /dev/sda)" -read DISK -echo "THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK" -read -p "are you sure you want to continue (y/N):" formatdisk -case $formatdisk in - -y|Y|yes|Yes|YES) -echo "--------------------------------------" -echo -e "\nFormatting disk...\n$HR" -echo "--------------------------------------" - -# disk prep -sgdisk -Z ${DISK} # zap all on disk -sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment - -# create partitions -sgdisk -n 1::+1M --typecode=1:ef02 --change-name=1:'BIOSBOOT' ${DISK} # partition 1 (BIOS Boot Partition) -sgdisk -n 2::+100M --typecode=2:ef00 --change-name=2:'EFIBOOT' ${DISK} # partition 2 (UEFI Boot Partition) -sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} # partition 3 (Root), default start, remaining -if [[ ! -d "/sys/firmware/efi" ]]; then - sgdisk -A 1:set:2 ${DISK} -fi - -# make filesystems -echo -e "\nCreating Filesystems...\n$HR" -if [[ ${DISK} =~ "nvme" ]]; then -mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" -mkfs.btrfs -L "ROOT" "${DISK}p3" -f -mount -t btrfs "${DISK}p3" /mnt -else -mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2" -mkfs.btrfs -L "ROOT" "${DISK}3" -f -mount -t btrfs "${DISK}3" /mnt -fi -ls /mnt | xargs btrfs subvolume delete -btrfs subvolume create /mnt/@ -umount /mnt -;; -*) -echo "Rebooting in 3 Seconds ..." && sleep 1 -echo "Rebooting in 2 Seconds ..." && sleep 1 -echo "Rebooting in 1 Second ..." && sleep 1 -reboot now -;; -esac - -# mount target -mount -t btrfs -o subvol=@ -L ROOT /mnt -mkdir /mnt/boot -mkdir /mnt/boot/efi -mount -t vfat -L EFIBOOT /mnt/boot/ - -if ! grep -qs '/mnt' /proc/mounts; then - echo "Drive is not mounted can not continue" - echo "Rebooting in 3 Seconds ..." && sleep 1 - echo "Rebooting in 2 Seconds ..." && sleep 1 - echo "Rebooting in 1 Second ..." && sleep 1 - reboot now -fi - -echo "--------------------------------------" -echo "-- Arch Install on Main Drive --" -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 -cp -R ${SCRIPT_DIR} /mnt/root/OlaiOS -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=/mnt/boot ${DISK} -fi -echo "--------------------------------------" -echo "-- Check for low memory systems <8G --" -echo "--------------------------------------" -TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') -if [[ $TOTALMEM -lt 8000000 ]]; then - #Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything. - mkdir /mnt/opt/swap #make a dir that we can apply NOCOW to to make it btrfs-friendly. - chattr +C /mnt/opt/swap #apply NOCOW, btrfs needs that. - dd if=/dev/zero of=/mnt/opt/swap/swapfile bs=1M count=2048 status=progress - chmod 600 /mnt/opt/swap/swapfile #set permissions. - chown root /mnt/opt/swap/swapfile - mkswap /mnt/opt/swap/swapfile - swapon /mnt/opt/swap/swapfile - #The line below is written to /mnt/ but doesn't contain /mnt/, since it's just / for the sysytem itself. - 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 1-setup --" -echo "--------------------------------------" diff --git a/1-setup.sh.bak b/1-setup.sh.bak deleted file mode 100644 index b417178..0000000 --- a/1-setup.sh.bak +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env bash -#--------------------------------------------- -# ██████ ██ █████ ██ ██████ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -#██ ██ ██ ███████ ██ ██ ██ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -# ██████ ███████ ██ ██ ██ ██████ ███████ -#--------------------------------------------- -echo "--------------------------------------" -echo "-- Network Setup --" -echo "--------------------------------------" -pacman -S networkmanager dhclient --noconfirm --needed -systemctl enable --now NetworkManager -echo "-------------------------------------------------" -echo "Setting up mirrors for optimal download " -echo "-------------------------------------------------" -pacman -S --noconfirm pacman-contrib curl -pacman -S --noconfirm reflector rsync -cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak - -nc=$(grep -c ^processor /proc/cpuinfo) -echo "You have " $nc" cores." -echo "-------------------------------------------------" -echo "Changing the makeflags for "$nc" cores." -TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') -if [[ $TOTALMEM -gt 8000000 ]]; then -sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf -echo "Changing the compression settings for "$nc" cores." -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 " -echo "-------------------------------------------------" -sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen -locale-gen -timedatectl --no-ask-password set-timezone America/Chicago -timedatectl --no-ask-password set-ntp 1 -localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" - -# Set keymaps -localectl --no-ask-password set-keymap us - -# Add sudo no password rights -sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers - -#Add parallel downloading -sed -i 's/^#Para/Para/' /etc/pacman.conf - -#Enable multilib -sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf -pacman -Sy --noconfirm - -echo -e "\nInstalling Base System\n" - -PKGS=( -'mesa' # Essential Xorg First -'xorg' -'xorg-server' -'xorg-apps' -'xorg-drivers' -'xorg-xkill' -'xorg-xinit' -'xterm' -'plasma-desktop' # KDE Load second -'alsa-plugins' # audio plugins -'alsa-utils' # audio utils -'ark' # compression -'audiocd-kio' -'autoconf' # build -'automake' # build -'base' -'bash-completion' -'bind' -'binutils' -'bison' -'bluedevil' -'bluez' -'bluez-libs' -'bluez-utils' -'breeze' -'breeze-gtk' -'bridge-utils' -'btrfs-progs' -'celluloid' # video players -'cmatrix' -'code' # Visual Studio code -'cronie' -'cups' -'dialog' -'discover' -'dolphin' -'dosfstools' -'dtc' -'efibootmgr' # EFI boot -'egl-wayland' -'exfat-utils' -'extra-cmake-modules' -'filelight' -'flex' -'fuse2' -'fuse3' -'fuseiso' -'gamemode' -'gcc' -'gimp' # Photo editing -'git' -'gparted' # partition management -'gptfdisk' -'grub' -'grub-customizer' -'gst-libav' -'gst-plugins-good' -'gst-plugins-ugly' -'gwenview' -'haveged' -'htop' -'iptables-nft' -'jdk-openjdk' # Java 17 -'kate' -'kcodecs' -'kcoreaddons' -'appstream' -'appstream-qt' -'packagekit-qt5' -'kdeplasma-addons' -'kde-gtk-config' -'kinfocenter' -'kscreen' -'kvantum-qt5' -'kitty' -'konsole' -'kscreen' -'layer-shell-qt' -'libdvdcss' -'libnewt' -'libtool' -'linux' -'linux-firmware' -'linux-headers' -'lsof' -'lutris' -'lzop' -'m4' -'make' -'milou' -'nano' -'neofetch' -'networkmanager' -'ntfs-3g' -'ntp' -'okular' -'openbsd-netcat' -'openssh' -'os-prober' -'oxygen' -'p7zip' -'pacman-contrib' -'patch' -'picom' -'pkgconf' -'plasma-meta' -'plasma-nm' -'powerdevil' -'powerline-fonts' -'print-manager' -'pulseaudio' -'pulseaudio-alsa' -'pulseaudio-bluetooth' -'python-notify2' -'python-psutil' -'python-pyqt5' -'python-pip' -'qemu' -'rsync' -'sddm' -'sddm-kcm' -'snapper' -'spectacle' -'steam' -'sudo' -'swtpm' -'synergy' -'systemsettings' -'terminus-font' -'traceroute' -'ufw' -'unrar' -'unzip' -'usbutils' -'vim' -'virt-manager' -'virt-viewer' -'wget' -'which' -'wine-gecko' -'wine-mono' -'winetricks' -'xdg-desktop-portal-kde' -'xdg-user-dirs' -'zeroconf-ioslave' -'zip' -'zsh' -'zsh-syntax-highlighting' -'zsh-autosuggestions' -) - -for PKG in "${PKGS[@]}"; do - echo "INSTALLING: ${PKG}" - sudo pacman -S "$PKG" --noconfirm --needed -done - -# -# determine processor type and install microcode -# -proc_type=$(lscpu | awk '/Vendor ID:/ {print $3}') -case "$proc_type" in - GenuineIntel) - print "Installing Intel microcode" - pacman -S --noconfirm intel-ucode - proc_ucode=intel-ucode.img - ;; - AuthenticAMD) - print "Installing AMD microcode" - pacman -S --noconfirm amd-ucode - proc_ucode=amd-ucode.img - ;; -esac - -# Graphics Drivers find and install -if lspci | grep -E "NVIDIA|GeForce"; then - pacman -S nvidia --noconfirm --needed - nvidia-xconfig -elif lspci | grep -E "Radeon"; then - pacman -S xf86-video-amdgpu --noconfirm --needed -elif lspci | grep -E "Integrated Graphics Controller"; then - pacman -S libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils --needed --noconfirm -fi - -echo -e "\nDone!\n" -if ! source install.conf; then - read -p "Please enter username:" username -echo "username=$username" >> ${HOME}/OlaiOS/install.conf -fi -if [ $(whoami) = "root" ]; -then - useradd -m -G wheel,libvirt -s /bin/bash $username - passwd $username - cp -R /root/OlaiOS /home/$username/ - chown -R $username: /home/$username/OlaiOS - read -p "Please name your machine:" nameofmachine - echo $nameofmachine > /etc/hostname -else - echo "You are already a user proceed with aur installs" -fi - diff --git a/2-user.sh.bak b/2-user.sh.bak deleted file mode 100644 index a6eb0fe..0000000 --- a/2-user.sh.bak +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -#--------------------------------------------- -# ██████ ██ █████ ██ ██████ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -#██ ██ ██ ███████ ██ ██ ██ ███████ -#██ ██ ██ ██ ██ ██ ██ ██ ██ -# ██████ ███████ ██ ██ ██ ██████ ███████ -#--------------------------------------------- - -echo -e "\nINSTALLING AUR SOFTWARE\n" -# You can solve users running this script as root with this and then doing the same for the next for statement. However I will leave this up to you. - -echo "CLONING: YAY" -cd ~ -git clone "https://aur.archlinux.org/yay.git" -cd ${HOME}/yay -makepkg -si --noconfirm -cd ~ -touch "$HOME/.cache/zshhistory" -git clone "https://github.com/ChrisTitusTech/zsh" -git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/powerlevel10k -ln -s "$HOME/zsh/.zshrc" $HOME/.zshrc - -PKGS=( -'autojump' -'awesome-terminal-fonts' -'steam' # Gaming Platform -'brave-bin' # Brave Browser -'dxvk-bin' # DXVK DirectX to Vulcan -'lightly-git' -'lightlyshaders-git' -'mangohud' # Gaming FPS Counter -'mangohud-common' -'nerd-fonts-fira-code' -'nordic-darker-standard-buttons-theme' -'nordic-darker-theme' -'nordic-kde-git' -'discord' -'nordic-theme' -'noto-fonts-emoji' -'papirus-icon-theme' -'plasma-pa' -'ocs-url' # install packages from websites -'sddm-nordic-theme-git' -'snapper-gui-git' -'ttf-droid' -'ttf-hack' -'ttf-meslo' # Nerdfont package -'ttf-roboto' -'snap-pac' -) - -for PKG in "${PKGS[@]}"; do - yay -S --noconfirm $PKG -done - -export PATH=$PATH:~/.local/bin -cp -r $HOME/OlaiOS/dotfiles/* $HOME/.config/ -pip install konsave -konsave -i $HOME/OlaiOS/kde.knsv -sleep 1 -konsave -a kde - -echo -e "\nDone!\n" -exit diff --git a/olaios.sh.bak b/olaios.sh.bak deleted file mode 100644 index 7c3bef0..0000000 --- a/olaios.sh.bak +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - chmod +x ./0-preinstall.sh - chmod +x ./1-setup.sh - chmod +x ./2-user.sh - chmod +x ./3-post-setup.sh - chmod +x ./kderice-backup.sh - chmod +x ./kderice-restore.sh - chmod +x ./setconsole.sh - bash 0-preinstall.sh - arch-chroot /mnt /root/OlaiOS/1-setup.sh - source /mnt/root/OlaiOS/install.conf - arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/OlaiOS/2-user.sh - arch-chroot /mnt /root/OlaiOS/3-post-setup.sh \ No newline at end of file