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