Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20eaf8f130 | ||
|
|
0c29d395a9 | ||
|
|
1cc7f72595 | ||
|
|
87b7c7a76f | ||
|
|
2e8b0dd244 | ||
|
|
231a1f5500 | ||
|
|
da64a7b42f | ||
|
|
b14b8427d3 | ||
|
|
da42e26a3c | ||
|
|
687d9fa02d | ||
|
|
1250ee6944 | ||
|
|
0544466d93 | ||
|
|
c5d9c10b92 | ||
|
|
bf60df94eb | ||
|
|
1071d75794 | ||
|
|
4b105674e4 | ||
|
|
b1192cd5ad | ||
|
|
4b481315a0 | ||
|
|
52a5b63ad4 | ||
|
|
50d6096e99 | ||
|
|
9076d6559b | ||
|
|
5b104376c3 | ||
|
|
e8aa72467c | ||
|
|
932913f370 | ||
|
|
0ded1e2a6a | ||
|
|
0fca1c9d06 | ||
|
|
bb7f582ab3 | ||
|
|
aba5406f52 | ||
|
|
ae93aaf13b | ||
|
|
c7729e0af1 | ||
|
|
74b6fcdf45 | ||
|
|
5729f530de | ||
|
|
d5eeb97ebf | ||
|
|
7c7be12ba7 | ||
|
|
ef8914bdb8 | ||
|
|
e495ba1db3 | ||
|
|
8ecd895b21 | ||
|
|
b1fcdaa511 | ||
|
|
77b79074dc | ||
|
|
0eeaff90b8 | ||
|
|
689f024ca1 | ||
|
|
aefc0018ac | ||
|
|
72dabbdf96 | ||
|
|
6b3545f865 | ||
|
|
0dc59d2002 | ||
|
|
0804eb8f3e | ||
|
|
c68d425332 | ||
|
|
b928d5bd1b | ||
|
|
d10347d727 | ||
|
|
0a566f13f2 | ||
|
|
cd3a009650 | ||
|
|
4e8da09368 | ||
|
|
539b611c4c | ||
|
|
8b08101e49 | ||
|
|
be6cdc37b0 | ||
|
|
05278b49e6 | ||
|
|
02caf2b030 | ||
|
|
00fff1e13b | ||
|
|
485abb14df | ||
|
|
c2d1e599fc | ||
|
|
ce367f3bc1 | ||
|
|
e3a93edc72 | ||
|
|
fc34be6120 | ||
|
|
a2744d3176 | ||
|
|
1352c9d182 | ||
|
|
91335391ee | ||
|
|
711e9b330d | ||
|
|
c8720675d9 | ||
|
|
25ec2c22f6 | ||
|
|
7b5224663d | ||
|
|
d1c95791ab | ||
|
|
b69a8499f9 | ||
|
|
5146991dd4 | ||
|
|
384b86164a | ||
|
|
01f720c25d |
@@ -1,35 +1,43 @@
|
|||||||
# Simple, modern and secure installation of Arch Linux with KDE Plasma.
|
# Simple, modern and secure installation of Arch Linux with KDE Plasma
|
||||||
|
|
||||||
### This is my personal installation routine, which I continously expand and redefine.
|
### This is my personal installation routine, which I continously expand and redefine.
|
||||||
|
|
||||||
This installation script aims for a simple (read minimal) Arch Linux installation, which is modern in the way that it uses UEFI, systemd-boot and Wayland, secure in the way that it uses full-disk encryption using LUKS as well as flexibility by using Btrfs subvolumes for the root and home partition.
|
This installation script aims for a simple (read minimal) Arch Linux installation, which is modern in the way that it uses UEFI, systemd-boot and Wayland, secure in the way that it uses full-disk encryption using LUKS as well as flexibility by using Btrfs subvolumes for the root and home partition.
|
||||||
|
|
||||||
Tested and working as of **january 2025**.
|
Tested and working as of **July 2026**.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Set your keyboard layout correctly
|
||||||
|
Before starting the install script you should set your keyboard layout correctly. Otherwise you might run into problems with mismatching passwords.
|
||||||
|
```
|
||||||
|
$ loadkeys de
|
||||||
|
```
|
||||||
|
|
||||||
## To automatically install Arch Linux, clone this repository:
|
## To automatically install Arch Linux, clone this repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ pacman -Sy git
|
$ pacman -Sy git
|
||||||
$ git clone https://git.dataprolet.de/dataprolet/Arch-Linux-Installer.git
|
$ git clone https://git.dataprolet.de/dataprolet/Arch-Linux-Installer.git
|
||||||
$ cd arch
|
$ cd Arch-Linux-Installer
|
||||||
$ sh install.sh
|
$ sh install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Or as a one-liner:
|
### Or as a one-liner:
|
||||||
```
|
```
|
||||||
# pacman -Sy git --noconfirm && git clone https://git.dataprolet.de/dataprolet/Arch-Linux-Installer.git && cd arch && sh install.sh
|
# pacman -Sy git --noconfirm && git clone https://git.dataprolet.de/dataprolet/Arch-Linux-Installer.git && cd Arch-Linux-Installer && sh install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Post-Install
|
### Post-Install
|
||||||
Check out the list of [suggested packages to install](https://git.dataprolet.de/dataprolet/Arch-Linux-Installer/src/branch/main/post-install.md).
|
Check out the list of [suggested packages to install](post/post-install.md).
|
||||||
|
|
||||||
### To switch from X11 to Wayland on an existing installation use the following command and reboot:
|
### To switch from X11 to Wayland on an existing installation use the following command and reboot:
|
||||||
```
|
```
|
||||||
# pacman -S wayland xorg-xwayland && sed -i 's/plasma/plasmawayland/g' /etc/sddm.conf.d/kde_settings.conf
|
# pacman -S wayland xorg-xwayland && sed -i 's/plasma/plasmawayland/g' /etc/sddm.conf.d/kde_settings.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
### *There are now two additional versions of the script:*
|
### *There are [alternative versions](alt) of the script:*
|
||||||
|
- `install-minimal.sh`- Installs only the necessary packages for Plasma.
|
||||||
- `install-lvm.sh` - Installs using Ext4 and uses LVM for /root and /home.
|
- `install-lvm.sh` - Installs using Ext4 and uses LVM for /root and /home.
|
||||||
- `install-grub.sh` - Installs using GRUB for legacy BIOS (and Btrfs).
|
- `install-grub.sh` - Installs using GRUB for legacy BIOS (and Btrfs).
|
||||||
- `ìnstall-x11.sh`- Installs using X11 (and systemd-boot/Btrfs).
|
- `ìnstall-x11.sh`- Installs using X11 (and systemd-boot/Btrfs).
|
||||||
@@ -41,9 +49,7 @@ Check out the list of [suggested packages to install](https://git.dataprolet.de/
|
|||||||
- Creates Btrfs filesystems with zstd compression.
|
- Creates Btrfs filesystems with zstd compression.
|
||||||
- Creates Btrfs volumes for /root and /home.
|
- Creates Btrfs volumes for /root and /home.
|
||||||
- Refreshes the latest mirror list.
|
- Refreshes the latest mirror list.
|
||||||
- Installs a base system (base linux linux-firmware btrfs-progs nano networkmanager sudo).
|
- Installs a base system and a minimal KDE Plasma desktop environment.
|
||||||
- Installs very few additional packages (firefox konsole linux-zen)
|
|
||||||
- Installs a minimal KDE Plasma desktop environment (plasma-desktop, sddm, sdmd-kcm)
|
|
||||||
- Installs systemd-boot as a bootloader.
|
- Installs systemd-boot as a bootloader.
|
||||||
- Sets German keyboard layout and English locale.
|
- Sets German keyboard layout and English locale.
|
||||||
- Enables SDDM auto-login to boot into Plasma after the first reboot.
|
- Enables SDDM auto-login to boot into Plasma after the first reboot.
|
||||||
|
|||||||
@@ -0,0 +1,425 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://wizardzines.com/comics/bash-errors/bash-errors.png
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
exec >> >(tee -i /tmp/install.log)
|
||||||
|
exec 2>&1
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Friendly introduction.
|
||||||
|
echo "0. WELCOME"
|
||||||
|
echo "Welcome to the Arch Linux installation script!"
|
||||||
|
echo "This script will ERASE ALL DATA on the partition you will choose next!"
|
||||||
|
echo
|
||||||
|
read -p "Do you want to continue? Type [Y]es or [N]o. " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Selecting disk.
|
||||||
|
echo "1. PARTITIONING"
|
||||||
|
echo "Please select a disk to partition:"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Don't separate values by space.
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
# Set variable containing name and size of all disks.
|
||||||
|
declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') )
|
||||||
|
|
||||||
|
# Select value on array.
|
||||||
|
select dev in "${dsks[@]}"
|
||||||
|
do
|
||||||
|
|
||||||
|
break
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Separate values by spaces.
|
||||||
|
IFS=' '
|
||||||
|
|
||||||
|
# Create new variable of selection.
|
||||||
|
array=(${dev})
|
||||||
|
dev="${array[0]}"
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "2. ENCRYPTION"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting encryption password.
|
||||||
|
echo "Choose a strong password for encrypting the primary partition:"
|
||||||
|
pwcr=""
|
||||||
|
while [[ -z "${pwcr}" ]]; do
|
||||||
|
echo "Please enter a password: "
|
||||||
|
read -rs pwfr
|
||||||
|
read -rs -p "Retype a password: " pwsc
|
||||||
|
if [[ "${pwfr}" == "${pwsc}" ]];
|
||||||
|
then
|
||||||
|
pwcr="${pwfr}"
|
||||||
|
echo
|
||||||
|
echo "Both passwords are the same. Continuing.."
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "You have entered different passwords. Try again.."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "3. HOSTNAME"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting hostname.
|
||||||
|
echo "Before installing the system, please enter a hostname:"
|
||||||
|
read -r host
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "4. ROOT PASSWORD"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting root password.
|
||||||
|
echo "Choose a password for the root account:"
|
||||||
|
pwr=""
|
||||||
|
while [[ -z "${pwr}" ]]; do
|
||||||
|
echo "Please enter a password: "
|
||||||
|
read -rs pwfr
|
||||||
|
read -rs -p "Retype a password: " pwsc
|
||||||
|
|
||||||
|
if [[ "${pwfr}" == "${pwsc}" ]]; then
|
||||||
|
pwrt="${pwfr}"
|
||||||
|
echo
|
||||||
|
echo "Both passwords are the same. Continuing.."
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "You have entered different passwords. Try again.."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "4. USER"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting username
|
||||||
|
echo "Please enter a username:"
|
||||||
|
read -r user
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting user password.
|
||||||
|
echo "Also please choose a password for your user:"
|
||||||
|
pwu=""
|
||||||
|
while [[ -z "${pwu}" ]]; do
|
||||||
|
echo "Please enter a password: "
|
||||||
|
read -rs pwfr
|
||||||
|
read -rs -p "Retype a password: " pwsc
|
||||||
|
|
||||||
|
if [[ "${pwfr}" == "${pwsc}" ]];
|
||||||
|
then
|
||||||
|
pwur="${pwfr}"
|
||||||
|
echo
|
||||||
|
echo "Both passwords are the same. Continuing.."
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "You have entered different passwords. Try again.."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "5. INSTALLING SYSTEM.."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Starting partitioning.
|
||||||
|
echo "Partitioning /dev/${dev}.."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Clearing partition table of selected disk.
|
||||||
|
echo "Clearing existing partitioning table."
|
||||||
|
sgdisk -Z "/dev/${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Creating boot partition.
|
||||||
|
echo "Creating boot partition of 512 MB."
|
||||||
|
sgdisk -n 1:0:+512M "/dev/${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting type for EFI.
|
||||||
|
echo "Setting partition type."
|
||||||
|
sgdisk -t 1:ef00 "/dev/${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Creating system partition.
|
||||||
|
echo "Creating system partition."
|
||||||
|
sgdisk -n 2:0:0 "/dev/${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Print partitions.
|
||||||
|
echo "This is your new partition table:"
|
||||||
|
lsblk | grep "${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Get new variable.
|
||||||
|
if [[ "${dev}" = "nvme0n1" ]]; then
|
||||||
|
main="${dev}p2"
|
||||||
|
else
|
||||||
|
main="${dev}2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Encrypting partition.
|
||||||
|
echo "Encrypting system partition. This might take a while."
|
||||||
|
echo
|
||||||
|
echo -en "${pwcr}\n${pwcr}" | cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/$main
|
||||||
|
echo "Partition successfully encrypted."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Opening encrypted partition and mounting at /dev/mapper/main.
|
||||||
|
echo "Decrypting.. This also might take a while."
|
||||||
|
echo
|
||||||
|
echo -en "${pwcr}\n${pwcr}" | cryptsetup luksOpen "/dev/${main}" main
|
||||||
|
echo "Partition successfully opened."
|
||||||
|
echo
|
||||||
|
|
||||||
|
lsblk | grep "${dev}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "Creating the filesystem."
|
||||||
|
|
||||||
|
if [ "${dev}" = "nvme0n1" ]; then
|
||||||
|
boot="${dev}p1"
|
||||||
|
else
|
||||||
|
boot="${dev}1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkfs.fat -F 32 -n UEFI "/dev/${boot}"
|
||||||
|
echo "Filesystem for boot successfully created."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Creating btrfs partition.
|
||||||
|
mkfs.btrfs "/dev/mapper/main"
|
||||||
|
|
||||||
|
mount "/dev/mapper/main" "/mnt"
|
||||||
|
|
||||||
|
btrfs subvolume create "/mnt/root"
|
||||||
|
btrfs subvolume create "/mnt/home"
|
||||||
|
|
||||||
|
umount "/mnt"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "Mounting.."
|
||||||
|
mount -o autodefrag,compress=zstd:3,subvol=root "/dev/mapper/main" "/mnt"
|
||||||
|
mkdir "/mnt/home"
|
||||||
|
mount -o autodefrag,compress=zstd:3,subvol=home "/dev/mapper/main" "/mnt/home"
|
||||||
|
mkdir "/mnt/boot"
|
||||||
|
mount "/dev/${boot}" "/mnt/boot"
|
||||||
|
echo "Mounting complete."
|
||||||
|
echo
|
||||||
|
|
||||||
|
lsblk -a
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Updating mirrors using reflector.
|
||||||
|
echo "Updating mirrors.."
|
||||||
|
reflector --verbose --latest 10 --country Germany --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Check if keyring is up-to-date
|
||||||
|
if checkupdates | grep -q archlinux-keyring; then
|
||||||
|
echo "Updating keyring.."
|
||||||
|
pacman -Sy archlinux-keyring --noconfirm
|
||||||
|
echo "Done."
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Installing base system.
|
||||||
|
echo "Installing basic packages.."
|
||||||
|
pacstrap "/mnt" base btrfs-progs firefox konsole linux linux-firmware plasma-nm nano networkmanager plasma-desktop sddm sddm-kcm sudo xorg-xwayland
|
||||||
|
echo "Base system installed."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Generating fstab.
|
||||||
|
echo "Generating fstab.."
|
||||||
|
genfstab -Up "/mnt" > "/mnt/etc/fstab"
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting hostname.
|
||||||
|
echo "Setting hostname.."
|
||||||
|
echo "${host}" > "/mnt/etc/hostname"
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Setting locale.
|
||||||
|
echo "Setting and generating locale.."
|
||||||
|
cat << EOF > "/mnt/etc/locale.gen"
|
||||||
|
en_US.UTF-8 UTF-8
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#echo "${localegen}" >>/mnt/etc/locale.gen
|
||||||
|
arch-chroot "/mnt" locale-gen
|
||||||
|
echo "LANG=en_US.UTF-8" > "/mnt/etc/locale.conf"
|
||||||
|
echo "KEYMAP=de-latin1" > "/mnt/etc/vconsole.conf"
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Set X locale and keyboard alyout.
|
||||||
|
echo "Setting locale and keyboard layout."
|
||||||
|
|
||||||
|
#arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys
|
||||||
|
systemd-firstboot --root=/mnt --keymap=de-latin1-nodeadkeys
|
||||||
|
|
||||||
|
cat << EOF > "/mnt/etc/X11/xorg.conf.d/00-keyboard.conf"
|
||||||
|
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
|
||||||
|
# probably wise not to edit this file manually. Use localectl(1) to
|
||||||
|
# instruct systemd-localed to update it.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "system-keyboard"
|
||||||
|
MatchIsKeyboard "on"
|
||||||
|
Option "XkbLayout" "de"
|
||||||
|
Option "XkbModel" "pc105"
|
||||||
|
Option "XkbVariant" "deadgraveacute"
|
||||||
|
EndSection
|
||||||
|
EOF
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Editing mkinitcpio.conf.
|
||||||
|
echo "Editing /etc/mkinitcpio.conf.."
|
||||||
|
sed -i '55s/.*/HOOKS=(base udev autodetect microcode modconf kms block keyboard keymap encrypt filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Editing taskbar.
|
||||||
|
#sed -i '65s/.*/launchers=applications:systemsettings.desktop,applications:org.kde.konsole.desktop,applications:firefox.desktop/' /mnt/home/${user}/.config/plasma-org.kde.plasma.desktop-appletsrc
|
||||||
|
|
||||||
|
# Creating inital ramdisk.
|
||||||
|
echo "Creating inital ramdisk for linux.."
|
||||||
|
arch-chroot /mnt mkinitcpio -p linux
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Enable network and display manager.
|
||||||
|
echo "Enabling Networkmanager and display manager (sddm).."
|
||||||
|
arch-chroot "/mnt" systemctl enable NetworkManager sddm
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Set root password
|
||||||
|
echo "Setting root password.."
|
||||||
|
echo -en "${pwrt}\n${pwrt}" | arch-chroot "/mnt" passwd
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Install bootloader.
|
||||||
|
echo "Installing systemd-boot.."
|
||||||
|
arch-chroot "/mnt" bootctl --path=/boot install
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Get UUID for primary partition
|
||||||
|
uuid=$(ls -l /dev/disk/by-uuid | grep "${main}" | awk '{print $9}')
|
||||||
|
|
||||||
|
# Set bootloader entry.
|
||||||
|
echo "Setting up bootloader.."
|
||||||
|
cat << EOF > "/mnt/boot/loader/entries/arch.conf"
|
||||||
|
title Arch Linux
|
||||||
|
linux /vmlinuz-linux
|
||||||
|
#initrd /amd-ucode.img
|
||||||
|
#initrd /intel-ucode.img
|
||||||
|
initrd /initramfs-linux.img
|
||||||
|
options cryptdevice=UUID=${uuid}:main
|
||||||
|
options root=/dev/mapper/main rw
|
||||||
|
options rootflags=subvol=root
|
||||||
|
options lang=de locale=de_DE.UTF-8
|
||||||
|
options init=/usr/lib/systemd/systemd
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Set bootloader fallback entry.
|
||||||
|
cat << EOF > "/mnt/boot/loader/entries/arch-fallback.conf"
|
||||||
|
title Arch Linux Fallback
|
||||||
|
linux /vmlinuz-linux
|
||||||
|
initrd /initramfs-linux-fallback.img
|
||||||
|
options cryptdevice=UUID=${uuid}:main
|
||||||
|
options root=/dev/mapper/main rw
|
||||||
|
options rootflags=subvol=root
|
||||||
|
options lang=de locale=de_DE.UTF-8
|
||||||
|
options init=/usr/lib/systemd/systemd
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Set bootloader.
|
||||||
|
echo "timeout 1" >> "/mnt/boot/loader/loader.conf"
|
||||||
|
echo "default arch.conf" >> "/mnt/boot/loader/loader.conf"
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Set username, password and group.
|
||||||
|
echo "Adding user.."
|
||||||
|
arch-chroot /mnt useradd -m "${user}"
|
||||||
|
echo -en "${pwur}\n${pwur}" | arch-chroot /mnt passwd "${user}"
|
||||||
|
arch-chroot /mnt gpasswd -a "${user}" wheel
|
||||||
|
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Enabling sddm auto-login.
|
||||||
|
echo "Enabling auto-login.."
|
||||||
|
mkdir /mnt/etc/sddm.conf.d
|
||||||
|
cat << EOF > /mnt/etc/sddm.conf.d/autologin.conf
|
||||||
|
[Autologin]
|
||||||
|
User=${user}
|
||||||
|
Session=plasma
|
||||||
|
EOF
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Adding sddm config.
|
||||||
|
cat << EOF > /mnt/etc/sddm.conf.d/kde_settings.conf
|
||||||
|
[Autologin]
|
||||||
|
Relogin=false
|
||||||
|
Session=plasma
|
||||||
|
User=${user}
|
||||||
|
|
||||||
|
[General]
|
||||||
|
HaltCommand=/usr/bin/systemctl poweroff
|
||||||
|
RebootCommand=/usr/bin/systemctl reboot
|
||||||
|
|
||||||
|
[Theme]
|
||||||
|
Current=breeze
|
||||||
|
|
||||||
|
[Users]
|
||||||
|
MaximumUid=60513
|
||||||
|
MinimumUid=1000
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Unmounting and rebooting.
|
||||||
|
echo "Unmounting system.."
|
||||||
|
umount "/mnt/boot"
|
||||||
|
umount "/mnt"
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "Installation finished!"
|
||||||
|
#read -p "Do you want to read the log? Type [Y]es or [N]o. " -n 1 -r
|
||||||
|
#echo
|
||||||
|
#if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||||
|
#then
|
||||||
|
# less /tmp/install.log
|
||||||
|
#fi
|
||||||
|
#echo
|
||||||
|
|
||||||
|
#echo "Press [Enter] to shut down, then remove the installation media and start your system."
|
||||||
|
#poweroff
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 317 KiB |
+175
-113
@@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://wizardzines.com/comics/bash-errors/bash-errors.png
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Write log
|
||||||
exec >> >(tee -i /tmp/install.log)
|
exec >> >(tee -i /tmp/install.log)
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
|
function cleanup() {
|
||||||
|
umount /mnt/boot
|
||||||
|
umount /mnt/home
|
||||||
|
umount /mnt
|
||||||
|
cryptsetup close /dev/mapper/main
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
# Friendly introduction.
|
# Friendly introduction
|
||||||
echo "0. WELCOME"
|
echo "0. WELCOME"
|
||||||
echo "Welcome to the Arch Linux installation script!"
|
echo "Welcome to the Arch Linux installation script!"
|
||||||
echo "This script will ERASE ALL DATA on the partition you will choose next!"
|
echo "This script will ERASE ALL DATA on the partition you will choose next!"
|
||||||
@@ -20,34 +28,36 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
|
|
||||||
# Selecting disk.
|
##########
|
||||||
|
|
||||||
|
# Selecting disk
|
||||||
echo "1. PARTITIONING"
|
echo "1. PARTITIONING"
|
||||||
echo "Please select a disk to partition:"
|
echo "Please select a disk to partition:"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Don't separate values by space.
|
# Don't separate values by space
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
# Set variable containing name and size of all disks.
|
# Set variable containing name and size of all disks
|
||||||
declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') )
|
declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') )
|
||||||
|
|
||||||
# Select value on array.
|
# Select value on array
|
||||||
select dev in "${dsks[@]}"
|
select dev in "${dsks[@]}"; do
|
||||||
do
|
break
|
||||||
|
|
||||||
break
|
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Separate values by spaces.
|
# Separate values by spaces
|
||||||
IFS=' '
|
IFS=' '
|
||||||
|
|
||||||
# Create new variable of selection.
|
# Create new variable of selection
|
||||||
array=(${dev})
|
array=(${dev})
|
||||||
dev="${array[0]}"
|
dev="${array[0]}"
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "2. ENCRYPTION"
|
echo "2. ENCRYPTION"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -73,6 +83,8 @@ done
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "3. HOSTNAME"
|
echo "3. HOSTNAME"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -82,6 +94,8 @@ read -r host
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "4. ROOT PASSWORD"
|
echo "4. ROOT PASSWORD"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -115,7 +129,7 @@ echo "Please enter a username:"
|
|||||||
read -r user
|
read -r user
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Setting user password.
|
# Setting user password
|
||||||
echo "Also please choose a password for your user:"
|
echo "Also please choose a password for your user:"
|
||||||
pwu=""
|
pwu=""
|
||||||
while [[ -z "${pwu}" ]]; do
|
while [[ -z "${pwu}" ]]; do
|
||||||
@@ -138,61 +152,64 @@ done
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "5. INSTALLING SYSTEM.."
|
echo "5. INSTALLING SYSTEM.."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Starting partitioning.
|
# Starting partitioning
|
||||||
echo "Partitioning /dev/${dev}.."
|
echo "Partitioning /dev/${dev}.."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Clearing partition table of selected disk.
|
# Clearing partition table of selected disk
|
||||||
echo "Clearing existing partitioning table."
|
echo "Clearing existing partitioning table."
|
||||||
sgdisk -Z "/dev/${dev}"
|
sgdisk -Z "/dev/${dev}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Creating boot partition.
|
# Creating boot partition
|
||||||
echo "Creating boot partition of 512 MB."
|
echo "Creating boot partition of 512 MB."
|
||||||
sgdisk -n 1:0:+512M "/dev/${dev}"
|
sgdisk -n 1:0:+512M "/dev/${dev}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Setting type for EFI.
|
# Setting type for EFI
|
||||||
echo "Setting partition type."
|
echo "Setting partition type."
|
||||||
sgdisk -t 1:ef00 "/dev/${dev}"
|
sgdisk -t 1:ef00 "/dev/${dev}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Creating system partition.
|
# Creating system partition
|
||||||
echo "Creating system partition."
|
echo "Creating system partition."
|
||||||
sgdisk -n 2:0:0 "/dev/${dev}"
|
sgdisk -n 2:0:0 "/dev/${dev}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Print partitions.
|
# Print partitions
|
||||||
echo "This is your new partition table:"
|
echo "This is your new partition table:"
|
||||||
lsblk | grep "${dev}"
|
lsblk | grep "${dev}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Get new variable.
|
# Get new variable
|
||||||
if [[ "${dev}" = "nvme0n1" ]]; then
|
if [[ "${dev}" = "nvme0n1" ]]; then
|
||||||
main="${dev}p2"
|
main="${dev}p2"
|
||||||
else
|
else
|
||||||
main="${dev}2"
|
main="${dev}2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Encrypting partition.
|
# Encrypting partition
|
||||||
echo "Encrypting system partition. This might take a while."
|
echo "Encrypting system partition. This might take a while."
|
||||||
echo
|
echo
|
||||||
echo -en "${pwcr}\n${pwcr}" | cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/$main
|
|
||||||
|
# https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode
|
||||||
|
echo -en "${pwcr}\n${pwcr}" | cryptsetup -s 512 luksFormat /dev/$main
|
||||||
echo "Partition successfully encrypted."
|
echo "Partition successfully encrypted."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Opening encrypted partition and mounting at /dev/mapper/main.
|
# Opening encrypted partition and mounting at /dev/mapper/main
|
||||||
echo "Decrypting.. This also might take a while."
|
echo "Decrypting.. This also might take a while."
|
||||||
echo
|
echo
|
||||||
echo -en "${pwcr}\n${pwcr}" | cryptsetup luksOpen "/dev/${main}" main
|
echo -en "${pwcr}\n${pwcr}" | cryptsetup luksOpen "/dev/${main}" main
|
||||||
echo "Partition successfully opened."
|
echo "Partition successfully opened."
|
||||||
echo
|
clear
|
||||||
|
|
||||||
lsblk | grep "${dev}"
|
##########
|
||||||
echo
|
|
||||||
|
|
||||||
echo "Creating the filesystem."
|
echo "Creating the filesystem."
|
||||||
|
|
||||||
@@ -202,11 +219,12 @@ else
|
|||||||
boot="${dev}1"
|
boot="${dev}1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create boot filesystem
|
||||||
mkfs.fat -F 32 -n UEFI "/dev/${boot}"
|
mkfs.fat -F 32 -n UEFI "/dev/${boot}"
|
||||||
echo "Filesystem for boot successfully created."
|
echo "Filesystem for boot successfully created."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Creating btrfs partition.
|
# Creating btrfs filesystem
|
||||||
mkfs.btrfs "/dev/mapper/main"
|
mkfs.btrfs "/dev/mapper/main"
|
||||||
|
|
||||||
mount "/dev/mapper/main" "/mnt"
|
mount "/dev/mapper/main" "/mnt"
|
||||||
@@ -224,105 +242,170 @@ mount -o autodefrag,compress=zstd:3,subvol=home "/dev/mapper/main" "/mnt/home"
|
|||||||
mkdir "/mnt/boot"
|
mkdir "/mnt/boot"
|
||||||
mount "/dev/${boot}" "/mnt/boot"
|
mount "/dev/${boot}" "/mnt/boot"
|
||||||
echo "Mounting complete."
|
echo "Mounting complete."
|
||||||
echo
|
clear
|
||||||
|
|
||||||
lsblk -a
|
##########
|
||||||
echo
|
|
||||||
|
|
||||||
# Updating mirrors using reflector.
|
# Updating mirrors using reflector
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Select_the_mirrors
|
||||||
echo "Updating mirrors.."
|
echo "Updating mirrors.."
|
||||||
reflector --verbose --latest 10 --country Germany --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
|
reflector --verbose --latest 10 --country Germany --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Check if keyring is up-to-date
|
# Check if keyring is up-to-date
|
||||||
if checkupdates | grep -q archlinux-keyring; then
|
echo "Updating keyring.."
|
||||||
echo "Updating keyring.."
|
pacman -Sy archlinux-keyring --needed --noconfirm
|
||||||
pacman -Sy archlinux-keyring --noconfirm
|
echo "Done."
|
||||||
echo "Done."
|
|
||||||
fi
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Installing base system.
|
# Installing base system
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Install_essential_packages
|
||||||
echo "Installing basic packages.."
|
echo "Installing basic packages.."
|
||||||
pacstrap "/mnt" base btrfs-progs firefox konsole linux linux-firmware linux-zen nano networkmanager plasma-desktop sddm sddm-kcm sudo xorg-xwayland
|
|
||||||
echo "Base system installed."
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Generating fstab.
|
# Base packages
|
||||||
|
base_packages=(
|
||||||
|
base # Arch Linux Base
|
||||||
|
btrfs-progs # Btrfs
|
||||||
|
firefox
|
||||||
|
konsole # Terminal
|
||||||
|
linux
|
||||||
|
linux-firmware
|
||||||
|
linux-zen
|
||||||
|
nano # Editor
|
||||||
|
networkmanager
|
||||||
|
plasma-login-manager
|
||||||
|
sudo
|
||||||
|
xorg-xwayland
|
||||||
|
plasma-desktop
|
||||||
|
plasma-nm # Network manager applet
|
||||||
|
)
|
||||||
|
|
||||||
|
# Necessary Plasma integrations
|
||||||
|
plasma_integrations=(
|
||||||
|
plasma-pa # Audio applet
|
||||||
|
breeze-gtk # Widget theme
|
||||||
|
kde-gtk-config # Syncs KDE settings to GTK applications
|
||||||
|
kdeplasma-addons # Misc addons: https://github.com/KDE/kdeplasma-addons
|
||||||
|
kscreen # Adds screen management to settings
|
||||||
|
plasma-browser-integration
|
||||||
|
powerdevil # Power management
|
||||||
|
)
|
||||||
|
|
||||||
|
# KDE Utilities
|
||||||
|
kde_utils=(
|
||||||
|
ark # Archiving tool
|
||||||
|
bluedevil # Bluetooth
|
||||||
|
discover # GUI package management
|
||||||
|
dolphin # File browser
|
||||||
|
filelight # Disk usage analyzer
|
||||||
|
gwenview # Image viewer
|
||||||
|
kate # Text editor
|
||||||
|
kcalc # Calculator
|
||||||
|
kdeconnect # Mobile synchronisation tool
|
||||||
|
kinfocenter # System information
|
||||||
|
#kmag # Doesn't work on Wayland
|
||||||
|
plasma-systemmonitor
|
||||||
|
okular # PDF viewer
|
||||||
|
partitionmanager # partitioning utility
|
||||||
|
spectacle # Screenshot utility
|
||||||
|
)
|
||||||
|
|
||||||
|
# Additional default software
|
||||||
|
default_software=(
|
||||||
|
libreoffice
|
||||||
|
pipewire
|
||||||
|
pipewire-pulse
|
||||||
|
pipewire-alsa
|
||||||
|
wireplumber
|
||||||
|
)
|
||||||
|
|
||||||
|
# Put all packages together
|
||||||
|
all_packages=(
|
||||||
|
"${base_packages[@]}"
|
||||||
|
"${plasma_integrations[@]}"
|
||||||
|
"${kde_utils[@]}"
|
||||||
|
"${default_software[@]}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
pacstrap "/mnt" "${all_packages[@]}"
|
||||||
|
|
||||||
|
echo "Base system installed."
|
||||||
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
|
# Generating fstab
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Fstab
|
||||||
echo "Generating fstab.."
|
echo "Generating fstab.."
|
||||||
genfstab -Up "/mnt" > "/mnt/etc/fstab"
|
genfstab -Up "/mnt" > "/mnt/etc/fstab"
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Setting hostname.
|
# Set time and hardware clock
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Time
|
||||||
|
echo "Setting timezone and clock.."
|
||||||
|
arch-chroot "/mnt" ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||||
|
arch-chroot "/mnt" hwclock --systohc
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Set hostname
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Network_configuration
|
||||||
echo "Setting hostname.."
|
echo "Setting hostname.."
|
||||||
echo "${host}" > "/mnt/etc/hostname"
|
echo "${host}" > "/mnt/etc/hostname"
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Setting locale.
|
# Set locale and keymap
|
||||||
echo "Setting and generating locale.."
|
# https://wiki.archlinux.org/title/Installation_guide#Localization
|
||||||
cat << EOF > "/mnt/etc/locale.gen"
|
echo "Setting locale and keymap.."
|
||||||
en_US.UTF-8 UTF-8
|
echo "en_US.UTF-8 UTF-8" >> "/mnt/etc/locale.gen"
|
||||||
EOF
|
echo "de_DE.UTF-8 UTF-8" >> "/mnt/etc/locale.gen"
|
||||||
|
|
||||||
#echo "${localegen}" >>/mnt/etc/locale.gen
|
|
||||||
arch-chroot "/mnt" locale-gen
|
arch-chroot "/mnt" locale-gen
|
||||||
echo "LANG=en_US.UTF-8" > "/mnt/etc/locale.conf"
|
arch-chroot "/mnt" localectl set-locale LANG=en_US.UTF-8
|
||||||
echo "KEYMAP=de-latin1" > "/mnt/etc/vconsole.conf"
|
|
||||||
|
echo "KEYMAP=de-latin1-nodeadkeys" > "/mnt/etc/vconsole.conf"
|
||||||
|
arch-chroot /mnt localectl set-keymap --no-convert de-latin1-nodeadkeys
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Set X locale and keyboard alyout.
|
##########
|
||||||
echo "Setting locale and keyboard layout."
|
|
||||||
|
|
||||||
#arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys
|
# Editing mkinitcpio.conf
|
||||||
systemd-firstboot --root=/mnt --keymap=de-latin1-nodeadkeys
|
|
||||||
|
|
||||||
cat << EOF > "/mnt/etc/X11/xorg.conf.d/00-keyboard.conf"
|
|
||||||
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
|
|
||||||
# probably wise not to edit this file manually. Use localectl(1) to
|
|
||||||
# instruct systemd-localed to update it.
|
|
||||||
Section "InputClass"
|
|
||||||
Identifier "system-keyboard"
|
|
||||||
MatchIsKeyboard "on"
|
|
||||||
Option "XkbLayout" "de"
|
|
||||||
Option "XkbModel" "pc105"
|
|
||||||
Option "XkbVariant" "deadgraveacute"
|
|
||||||
EndSection
|
|
||||||
EOF
|
|
||||||
echo "Done."
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Editing mkinitcpio.conf.
|
|
||||||
echo "Editing /etc/mkinitcpio.conf.."
|
echo "Editing /etc/mkinitcpio.conf.."
|
||||||
sed -i '55s/.*/HOOKS=(base udev autodetect microcode modconf kms block keyboard keymap encrypt filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf
|
sed -i '55s/.*/HOOKS=(base udev autodetect microcode modconf kms block keyboard keymap encrypt filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Editing taskbar.
|
# Editing taskbar
|
||||||
#sed -i '65s/.*/launchers=applications:systemsettings.desktop,applications:org.kde.konsole.desktop,applications:firefox.desktop/' /mnt/home/${user}/.config/plasma-org.kde.plasma.desktop-appletsrc
|
#sed -i '65s/.*/launchers=applications:systemsettings.desktop,applications:org.kde.konsole.desktop,applications:firefox.desktop/' /mnt/home/${user}/.config/plasma-org.kde.plasma.desktop-appletsrc
|
||||||
|
|
||||||
# Creating inital ramdisk.
|
# Creating inital ramdisk
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Initramfs
|
||||||
echo "Creating inital ramdisk for linux-zen.."
|
echo "Creating inital ramdisk for linux-zen.."
|
||||||
arch-chroot /mnt mkinitcpio -p linux-zen
|
arch-chroot /mnt mkinitcpio -p linux-zen
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Enable network and display manager.
|
# Enable network and display manager
|
||||||
echo "Enabling Networkmanager and display manager (sddm).."
|
echo "Enabling NetworkManager and Plasma Login Manager.."
|
||||||
arch-chroot "/mnt" systemctl enable NetworkManager sddm
|
arch-chroot "/mnt" systemctl enable NetworkManager plasmalogin
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
# Set root password
|
# Set root password
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Root_password
|
||||||
echo "Setting root password.."
|
echo "Setting root password.."
|
||||||
echo -en "${pwrt}\n${pwrt}" | arch-chroot "/mnt" passwd
|
echo -en "${pwrt}\n${pwrt}" | arch-chroot "/mnt" passwd
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Install bootloader.
|
# Install bootloader
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Boot_loader
|
||||||
echo "Installing systemd-boot.."
|
echo "Installing systemd-boot.."
|
||||||
arch-chroot "/mnt" bootctl --path=/boot install
|
arch-chroot "/mnt" bootctl --path=/boot install
|
||||||
echo "Done."
|
echo "Done."
|
||||||
@@ -331,7 +414,7 @@ echo
|
|||||||
# Get UUID for primary partition
|
# Get UUID for primary partition
|
||||||
uuid=$(ls -l /dev/disk/by-uuid | grep "${main}" | awk '{print $9}')
|
uuid=$(ls -l /dev/disk/by-uuid | grep "${main}" | awk '{print $9}')
|
||||||
|
|
||||||
# Set bootloader entry.
|
# Set bootloader entry
|
||||||
echo "Setting up bootloader.."
|
echo "Setting up bootloader.."
|
||||||
cat << EOF > "/mnt/boot/loader/entries/arch.conf"
|
cat << EOF > "/mnt/boot/loader/entries/arch.conf"
|
||||||
title Arch Linux
|
title Arch Linux
|
||||||
@@ -346,7 +429,7 @@ options lang=de locale=de_DE.UTF-8
|
|||||||
options init=/usr/lib/systemd/systemd
|
options init=/usr/lib/systemd/systemd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set bootloader fallback entry.
|
# Set bootloader fallback entry
|
||||||
cat << EOF > "/mnt/boot/loader/entries/arch-fallback.conf"
|
cat << EOF > "/mnt/boot/loader/entries/arch-fallback.conf"
|
||||||
title Arch Linux Fallback
|
title Arch Linux Fallback
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
@@ -358,58 +441,37 @@ options lang=de locale=de_DE.UTF-8
|
|||||||
options init=/usr/lib/systemd/systemd
|
options init=/usr/lib/systemd/systemd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set bootloader.
|
# Set bootloader
|
||||||
echo "timeout 1" >> "/mnt/boot/loader/loader.conf"
|
echo "timeout 1" >> "/mnt/boot/loader/loader.conf"
|
||||||
echo "default arch.conf" >> "/mnt/boot/loader/loader.conf"
|
echo "default arch.conf" >> "/mnt/boot/loader/loader.conf"
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Set username, password and group.
|
# Set username, password and group
|
||||||
echo "Adding user.."
|
echo "Adding user.."
|
||||||
arch-chroot /mnt useradd -m "${user}"
|
arch-chroot /mnt useradd -m "${user}"
|
||||||
echo -en "${pwur}\n${pwur}" | arch-chroot /mnt passwd "${user}"
|
echo -en "${pwur}\n${pwur}" | arch-chroot /mnt passwd "${user}"
|
||||||
arch-chroot /mnt gpasswd -a "${user}" wheel
|
arch-chroot /mnt gpasswd -a "${user}" wheel
|
||||||
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
|
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
|
||||||
|
|
||||||
|
# Create keyboard layout
|
||||||
|
config_dir="/home/${user}/.config"
|
||||||
|
arch-chroot /mnt sudo -u "${user}" mkdir -p "${config_dir}"
|
||||||
|
arch-chroot /mnt sudo -u "${user}" bash -c \
|
||||||
|
"printf '[Layout]\nLayoutList=de\nUse=true' >> ${config_dir}/kxkbrc"
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Enabling sddm auto-login.
|
# Enabling plasma login manager auto login
|
||||||
echo "Enabling auto-login.."
|
echo "Enabling auto login.."
|
||||||
mkdir /mnt/etc/sddm.conf.d
|
cat << EOF > /mnt/etc/plasmalogin.conf
|
||||||
cat << EOF > /mnt/etc/sddm.conf.d/autologin.conf
|
|
||||||
[Autologin]
|
[Autologin]
|
||||||
|
Session=plasma.desktop
|
||||||
User=${user}
|
User=${user}
|
||||||
Session=plasma
|
|
||||||
EOF
|
EOF
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Adding sddm config.
|
|
||||||
cat << EOF > /mnt/etc/sddm.conf.d/kde_settings.conf
|
|
||||||
[Autologin]
|
|
||||||
Relogin=false
|
|
||||||
Session=plasma
|
|
||||||
User=${user}
|
|
||||||
|
|
||||||
[General]
|
|
||||||
HaltCommand=/usr/bin/systemctl poweroff
|
|
||||||
RebootCommand=/usr/bin/systemctl reboot
|
|
||||||
|
|
||||||
[Theme]
|
|
||||||
Current=breeze
|
|
||||||
|
|
||||||
[Users]
|
|
||||||
MaximumUid=60513
|
|
||||||
MinimumUid=1000
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Unmounting and rebooting.
|
|
||||||
echo "Unmounting system.."
|
|
||||||
umount "/mnt/boot"
|
|
||||||
umount "/mnt"
|
|
||||||
echo "Done."
|
|
||||||
echo
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
echo "Installation finished!"
|
echo "Installation finished!"
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
### Arch Linux Konfiguration
|
||||||
|
|
||||||
|
## KDE Plasma
|
||||||
|
- disable Plasma splash screen
|
||||||
|
- set pointer to Breeze Light
|
||||||
|
- set task switcher to large icons
|
||||||
|
- set taskbar to auto hide and no floating
|
||||||
|
- disable desktop effect: highlight screen edges
|
||||||
|
- change wallpaper for desktop, lock screen and login screen
|
||||||
|
- set up kwallet
|
||||||
|
- disable restore sessions
|
||||||
|
- disable confirmation for shutdown etc.
|
||||||
|
- set windows position + size (for signal, telegram, firefox, keepass, konsole)
|
||||||
|
- set krusader pos 192,108 size 1536,864
|
||||||
|
- set touchpad to natural scrolling
|
||||||
|
- set shortcut strg + alt + q to lock screen
|
||||||
|
- set taskbar size 42
|
||||||
|
- edit .config/kwinrc (.4/.6)
|
||||||
|
- set animation speed to 90 %
|
||||||
|
- set up night light
|
||||||
|
- edit tray icons
|
||||||
|
|
||||||
|
## Apps
|
||||||
|
- telegram-desktop signal-desktop thunderbird krusader keepassxc nextcloud-client
|
||||||
|
- yay (git base-devel)
|
||||||
|
- yay-bin
|
||||||
|
- btop
|
||||||
|
- timeshift + backintime
|
||||||
|
- standardnotes-bin
|
||||||
|
- borg
|
||||||
|
- fwupd, fastfetch
|
||||||
|
- docker and docker-compose
|
||||||
|
- power-profile-daemon
|
||||||
|
- nano-syntax-highlighting
|
||||||
|
- amd-ucode (enable in bootloader)
|
||||||
|
- reflector
|
||||||
|
- journalctl-desktop-notification
|
||||||
|
- pacman-contrib (for paccache)
|
||||||
|
- vulkan-radeon, libvdpau-va-gl (hardware video acceleration for Firefox)
|
||||||
|
- jq
|
||||||
|
- rmtrash
|
||||||
|
- remove gnu-free-fonts (bug btop braille)
|
||||||
|
|
||||||
|
## Firefox
|
||||||
|
- set privacy to strict
|
||||||
|
- set clear browser history on close
|
||||||
|
- plasma integration, ublock, snowflake, keepass browser integration add ons
|
||||||
|
- set up hardware acceleration for firefox (vulkan-radeon, libvdpau-va-gl)
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
- set up Bash color prompt
|
||||||
|
- nano: enable syntax highlighting
|
||||||
|
- enable cronie service
|
||||||
|
- set up zram-generator
|
||||||
|
- update fwupd (and enable timer)
|
||||||
|
- enable discard/TRIM for LUKS device (sudo cryptsetup --allow-discards --persistent refresh main)
|
||||||
|
- set journald max size to 1G
|
||||||
|
- fix permission for boot in /etc/fstab (fmask=0177,dmask=0077)
|
||||||
|
- enable sshd service, create ssh key
|
||||||
|
- add misc bash alias
|
||||||
|
|
||||||
|
## Power
|
||||||
|
- set Plasma power management (on AC power = Balanced, on battery = Power Save)
|
||||||
|
- set boot option for AMD p-state (options amd_pstate=active)
|
||||||
|
|
||||||
|
## Pacman
|
||||||
|
- enable color
|
||||||
|
- set up reflector config
|
||||||
|
- enable multilib repos in pacman.conf
|
||||||
|
- enable reflector.timer
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
- enable docker service
|
||||||
|
- container: scrutiny, hawser, beszel, watchtower
|
||||||
|
- add user to docker group
|
||||||
|
- add docker-prune.sh to crontab
|
||||||
|
|
||||||
|
## Backups
|
||||||
|
- set up timeshift
|
||||||
|
- set up backintime
|
||||||
|
- write and enable backintime user service and timer
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
Reference in New Issue
Block a user