-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Niklas20114552/testing
Update to v1.6
- Loading branch information
Showing
9 changed files
with
841 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
#!/usr/bin/bash | ||
# SCRIPT - Installation Script | ||
# Installation-Modes: | ||
# - 2Step | ||
function part_manual() { | ||
cfdisk $boot_drive | ||
if [[ $nvme == true ]]; then | ||
if [[ -d /sys/firmware/efi ]]; then | ||
dialog --cr-wrap --title "$tit7a $boot_drive" --msgbox "$lan11" 0 0 | ||
else | ||
dialog --cr-wrap --title "$tit7a $boot_drive" --msgbox "$lan12" 0 0 | ||
fi | ||
partition=$(find $boot_drive* -name '*p[0-9]' | tr "\n" " ") | ||
partition=$(echo $partition) | ||
if [[ "$partition" == "" ]]; then | ||
partition=$(find "$boot_drive"* -name '*p[0-9]' | tr "\n" " ") | ||
partition=$(echo $partition) | ||
if [[ "$partition" == "" ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err4a $boot_drive $err4b" 0 0 | ||
exit | ||
fi | ||
fi | ||
else | ||
partition=$(find $boot_drive* -name '*[0-9]' | tr "\n" " ") | ||
partition=$(echo $partition) | ||
if [[ "$partition" == "" ]]; then | ||
partition=$(find "$boot_drive"* -name '*[0-9]' | tr "\n" " ") | ||
partition=$(echo $partition) | ||
if [[ "$partition" == "" ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err4a $boot_drive $err4b" 0 0 | ||
exit | ||
fi | ||
fi | ||
fi | ||
lsblk $o6 | ||
if [[ -d /sys/firmware/efi ]]; then | ||
e1=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan13 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-) | ||
dialog --cr-wrap --title "$tit8 $e1" --yesno "$lan14" 0 0 | ||
if [[ $? == 0 ]]; then | ||
yes | mkfs.vfat $e1 | ||
fi | ||
fi | ||
o7=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan17 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-) | ||
dialog --cr-wrap --title "$tit8 $o7" --default-button no --yesno "$lan18" 0 0 | ||
if [[ $? == 1 ]]; then | ||
dialog --cr-wrap --title "$err3" --msgbox "$err5" 0 0 | ||
exit | ||
fi | ||
yes | mkfs.ext4 $o7 | ||
|
||
dialog --cr-wrap --title "$tit9" --yesno "$lan15" 0 0 | ||
if [[ $? == 0 ]]; then | ||
swap=yes | ||
o8=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan16 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-) | ||
yes | mkswap $o8 | ||
fi | ||
} | ||
function part_automatic() { | ||
dialog --cr-wrap --title "$tit8 $boot_drive" --default-button no --yesno "$lan31" 0 0 | ||
if [[ $? == 1 ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err9" 0 0 | ||
exit | ||
fi | ||
if [[ -d /sys/firmware/efi ]]; then | ||
echo "o | ||
y | ||
n | ||
300M | ||
ef00 | ||
n | ||
5G | ||
8200 | ||
n | ||
8300 | ||
w | ||
y" | gdisk $boot_drive | ||
swap=yes | ||
if [[ $nvme == true ]]; then | ||
yes | mkfs.vfat "$boot_drive"p1 | ||
e1="$boot_drive"p1 | ||
yes | mkswap "$boot_drive"p2 | ||
o8="$boot_drive"p2 | ||
yes | mkfs.ext4 "$boot_drive"p3 | ||
o7="$boot_drive"p3 | ||
else | ||
yes | mkfs.vfat "$boot_drive"1 | ||
e1="$boot_drive"1 | ||
yes | mkswap "$boot_drive"2 | ||
o8="$boot_drive"2 | ||
yes | mkfs.ext4 "$boot_drive"3 | ||
o7="$boot_drive"3 | ||
fi | ||
else | ||
echo "o | ||
n | ||
p | ||
+5G | ||
t | ||
82 | ||
n | ||
p | ||
a | ||
2 | ||
w" | fdisk $boot_drive | ||
swap=yes | ||
if [[ $nvme == true ]]; then | ||
yes | mkswap "$boot_drive"p1 | ||
o8="$boot_drive"p1 | ||
yes | mkfs.ex4 "$boot_drive"p2 | ||
o7="$boot_drive"p2 | ||
else | ||
yes | mkswap "$boot_drive"1 | ||
o8="$boot_drive"1 | ||
yes | mkfs.ext4 "$boot_drive"2 | ||
o7="$boot_drive"2 | ||
fi | ||
fi | ||
} | ||
slan=$1 | ||
source /var/setup/lang.conf $slan | ||
d1=$(find /dev/sd* -not -name '*[0-9]' | tr "\n" " ") | ||
d2=$(find /dev/vd* -not -name '*[0-9]' | tr "\n" " ") | ||
d3=$(find /dev/hd* -not -name '*[0-9]' | tr "\n" " ") | ||
d4=$(find /dev/nvme0n* -not -name '*p[0-9]' | tr "\n" " ") | ||
drives="$d1 $d2 $d3 $d4" | ||
drives=$(echo $drives) | ||
o6=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit6" --menu "$lan10 \n\n$(lsblk --output NAME,MODEL,PARTTYPENAME,SIZE /dev/{vd*[!0-9],sd*[!0-9],hd*[!0-9],nvme0n[0-9]})" 0 0 0 $drives 3>&1 1>&2 2>&3 3>&-) | ||
if [[ $o6 == /dev/nvme* ]]; then | ||
nvme=true | ||
else | ||
nvme=false | ||
fi | ||
boot_drive=$o6 | ||
umount $boot_drive* | ||
swapoff $boot_drive* | ||
o10=$(dialog --title "$tit7b" --menu "$lan30" 0 0 0 "$but5b" "$but5" "$but6b" "$but6" 3>&1 1>&2 2>&3 3>&-) | ||
if [[ $o10 == "$but5b" ]]; then | ||
part_automatic | ||
elif [[ $o10 == "$but6b" ]]; then | ||
part_manual | ||
fi | ||
dialog --cr-wrap --title "$tit11" --no-label AMD --yes-label Nvidia --yesno "$lan20" 0 0 | ||
if [[ $? == 1 ]]; then | ||
gpu=xf86-video-amdgpu | ||
else | ||
gpu="nvidia nvidia-utils nvidia-settings" | ||
fi | ||
dialog --cr-wrap --title "$tit12" --no-label AMD --yes-label Intel --yesno "$lan21" 0 0 | ||
if [[ $? == 1 ]]; then | ||
cpu=amd-ucode | ||
else | ||
cpu=intel-ucode | ||
fi | ||
dialog --cr-wrap --title "$mtit" --msgbox "$lan23" 0 0 | ||
mount "$o7" /target | ||
if [[ -d /sys/firmware/efi ]]; then | ||
mkdir -p /target/boot/efi | ||
mount "$e1" /target/boot/efi | ||
fi | ||
pacman --noconfirm --needed -Sy archlinux-keyring | ||
|
||
pacstrap /target base linux linux-firmware git nano $cpu iptables-nft neovim vim | ||
|
||
if [[ $swap == yes ]]; then | ||
swapon "$o8" | ||
fi | ||
|
||
genfstab -U /target >> /target/etc/fstab | ||
if [[ -d /sys/firmware/efi ]]; then | ||
grub="grub efibootmgr" | ||
else | ||
grub="grub" | ||
fi | ||
arch-chroot /target bash -c "pacman --needed --noconfirm -Sy $gpu $grub networkmanager network-manager-applet dialog wpa_supplicant mtools dosfstools reflector base-devel linux-headers avahi xdg-user-dirs xdg-utils gvfs gvfs-smb nfs-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pulseaudio bash-completion openssh rsync reflector acpi acpi_call tlp edk2-ovmf bridge-utils dnsmasq vde2 openbsd-netcat iptables-nft ipset firewalld flatpak sof-firmware nss-mdns acpid os-prober ntfs-3g terminus-font numlockx wget man-db neofetch cargo nvme-cli" | ||
echo "echo 'root:$root_pass' | chpasswd" > /target/chpasswd.sh | ||
sed -i "s/#GRUB_DISABLE_OS_PROBER=false/GRUB_DISABLE_OS_PROBER=false/" /target/etc/default/grub | ||
if [[ -d /sys/firmware/efi ]]; then | ||
arch-chroot /target bash -c "grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB" | ||
else | ||
arch-chroot /target bash -c "grub-install --target=i386-pc $boot_drive" | ||
fi | ||
arch-chroot /target bash -c "grub-mkconfig -o /boot/grub/grub.cfg" | ||
arch-chroot /target bash -c "systemctl enable NetworkManager bluetooth cups.service avahi-daemon tlp reflector.timer fstrim.timer firewalld acpid" | ||
# NOTE: The User will change this after a reboot | ||
arch-chroot /target bash -c "echo root:root | chpasswd" | ||
mkdir -p /target/var/setup | ||
if [[ -f /var/setup/installed.conf ]]; then | ||
cp /var/setup/installed.conf /target/var/setup/lang.conf | ||
else | ||
curl -o /var/setup/installed.conf https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/lang.conf | ||
fi | ||
if [[ -f /var/setup/installer ]]; then | ||
cp /var/setup/installer /target/usr/bin/installer | ||
else | ||
curl -o /target/usr/bin/installer https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/installer | ||
fi | ||
chmod +x /target/usr/bin/installer | ||
if [[ ! -f /target/usr/bin/installer ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err6" 0 0 | ||
fi | ||
if [[ -f /var/setup/sumkpkg ]]; then | ||
cp /var/setup/sumkpkg /target/var/setup/sumkpkg | ||
else | ||
curl -o /target/var/setup/sumkpkg https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/sumkpkg | ||
fi | ||
chmod +x /target/var/setup/sumkpkg | ||
if [[ ! -f /target/var/setup/sumkpkg ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err7" 0 0 | ||
exit | ||
fi | ||
if [[ ! -f /var/setup/autologin.tmp ]]; then | ||
curl -o /var/setup/autologin.tmp https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/autologin.tmp | ||
fi | ||
if [[ -f /var/setup/desktopinstall ]]; then | ||
cp /var/setup/desktopinstall /target/usr/bin/desktopinstall | ||
else | ||
curl -o /target/usr/bin/desktopinstall https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/destopinstall | ||
fi | ||
chmod +x /target/usr/bin/desktopinstall | ||
if [[ ! -f /target/usr/bin/desktopinstall ]]; then | ||
dialog --cr-wrap --title "$err2" --msgbox "$err8b" 0 0 | ||
exit | ||
fi | ||
if [[ ! -f /var/setup/setup ]]; then | ||
curl -o /target/usr/bin/setup https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/setup | ||
else | ||
cp -r /var/setup/setup /target/usr/bin/setup | ||
fi | ||
chmod +x /target/usr/bin/setup | ||
cp -f /etc/iwd/main.conf /target/etc/iwd/main.conf | ||
cp -rf /var/lib/iwd /target/var/lib/iwd | ||
cp -f /var/setup/lang.conf /target/var/setup/2step.conf | ||
mkdir -p "/target/etc/systemd/system/[email protected]" | ||
echo "setup" >> /target/root/.bashrc | ||
echo "if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | ||
fi" > /target/root/.profile | ||
cp /var/setup/autologin.tmp /target/etc/systemd/system/[email protected]/autologin.conf | ||
dialog --title "$mtit" --ok-label "$but4" --timeout 10 --msgbox "$lan24" 0 0 | ||
umount -a | ||
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Service] | ||
ExecStart= | ||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/bash | ||
# SCRIPT - Installs automaticly desktops | ||
# It is made for the FULL-Installation Mode | ||
function iaur() { | ||
if [[ $aurh == chaotic ]]; then | ||
pacman --noconfirm --needed -S $1 | ||
else | ||
if ! pacman -Qs $1 > /dev/null ; then | ||
git clone https://aur.archlinux.org/$1.git /tmp/$1 | ||
(cd /tmp/$1 && /var/setup/sumkpkg -si --noconfirm --skippgpcheck) | ||
rm -rf /tmp/$1 | ||
fi | ||
fi | ||
} | ||
rm -rf /etc/systemd/system/[email protected] | ||
rm /root/.profile | ||
sed -i '/^desktopinstall/d' /root/.bashrc | ||
lan="$(cat /etc/locale.gen)" | ||
source /var/setup/setup.conf | ||
case "$lan" in | ||
"de_DE.UTF-8 UTF-8") slan=de ;; | ||
"en_US.UTF-8 UTF-8") slan=en ;; | ||
"fr_FR.UTF-8 UTF-8") slan=fr ;; | ||
"nl_NL.UTF-8 UTF-8") slan=nl ;; | ||
"it_IT.UTF-8 UTF-8") slan=it ;; | ||
"es_ES.UTF-8 UTF-8") slan=es ;; | ||
esac | ||
if [[ ! -f /var/setup/lang.conf ]]; then | ||
curl -o /var/setup/lang.conf https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/lang.conf | ||
fi | ||
source /var/setup/lang.conf $slan | ||
de=$1 | ||
firewall-cmd -q --add-port=1025-65535/tcp --permanent | ||
firewall-cmd -q --add-port=1025-65535/udp --permanent | ||
firewall-cmd -q --reload | ||
localectl --no-convert set-x11-keymap $layout | ||
case $slan in | ||
de) libreoffice=libreoffice-still-de ;; | ||
en) libreoffice=libreoffice-still ;; | ||
fr) libreoffice=libreoffice-still-fr ;; | ||
it) libreoffice=libreoffice-still-it ;; | ||
nl) libreoffice=libreoffice-still-nl ;; | ||
es) libreoffice=libreoffice-still-es ;; | ||
esac | ||
if [[ $de == kde ]]; then | ||
pacman --ignore konqueror --noconfirm --needed -Sy xorg sddm plasma kde-applications vlc papirus-icon-theme materia-kde archlinux-wallpaper $libreoffice | ||
systemctl enable sddm | ||
elif [[ $de == gnome ]]; then | ||
iaur bdf-unifont | ||
iaur extension-manager | ||
pacman --ignore epiphany --noconfirm --needed -Syu gdm gnome gnome-extra firefox gnome-tweaks arc-gtk-theme arc-icon-theme vlc dina-font tamsyn-font ttf-bitstream-vera ttf-croscore ttf-dejavu ttf-droid gnu-free-fonts ttf-ibm-plex ttf-liberation ttf-linux-libertine noto-fonts ttf-roboto tex-gyre-fonts ttf-ubuntu-font-family ttf-anonymous-pro ttf-cascadia-code ttf-fantasque-sans-mono ttf-fira-mono ttf-hack ttf-fira-code ttf-inconsolata ttf-jetbrains-mono ttf-monofur adobe-source-code-pro-fonts cantarell-fonts inter-font ttf-opensans gentium-plus-font ttf-junicode adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts noto-fonts-cjk noto-fonts-emoji archlinux-wallpaper $libreoffice | ||
systemctl enable gdm | ||
elif [[ $de == cinnamon ]]; then | ||
iaur lightdm-settings | ||
pacman --needed --noconfirm -Syu xorg lightdm lightdm-slick-greeter gnome-software cinnamon firefox arc-gtk-theme arc-icon-theme vlc xed xreader metacity archlinux-wallpaper celluloid shotwell gnome-terminal cinnamon-translations nemo-fileroller $libreoffice | ||
sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
systemctl enable lightdm | ||
elif [[ $de == xfce ]]; then | ||
pacman --noconfirm --needed -Syu xorg lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings xfce4 xfce4-goodies firefox arc-gtk-theme arc-icon-theme vlc archlinux-wallpaper | ||
systemctl enable lightdm | ||
elif [[ $de == deepin ]]; then | ||
pacman --needed --noconfirm -Syu xorg lightdm deepin deepin-extra firefox archlinux-wallpaper | ||
sed -i '/^greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf | ||
sed -i '/^#greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf | ||
systemctl enable lightdm | ||
elif [[ $de == mate ]]; then | ||
pacman --noconfirm --needed -Syu xorg lightdm mate mate-extra firefox archlinux-wallpaper lightdm-gtk-greeter lightdm-gtk-greeter-settings $libreoffice | ||
systemctl enable lightdm | ||
elif [[ $de == lxqt ]]; then | ||
iaur lightdm-settings | ||
pacman --noconfirm --needed -Syu xorg lxqt xdg-utils ttf-freefont libpulse libstatgrab libsysstat lm_sensors network-manager-applet oxygen-icons pavucontrol-qt lightdm lightdm-slick-greeter $libreoffice | ||
sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
systemctl enable lightdm | ||
elif [[ $de == tde ]]; then | ||
if ! grep -q "trinity" "/etc/pacman.conf"; then | ||
pacman-key --recv-keys 8685AD8B | ||
pacman-key --lsign-key 8685AD8B | ||
echo "[trinity] | ||
Server = https://mirror.ppa.trinitydesktop.org/trinity/archlinux/x86_64" >> /etc/pacman.conf | ||
fi | ||
pacman --needed --noconfirm -Syyu tde-meta firefox vlc archlinux-wallpaper $libreoffice | ||
systemctl enable tdm | ||
elif [[ $de == lxde ]]; then | ||
iaur lightdm-settings | ||
iaur python2-bin | ||
iaur gamin | ||
pacman --needed --noconfirm -Syu lxde lightdm lightdm-slick-greeter vlc firefox celluloid xed arc-gtk-theme arc-icon-theme $libreoffice | ||
sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf | ||
systemctl enable lightdm | ||
fi | ||
dialog --title "Installer" --ok-label "$but3" --timeout 10 --msgbox "$lan5" 0 0 | ||
reboot |
Oops, something went wrong.