Commit 3f2868c1 authored by picodotdev's avatar picodotdev

Update installation script to new packages

Fixes #24

Add download-sid.sh

Use aurman

Refactor display drivers packages

Tweak pacman.conf, make KMS optional, fix unmount /boot
parent 3a078222
......@@ -35,7 +35,7 @@ Currently these scripts are for me but maybe they are useful for you too.
* Desktop environments (GDM, KDE, XFCE, Mate, Cinnamon, LXDE), display managers (GDM, SDDM, Lightdm, lxdm) and no desktop environments
* Additional kernels installation (linux-lts, linux-hardened, linux-zen)
* Kernels compression
* Graphics controllers (intel, nvidia, amd) with early KMS start
* Graphics controllers (intel, nvidia, amd) with optionaly early KMS start
* GRUB, rEFInd, systemd-boot bootloaders
* Script for download installation and recovery scripts and configuration files
* Installation log with all commands executed and output in a file and/or asciinema video
......@@ -117,8 +117,10 @@ https://www.archlinux.org/download/
* https://wiki.archlinux.org/index.php/VirtualBox
* https://wiki.archlinux.org/index.php/Mkinitcpio
* https://wiki.archlinux.org/index.php/Intel_graphics
* https://wiki.archlinux.org/index.php/NVIDIA
* https://wiki.archlinux.org/index.php/AMDGPU
* https://wiki.archlinux.org/index.php/ATI
* https://wiki.archlinux.org/index.php/NVIDIA
* https://wiki.archlinux.org/index.php/Nouveau
* https://wiki.archlinux.org/index.php/Kernels
* https://wiki.archlinux.org/index.php/Kernel_mode_setting
* https://wiki.archlinux.org/index.php/Kernel_parameters
......
......@@ -41,14 +41,26 @@ ADDITIONAL_USER_PASSWORDS="" # list separated by space
# bootloader
BOOTLOADER="grub" # grub refind systemd
# desktop
DESKTOP_ENVIRONMENT="gnome" # gnome kde xfce mate cinnamon lxde
DISPLAY_DRIVER="" # xf86-video-intel xf86-video-amdgpu xf86-video-ati nvidia nvidia-340xx nvidia-340xx-lts nvidia-304xx nvidia-304xx-lts xf86-video-nouveau
# desktop (precede package name with ! for not install)
DESKTOP_ENVIRONMENT="!gnome !kde !xfce !mate !cinnamon !lxde"
DISPLAY_DRIVER="!intel !amdgpu !ati !nvidia !nvidia-lts !nvidia-390xx !nvidia-390xx-lts !nvidia-340xx !nvidia-340xx-lts !nouveau"
KMS="true"
DISPLAY_DRIVER_DDX="false"
VULKAN="false"
DISPLAY_DRIVER_HARDWARE_ACCELERATION="true"
DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL="intel-media-driver !libva-intel-driver"
DESKTOP_ENVIRONMENT=$(echo $DESKTOP_ENVIRONMENT | sed "s/![^ ]*//g") # remove disabled packages
DESKTOP_ENVIRONMENT=$(echo $DESKTOP_ENVIRONMENT | sed "s/ {2,}/ /g") # remove white spaces
DISPLAY_DRIVER=$(echo $DISPLAY_DRIVER | sed "s/![^ ]*//g")
DISPLAY_DRIVER=$(echo $DISPLAY_DRIVER | sed "s/ {2,}/ /g")
DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL=$(echo $DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL | sed "s/![^ ]*//g")
DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL=$(echo $DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL | sed "s/ {2,}/ /g")
# packages (precede package name with ! for not install)
PACKAGES_PACMAN_INTERNET="!firefox !chromium !apache !nginx !curl !wget !filezilla !sshfs !openssh !transmission-gtk !transmission-qt !amule !geary !thunderbird !empathy !kopete !polari !konversation !liferea !hugo !gnome-boxes"
PACKAGES_PACMAN_MULTIMEDIA="!gthumb !gimp !imagemagick !krita !inkscape !blender !cmus !vlc !easytag !ardour !audacity !ffmpeg !gnome-phone-manager !kdeconnect !gstreamer !gst-plugins-good !gst-plugins-bad !gst-plugins-ugly !bluez !bluez-utils"
PACKAGES_PACMAN_UTILITIES="!eclipse-java !intellij-idea-community-edition !gradle !maven lz4 !meld !dosfstools !ntfs-3g !exfat-utils"
PACKAGES_PACMAN_UTILITIES="!code !eclipse-java !intellij-idea-community-edition !gradle !maven lz4 !meld !dosfstools !ntfs-3g !exfat-utils"
PACKAGES_PACMAN_DOCUMENTS_AND_TEXT="!libreoffice-fresh !calligra !discount !lyx !vim !calibre"
PACKAGES_PACMAN_SECURITY="!rsync !gnupg !keepassxc"
PACKAGES_PACMAN_SCIENCE="!geogebra !octave"
......@@ -56,9 +68,11 @@ PACKAGES_PACMAN_OTHERS="!klavaro !tmux"
PACKAGES_PACMAN_DEVELOPER="!jdk-openjdk !python !dotnet-sdk !php !rust !go !virtualbox !docker !ansible !vagrant"
PACKAGES_PACMAN_CUSTOM=""
AUR="aurman !yay"
PACKAGES_AUR_INTERNET="!dropbox"
PACKAGES_AUR_MULTIMEDIA=""
PACKAGES_AUR_UTILITIES="!visual-studio-code-bin"
PACKAGES_AUR_UTILITIES=""
PACKAGES_AUR_DOCUMENTS_AND_TEXT="!wps-office"
PACKAGES_AUR_SECURITY="!freefilesync"
PACKAGES_AUR_SCIENCE=""
......@@ -68,11 +82,13 @@ PACKAGES_AUR_CUSTOM=""
PACKAGES_PACMAN="$PACKAGES_PACMAN_INTERNET $PACKAGES_PACMAN_MULTIMEDIA $PACKAGES_PACMAN_UTILITIES $PACKAGES_PACMAN_DOCUMENTS_AND_TEXT $PACKAGES_PACMAN_SECURITY $PACKAGES_PACMAN_SCIENCE $PACKAGES_PACMAN_OTHERS $PACKAGES_PACMAN_DEVELOPER $PACKAGES_PACMAN_CUSTOM"
PACKAGES_AUR="$PACKAGES_AUR_INTERNET $PACKAGES_AUR_MULTIMEDIA $PACKAGES_AUR_UTILITIES $PACKAGES_AUR_DOCUMENTS_AND_TEXT $PACKAGES_AUR_SECURITY $PACKAGES_AUR_SCIENCE $PACKAGES_AUR_OTHERS $PACKAGES_AUR_DEVELOPER $PACKAGES_AUR_CUSTOM"
PACKAGES_PACMAN=$(echo $PACKAGES_PACMAN | sed "s/![^ ]*//g") # remove disabled packages
PACKAGES_PACMAN=$(echo $PACKAGES_PACMAN | sed "s/ {2,}/ /g") # remove white spaces
AUR=$(echo $AUR | sed "s/![^ ]*//g")
AUR=$(echo $AUR | sed "s/ {2,}/ /g")
PACKAGES_AUR=$(echo $PACKAGES_AUR | sed "s/![^ ]*//g")
PACKAGES_PACMAN=$(echo $PACKAGES_PACMAN | sed "s/ {2,}/ /g")
PACKAGES_AUR=$(echo $PACKAGES_AUR | sed "s/ {2,}/ /g")
AUR="aurman" # aurman yay
#reboot
REBOOT="true"
......@@ -63,7 +63,6 @@ CMDLINE_LINUX_ROOT=""
CMDLINE_LINUX=""
ADDITIONAL_USER_NAMES_ARRAY=()
ADDITIONAL_USER_PASSWORDS_ARRAY=()
MODULES=""
LOG="alis.log"
RED='\033[0;31m'
......@@ -96,7 +95,11 @@ function check_variables() {
check_variables_list "BOOTLOADER" "$BOOTLOADER" "grub refind systemd"
check_variables_list "AUR" "$AUR" "aurman yay"
check_variables_list "DESKTOP_ENVIRONMENT" "$DESKTOP_ENVIRONMENT" "gnome kde xfce mate cinnamon lxde" "false"
check_variables_list "DISPLAY_DRIVER" "$DISPLAY_DRIVER" "xf86-video-intel xf86-video-amdgpu xf86-video-ati nvidia nvidia-340xx nvidia-304xx xf86-video-nouveau" "false"
check_variables_list "DISPLAY_DRIVER" "$DISPLAY_DRIVER" "intel amdgpu ati nvidia nvidia-lts nvidia-390xx nvidia-390xx-lts nvidia-340xx nvidia-340xx-lts nouveau" "false"
check_variables_boolean "KMS" "$KMS"
check_variables_boolean "DISPLAY_DRIVER_DDX" "$DISPLAY_DRIVER_DDX"
check_variables_boolean "DISPLAY_DRIVER_HARDWARE_ACCELERATION" "$DISPLAY_DRIVER_HARDWARE_ACCELERATION"
check_variables_list "DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL" "$DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL" "intel-media-driver libva-intel-driver" "false"
check_variables_boolean "REBOOT" "$REBOOT"
}
......@@ -364,7 +367,13 @@ function install() {
if [ -n "$PACMAN_MIRROR" ]; then
echo "Server=$PACMAN_MIRROR" > /etc/pacman.d/mirrorlist
fi
sed -i 's/#Color/Color/' /etc/pacman.conf
sed -i 's/#TotalDownload/TotalDownload/' /etc/pacman.conf
pacstrap /mnt base base-devel
sed -i 's/#Color/Color/' /mnt/etc/pacman.conf
sed -i 's/#TotalDownload/TotalDownload/' /mnt/etc/pacman.conf
}
function kernels() {
......@@ -409,30 +418,36 @@ function network() {
arch-chroot /mnt systemctl enable NetworkManager.service
}
#function virtualbox() {
# if [ -z "$KERNELS" ]; then
# pacman_install "virtualbox-guest-utils virtualbox-guest-modules-arch"
# else
# pacman_install "virtualbox-guest-utils virtualbox-guest-dkms"
# fi
#}
function virtualbox() {
if [ -z "$KERNELS" ]; then
pacman_install "virtualbox-guest-utils virtualbox-guest-modules-arch"
else
pacman_install "virtualbox-guest-utils virtualbox-guest-dkms"
fi
}
function mkinitcpio() {
case "$DISPLAY_DRIVER" in
"xf86-video-intel" )
MODULES="i915"
;;
"xf86-video-amdgpu" )
MODULES="amdgpu"
;;
"xf86-video-ati" )
MODULES="radeon"
;;
"xf86-video-nouveau" )
MODULES="nouveau"
;;
esac
arch-chroot /mnt sed -i "s/MODULES=()/MODULES=($MODULES)/" /etc/mkinitcpio.conf
MODULES=""
if [ "$KMS" == "true" ]; then
case "$DISPLAY_DRIVER" in
"intel" )
MODULES="i915"
;;
"nvidia" | "nvidia-390xx" | "nvidia-390xx-lts" )
MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
;;
"amdgpu" )
MODULES="amdgpu"
;;
"ati" )
MODULES="radeon"
;;
"nouveau" )
MODULES="nouveau"
;;
esac
arch-chroot /mnt sed -i "s/MODULES=()/MODULES=($MODULES)/" /etc/mkinitcpio.conf
fi
if [ "$LVM" == "true" -a -n "$PARTITION_ROOT_ENCRYPTION_PASSWORD" ]; then
arch-chroot /mnt sed -i 's/ block / keyboard keymap block /' /etc/mkinitcpio.conf
......@@ -457,7 +472,6 @@ function bootloader() {
if [ "$CPU_INTEL" == "true" -a "$VIRTUALBOX" != "true" ]; then
pacman_install "intel-ucode"
fi
if [ "$LVM" == "true" ]; then
CMDLINE_LINUX_ROOT="root=$DEVICE_ROOT"
else
......@@ -469,6 +483,13 @@ function bootloader() {
fi
CMDLINE_LINUX="cryptdevice=PARTUUID=$PARTUUID_ROOT:$LVM_VOLUME_PHISICAL$BOOTLOADER_ALLOW_DISCARDS"
fi
if [ "$KMS" == "true" ]; then
case "$DISPLAY_DRIVER" in
"nvidia" | "nvidia-390xx" | "nvidia-390xx-lts" )
CMDLINE_LINUX="$CMDLINE_LINUX nvidia-drm.modeset=1"
;;
esac
fi
case "$BOOTLOADER" in
"grub" )
......@@ -717,34 +738,82 @@ function create_user() {
}
function desktop_environment() {
PACKAGES_DRIVER=""
PACKAGES_DDX=""
PACKAGES_VULKAN=""
PACKAGES_HARDWARE_ACCELERATION=""
case "$DISPLAY_DRIVER" in
"xf86-video-intel" )
MESA_LIBGL="mesa-libgl"
;;
"xf86-video-ati" )
MESA_LIBGL="mesa-libgl"
"nvidia" )
PACKAGES_DRIVER="nvidia nvidia-dkms"
;;
"xf86-video-amdgpu" )
MESA_LIBGL="mesa-libgl"
"nvidia-lts" )
PACKAGES_DRIVER="nvidia-lts nvidia-dkms"
;;
"xf86-video-nouveau" )
MESA_LIBGL="mesa-libgl"
"nvidia-390xx" )
PACKAGES_DRIVER="nvidia-390xx nvidia-390xx-dkms"
;;
"nvidia" )
MESA_LIBGL="nvidia-libgl"
"nvidia-390xx-lts" )
PACKAGES_DRIVER="nvidia-390xx-lts nvidia-390xx-dkms"
;;
"nvidia-340xx" )
MESA_LIBGL="nvidia-340xx-libgl"
PACKAGES_DRIVER="nvidia-340xx nvidia-340xx-dkms"
;;
"nvidia-304xx" )
MESA_LIBGL="nvidia-304xx-libgl"
;;
* )
MESA_LIBGL="mesa-libgl"
"nvidia-340xx-lts" )
PACKAGES_DRIVER="nvidia-340xx-lts nvidia-340xx-dkms"
;;
esac
pacman_install "xorg-server xorg-apps $DISPLAY_DRIVER mesa $MESA_LIBGL"
if [ "$DISPLAY_DRIVER_DDX" == "true" ]; then
case "$DISPLAY_DRIVER" in
"intel" )
PACKAGES_DDX="xf86-video-intel"
;;
"amdgpu" )
PACKAGES_DDX="xf86-video-amdgpu"
;;
"ati" )
PACKAGES_DDX="xf86-video-ati"
;;
"nouveau" )
PACKAGES_DDX="xf86-video-nouveau"
;;
esac
fi
if [ "$VULKAN" == "true" ]; then
case "$DISPLAY_DRIVER" in
"intel" )
PACKAGES_VULKAN="vulkan-icd-loader vulkan-intel"
;;
"amdgpu" )
PACKAGES_VULKAN="vulkan-icd-loader vulkan-radeon"
;;
"ati" )
PACKAGES_VULKAN=""
;;
"nouveau" )
PACKAGES_VULKAN=""
;;
esac
fi
if [ "$DISPLAY_DRIVER_HARDWARE_ACCELERATION" == "true" ]; then
case "$DISPLAY_DRIVER" in
"intel" )
PACKAGES_HARDWARE_ACCELERATION="intel-media-driver"
if [ -n "$DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL" ]; then
PACKAGES_HARDWARE_ACCELERATION=$DISPLAY_DRIVER_HARDWARE_ACCELERATION_INTEL
fi
;;
"amdgpu" )
PACKAGES_HARDWARE_ACCELERATION="libva-mesa-driver"
;;
"ati" )
PACKAGES_HARDWARE_ACCELERATION="mesa-vdpau"
;;
"nouveau" )
PACKAGES_HARDWARE_ACCELERATION="libva-mesa-driver"
;;
esac
fi
pacman_install "mesa $PACKAGES_DRIVER $PACKAGES_DDX $PACKAGES_VULKAN $PACKAGES_HARDWARE_ACCELERATION"
case "$DESKTOP_ENVIRONMENT" in
"gnome" )
......@@ -866,6 +935,7 @@ function end() {
fi
if [ "$REBOOT" == 'true' ]; then
umount -R /mnt/boot
umount -R /mnt
reboot
fi
......@@ -923,9 +993,9 @@ function main() {
kernels
configuration
network
# if [ "$VIRTUALBOX" == "true" ]; then
# virtualbox
# fi
if [ "$VIRTUALBOX" == "true" ]; then
virtualbox
fi
users
mkinitcpio
bootloader
......
#!/usr/bin/env bash
set -e
# Arch Linux Install Script (alis) installs unattended, automated
# and customized Arch Linux system.
# Copyright (C) 2018 picodotdev
rm -f alis.conf
rm -f alis.sh
rm -f alis-asciinema.sh
rm -f alis-reboot.sh
rm -f alis-recovery.conf
rm -f alis-recovery.sh
rm -f alis-recovery-asciinema.sh
rm -f alis-recovery-reboot.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis.conf
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-asciinema.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-reboot.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-recovery.conf
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-recovery.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-recovery-asciinema.sh
wget https://raw.githubusercontent.com/picodotdev/alis/sid/alis-recovery-reboot.sh
chmod +x alis.sh
chmod +x alis-asciinema.sh
chmod +x alis-reboot.sh
chmod +x alis-recovery.sh
chmod +x alis-recovery-asciinema.sh
chmod +x alis-recovery-reboot.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment