| Hash | Commit message | Author | Date | Files | + | - |
1 | commit 2e3306af47f74ec17263c7b6eba6a17ad8fcd497 |
2 | Author: dqYpb <[email protected]> |
3 | Date: Sat Mar 26 14:25:04 2022 +0000 |
4 | |
5 | Update Auto-PreInstall |
6 | --- |
7 | Auto-PreInstall | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
8 | 1 file changed, 104 insertions(+) |
9 | |
10 | diff --git a/Auto-PreInstall b/Auto-PreInstall |
11 | new file mode 100644 |
12 | index 0000000..1485f67 |
13 | --- /dev/null |
14 | +++ b/Auto-PreInstall |
15 | @@ -0,0 +1,104 @@ |
16 | +#!/bin/sh |
17 | +######################################################################################################################################################################################### |
18 | +## A U T O L I N U X B O O T S T R A P S C R I P T ## |
19 | +######################################################################################################################################################################################### |
20 | +# _ _ _ __ _ _ #[41m |
21 | +# /.\ _ _ FJ_ ____ FJ / J _ _ _ _ _ FJ LJ #[41m |
22 | +# //_\\ J | | LJ _| F __ J J | LFJ J ' \ J J | | L J \/ F #[41m |
23 | +# / ___ \ | | | || |-' | |--| | | | J L | |\\ | | | | | / \ #[41m |
24 | +# / L___J \ F L__J JF |__-.F L__J J F L_____ J L F L \ JJ F L__J J / /\ \ #[41m |
25 | +# J__L J__J\____,__\_____J\______/J________LJ__LJ__L \\J__LJ\____,__LJ__//\\__L #[41m |
26 | +# |__L J__|J____,__J_____FJ______F|________||__||__L J__| J____,__F|__/ \__| #[41m |
27 | +######################################################################################################################################################################################### |
28 | +######################################################################################################################################################################################### |
29 | +drives(){ |
30 | +## If you would like to include any additional drives or partitions |
31 | +## in the file system table, please use the 'mkmnt' command, followed[41m |
32 | +## by a name for the folder in which you would like it to be mounted,[41m |
33 | +## followed by the name of partition ( NOT THE FULL PATH ). The 3 words[41m |
34 | +## should be seperated by a single space in between them.[41m |
35 | +## For example: ' mkmnt newFolderName partition/driveName ' |
36 | +## : ' mkmnt myFolder sda1 ' |
37 | +# mkmnt[41m |
38 | +# mkmnt[41m |
39 | +# mkmnt[41m |
40 | +## If you have any extra swap partitions you would like to turn on, |
41 | +## insert them below, following '/dev/' for every line below.. |
42 | +# swapon /dev/ |
43 | +# swapon /dev/[41m |
44 | +# swapon /dev/[41m |
45 | +genfstab -U /mnt > /mnt/etc/fstab ; }[41m |
46 | +######################################################################################################################################################################################### |
47 | +srcdir=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd && echo) |
48 | +msg(){ echo "$(tput bold; tput setaf 2)[+] ${*}$(tput sgr0)"; } |
49 | +err(){ echo >&2 "$(tput bold; tput setaf 1)[-] ERROR: ${*}$(tput sgr0)" && exit 1 ; } |
50 | +warn(){ echo >&2 "$(tput bold; tput setaf 1)[!] WARNING: ${*}$(tput sgr0)"; } |
51 | +check_root(){ [ "$(id -u)" -ne 0 ] && err "root priviledges are required to run this script."; } |
52 | +mkmnt(){ $(sudo mkdir -p /mnt/home/drives/"$1" >/dev/null 2>&1 && $(mount /dev/"$2" /mnt/home/drives/"$1") >/dev/null 2>&1) ; } |
53 | +fail(){ err " ERROR! CATASTROPHIC FAILIURE CAPTAIN . . ." ; sleep 2 ; } |
54 | +requierments(){ pacman -Syy figlet lolcat terminus-font sudo --needed --noconfirm 2>/dev/null && setfont ter-p16n; } |
55 | +welcome(){ clear ; figlet -toc '|-WELCOME-| - TO - |-AUTOLINUX-|' | lolcat ; sleep 1; |
56 | + echo -e "\n\n Please use 'cfdisk' (recommended) or 'fdisk' to partition your drive before running this script.\n Generally, a 550M EFI partition, a 2-10G swap partition, and the rest of space dedicated to linux filesystem.\n" ; sleep 5 ; } |
57 | +pac_conf(){ |
58 | +echo -e "\n# GENERAL OPTIONS\n\n[options]\n\n#RootDir = /\n#DBPath = /var/lib/pacman/\n#CacheDir = /var/cache/pacman/pkg/ |
59 | +#LogFile = /var/log/pacman.log\n#GPGDir = /etc/pacman.d/gnupg/\n#HookDir = /etc/pacman.d/hooks/\nHoldPkg = pacman glibc |
60 | +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u\n#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u\n#CleanMethod = KeepInstalled |
61 | +Architecture = auto\n\n#UseSyslog\nColor\nCheckSpace\nVerbosePkgLists\nILoveCandy\nParallelDownloads = 10\n\n\nSigLevel = Required DatabaseOptional |
62 | +LocalFileSigLevel = Optional\n#RemoteFileSigLevel = Required\n\n\n[core]\nInclude = /etc/pacman.d/mirrorlist\n\n[extra]\nInclude = /etc/pacman.d/mirrorlist\n |
63 | +[community]\nInclude = /etc/pacman.d/mirrorlist\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist"; }[41m |
64 | +refreshkeys() { \ |
65 | + pacman -U --noconfirm https://gitlab.com/qyp/concise/-/raw/master/concise-keyring-1.0.3-1-any.pkg.tar.xz |
66 | + /opt/Concise/init.sh ; } |
67 | +init(){[41m |
68 | +pac_conf > /etc/pacman.conf && |
69 | +timedatectl set-ntp true ; } |
70 | +partitioning(){[41m |
71 | +setfont ter-p16n && |
72 | +echo -e "\n Please specify the boot partition:"[41m |
73 | +read -p " ( Only the partition name, NOT the full path. ) : /dev/" boot[41m |
74 | +case "$boot" in[41m |
75 | + ''n) mkfs.vfat /dev/nvme0n1p1 ;; |
76 | + s) mkfs.vfat /dev/sda4 ;; |
77 | +[41m *) mkfs.vfat /dev/"$boot"[41m |
78 | +esac[41m |
79 | +echo -e "\n Please specify a swap partition if wanted,"[41m |
80 | +read -p " ( Only the partition name, NOT the full path. ) : /dev/" swap[41m |
81 | +case "$swap" in[41m |
82 | + ''n) |
83 | + mkswap /dev/nvme0n1p2 && swapon /dev/nvme0n1p2 ;; |
84 | + s) mkswap /dev/sda3 && swapon /dev/sda3 ;;[41m |
85 | + "") ;; *) mkswap /dev/"$swap" && swapon /dev/"$swap"[41m |
86 | +esac |
87 | +echo -e "\n Please specify partition name where base system will be installed. "[41m |
88 | +read -p " ( Only the partition name, NOT the full path. ) : /dev/" drive[41m |
89 | +case "$drive" in |
90 | + ''n) mkfs.ext4 /dev/nvme0n1p3 && mount /dev/nvme0n1p3 /mnt ;; |
91 | + s) mkfs.ext4 /dev/sda5 && mount /dev/sda5 /mnt ;; |
92 | + *) mkfs.ext4 /dev/"$drive" && mount /dev/"$drive" /mnt[41m |
93 | +esac[41m |
94 | +[ ! -d /mnt/boot/EFI ] && mkdir -p /mnt/boot/EFI ; |
95 | +if [ $boot = n ]; then mount /dev/nvme0n1p1 /mnt/boot/EFI; fi |
96 | +if [ $boot = s ]; then mount /dev/sda4 /mnt/boot/EFI; fi |
97 | +mount /dev/$boot /mnt/boot/EFI 2>/dev/null ; clear ; setfont ter-p16n ; |
98 | +msg " Partitioning Completed Successfully!" ||[41m |
99 | +err "Partitioning has failed miserably..." && sleep 2 && echo "" ; } |
100 | +base_install(){ msg " Beginning base installation..." ; sleep 2 && setfont ter-p14n ; |
101 | +pacstrap /mnt \ |
102 | + base base-devel multilib-devel linux-firmware linux linux-headers --needed --noconfirm && |
103 | + pac_conf > /mnt/etc/pacman.conf && clear && setfont ter-p16n &&[41m |
104 | + msg " The Base Installation was a Success!" && sleep 2 || fail ; } |
105 | +post_install(){ echo "" ; msg " Installing additional system requierments..."; sleep 2 && setfont ter-p14n ; |
106 | +pacstrap /mnt \ |
107 | + archiso mkinitcpio mkinitcpio-archiso git curl neovim python-pynvim zsh ntfs-3g figlet xorg-xmodmap ufw networkmanager pulseaudio \ |
108 | + pulseaudio-bluetooth pulsemixer bluez bluez-tools bluez-plugins bluez-libs wget lolcat grub efibootmgr dosfstools mtools pacman-contrib fzf \ |
109 | + terminus-font os-prober bash-completion --needed --noconfirm ; clear ; }[41m |
110 | +cp_scripts(){ cd $srcdir && cp AutoLinux.sh .skell /mnt/tmp/ ; cp AutoInstall /mnt/usr/bin/AutoInstall >/dev/null 2>&1 ; } |
111 | +success(){ clear ; setfont ter-p16n && echo -e "" && |
112 | +figlet -toc 'Success!'|lolcat ; echo -e "\n" ; sleep 2 &&[41m |
113 | +arch-chroot /mnt /usr/bin/AutoInstall ; clear ; } |
114 | +check_root ; requierments ; # refreshkeys ;[41m |
115 | +welcome ; init ; partitioning ;[41m |
116 | +base_install && post_install ; drives ;[41m |
117 | +cp_scripts ; success && exit 0 || fail && exit 1 |
118 | +######################################################################################################################################################################################### |
119 | +######################################################################################################################################################################################### |