31 Commits
Author SHA1 Message Date
dataprolet 1071d75794 fix: add ConditionFirstBoot= and --force parameter 2026-07-01 21:52:40 +02:00
dataprolet 4b105674e4 fix: enable systemd-firstboot in arch-chroot, locale format 2026-07-01 21:29:03 +02:00
dataprolet b1192cd5ad fix: run systemd-firstboot instead of enabling the service, re-add locale-gen 2026-07-01 19:26:48 +02:00
dataprolet 4b481315a0 fix: move systemd-firstboot to end 2026-07-01 19:07:01 +02:00
dataprolet 52a5b63ad4 Add trap, fix systemd-firstboot 2026-07-01 18:48:12 +02:00
dataprolet 50d6096e99 Fix systemd-firstboot 2026-07-01 17:54:28 +02:00
dataprolet 9076d6559b Add comments, wiki links, replace keymap, locale, timezone and hostname with systemd-firstboot 2026-07-01 17:34:16 +02:00
dataprolet 5b104376c3 Remove obsolete xorg keyboard conf 2026-07-01 16:57:03 +02:00
dataprolet e8aa72467c Replace sddm with plasmalogin 2026-07-01 16:40:47 +02:00
dataprolet 932913f370 Update README.md 2026-05-31 17:13:21 +02:00
dataprolet 0ded1e2a6a Delete img/screenshot-old.png 2026-05-31 17:13:05 +02:00
dataprolet 0fca1c9d06 Update img/screenshot.png 2026-05-31 17:12:45 +02:00
dataprolet bb7f582ab3 Update img/screenshot.img 2026-05-31 17:12:26 +02:00
dataprolet aba5406f52 Upload files to "img" 2026-05-31 17:12:15 +02:00
dataprolet ae93aaf13b Delete img/screenshot.img/Screenshot_20260531_170854-1.png 2026-05-31 17:11:57 +02:00
dataprolet c7729e0af1 Upload files to "img/screenshot.img" 2026-05-31 17:11:30 +02:00
dataprolet 74b6fcdf45 Update img/screenshot-old.png 2026-05-31 17:10:50 +02:00
dataprolet 5729f530de Delete img/screenshot-new.png/Bildschirmfoto 2026-02-03 um 14.35.47.png 2026-05-31 17:10:24 +02:00
dataprolet d5eeb97ebf Delete img/screenshot-old.png 2026-05-31 17:10:13 +02:00
dataprolet 7c7be12ba7 Update install.sh 2026-05-31 17:00:23 +02:00
dataprolet ef8914bdb8 Update README.md 2026-02-03 14:42:31 +01:00
dataprolet e495ba1db3 Update img/screenshot.png 2026-02-03 14:42:18 +01:00
dataprolet 8ecd895b21 Upload files to "img" 2026-02-03 14:42:05 +01:00
dataprolet b1fcdaa511 Upload files to "img/screenshot-new.png" 2026-02-03 14:39:49 +01:00
dataprolet 77b79074dc Update README.md 2026-02-03 14:37:50 +01:00
dataprolet 0eeaff90b8 Update img/screenshot-old.png 2026-02-03 14:37:14 +01:00
dataprolet 689f024ca1 Rename screenshot 2025-09-13 19:22:12 +02:00
dataprolet aefc0018ac Update README and screenshot 2025-09-13 15:26:54 +02:00
dataprolet 72dabbdf96 Update install.sh
Add timezone Europe/Berlin
2025-06-18 09:36:05 +02:00
dataprolet 6b3545f865 Add set timezone 2025-06-17 14:12:26 +02:00
dataprolet 0dc59d2002 Update README.md 2025-05-29 00:44:01 +02:00
3 changed files with 134 additions and 134 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
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 **February 2025**. Tested and working as of **June 2026**.
![Post-install screenshot.](img/screenshot.png) ![Post-install screenshot.](img/screenshot.png)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 KiB

After

Width:  |  Height:  |  Size: 393 KiB

+133 -133
View File
@@ -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,53 +152,57 @@ 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
@@ -194,6 +212,8 @@ echo
lsblk | grep "${dev}" lsblk | grep "${dev}"
echo echo
##########
echo "Creating the filesystem." echo "Creating the filesystem."
if [ "${dev}" = "nvme0n1" ]; then if [ "${dev}" = "nvme0n1" ]; then
@@ -202,11 +222,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"
@@ -229,7 +250,10 @@ echo
lsblk -a lsblk -a
echo 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."
@@ -243,56 +267,56 @@ if checkupdates | grep -q archlinux-keyring; then
fi 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.."
# Basis-Pakete # Base packages
base_packages=( base_packages=(
base base # Arch Linux Base
btrfs-progs btrfs-progs # Btrfs
firefox firefox
konsole konsole # Terminal
linux linux
linux-firmware linux-firmware
linux-zen linux-zen
nano nano # Editor
networkmanager networkmanager
sddm plasma-login-manager
sddm-kcm
sudo sudo
xorg-xwayland xorg-xwayland
plasma-desktop plasma-desktop
plasma-nm plasma-nm # Network manager applet
) )
# Notwendige Plasma-Integrationen # Necessary Plasma integrations
plasma_integrations=( plasma_integrations=(
plasma-pa plasma-pa # Audio applet
breeze-gtk breeze-gtk # Widget theme
kde-gtk-config kde-gtk-config # Syncs KDE settings to GTK applications
kdeplasma-addons kdeplasma-addons # Misc addons: https://github.com/KDE/kdeplasma-addons
kscreen kscreen # Adds screen management to settings
plasma-browser-integration plasma-browser-integration
powerdevil powerdevil # Power management
) )
# KDE Utilities # KDE Utilities
kde_utils=( kde_utils=(
ark ark # Archiving tool
bluedevil bluedevil # Bluetooth
discover discover # GUI package management
dolphin dolphin # File browser
filelight filelight # Disk usage analyzer
gwenview gwenview # Image viewer
kate kate # Text editor
kcalc kcalc # Calculator
kdeconnect kdeconnect # Mobile synchronisation tool
kinfocenter kinfocenter # System information
kmag #kmag # Doesn't work on Wayland
plasma-systemmonitor plasma-systemmonitor
okular okular # PDF viewer
partitionmanager partitionmanager # partitioning utility
spectacle spectacle # Screenshot utility
) )
# Additional default software # Additional default software
@@ -304,7 +328,7 @@ default_software=(
wireplumber wireplumber
) )
# Alle Pakete zusammenführen # Put all packages together
all_packages=( all_packages=(
"${base_packages[@]}" "${base_packages[@]}"
"${plasma_integrations[@]}" "${plasma_integrations[@]}"
@@ -312,86 +336,89 @@ all_packages=(
"${default_software[@]}" "${default_software[@]}"
) )
# Pakete installieren # Install packages
pacstrap "/mnt" "${all_packages[@]}" pacstrap "/mnt" "${all_packages[@]}"
echo "Base system installed." echo "Base system installed."
echo echo
# Generating fstab. ##########
# 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 hardware clock
echo "Setting hostname.." # https://wiki.archlinux.org/title/Installation_guide#Time
echo "${host}" > "/mnt/etc/hostname" arch-chroot "/mnt" hwclock --systohc # Set the Hardware Clock to the current System Time
echo "Done."
echo
# Setting locale. # Generate locale
echo "Setting and generating locale.." # https://wiki.archlinux.org/title/Installation_guide#Localization
cat << EOF > "/mnt/etc/locale.gen" echo "en_US.UTF-8 UTF-8" >> "/mnt/etc/locale.gen"
en_US.UTF-8 UTF-8
EOF
#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"
echo "KEYMAP=de-latin1" > "/mnt/etc/vconsole.conf"
echo "Done."
echo
# Set X locale and keyboard alyout. # Set keymap, locale, timezone and hostname
echo "Setting locale and keyboard layout." # https://wiki.archlinux.org/title/Systemd-firstboot
service_dir="/mnt/etc/systemd/system/systemd-firstboot.service.d"
mkdir "${service_dir}"
#arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys rootdir="/mnt"
systemd-firstboot --root=/mnt --keymap=de-latin1-nodeadkeys keymap="de-latin1-nodeadkeys"
locale="en_US.UTF-8"
timezone="Europe/Berlin"
cat << EOF > "/mnt/etc/X11/xorg.conf.d/00-keyboard.conf" cat << EOF > "${service_dir}/install.conf"
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's [Unit]
# probably wise not to edit this file manually. Use localectl(1) to ConditionFirstBoot=
# instruct systemd-localed to update it.
Section "InputClass" [Service]
Identifier "system-keyboard" ExecStart=
MatchIsKeyboard "on" ExecStart=/usr/bin/systemd-firstboot --root="${rootdir}" --keymap="${keymap}" --locale="${locale}" --timezone="${timezone}" --hostname="${host}" --force
Option "XkbLayout" "de"
Option "XkbModel" "pc105" [Install]
Option "XkbVariant" "deadgraveacute" WantedBy=sysinit.target
EndSection
EOF EOF
echo "Done."
echo
# Editing mkinitcpio.conf. arch-chroot "/mnt" systemctl enable systemd-firstboot.service
##########
# 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."
@@ -400,7 +427,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
@@ -415,7 +442,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
@@ -427,13 +454,13 @@ 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}"
@@ -442,43 +469,16 @@ sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
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!"