auto


Logs | Files | README | LICENSE | GitLab


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