From b1192cd5ade13d64e8d83ef6b4a27ce2a10d5ba0 Mon Sep 17 00:00:00 2001 From: dataprolet Date: Wed, 1 Jul 2026 19:26:48 +0200 Subject: [PATCH] fix: run systemd-firstboot instead of enabling the service, re-add locale-gen --- install.sh | 67 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/install.sh b/install.sh index cc83788..2bfb0bf 100644 --- a/install.sh +++ b/install.sh @@ -28,6 +28,8 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then fi clear +########## + # Selecting disk echo "1. PARTITIONING" echo "Please select a disk to partition:" @@ -54,6 +56,8 @@ dev="${array[0]}" clear +########## + echo "2. ENCRYPTION" echo @@ -79,6 +83,8 @@ done clear +########## + echo "3. HOSTNAME" echo @@ -88,6 +94,8 @@ read -r host clear +########## + echo "4. ROOT PASSWORD" echo @@ -144,6 +152,8 @@ done clear +########## + echo "5. INSTALLING SYSTEM.." echo @@ -202,6 +212,8 @@ echo lsblk | grep "${dev}" echo +########## + echo "Creating the filesystem." if [ "${dev}" = "nvme0n1" ]; then @@ -238,6 +250,8 @@ echo lsblk -a echo +########## + # Updating mirrors using reflector # https://wiki.archlinux.org/title/Installation_guide#Select_the_mirrors echo "Updating mirrors.." @@ -328,6 +342,8 @@ pacstrap "/mnt" "${all_packages[@]}" echo "Base system installed." echo +########## + # Generating fstab # https://wiki.archlinux.org/title/Installation_guide#Fstab echo "Generating fstab.." @@ -339,6 +355,34 @@ echo # https://wiki.archlinux.org/title/Installation_guide#Time arch-chroot "/mnt" hwclock --systohc # Set the Hardware Clock to the current System Time +# Generate locale +# https://wiki.archlinux.org/title/Installation_guide#Localization +echo "en_US.UTF-8" >> "/mnt/etc/locale.gen" +arch-chroot "/mnt" locale-gen + +# Set keymap, locale, timezone and hostname +# https://wiki.archlinux.org/title/Systemd-firstboot +# service_dir="/mnt/etc/systemd/system/systemd-firstboot.service.d" +# mkdir "${service_dir}" + +rootdir="/mnt" +keymap="de-latin1-nodeadkeys" +locale="en_US.UTF-8" +timezone="Europe/Berlin" + +arch-chroot "/mnt" systemd-firstboot --root="${rootdir}" --keymap="${keymap}" --locale="${locale}" --timezone="${timezone}" --hostname="${host}" + +# cat << EOF > "${service_dir}/install.conf" +# [Service] +# ExecStart= +# ExecStart=/usr/bin/systemd-firstboot --root="${rootdir}" --keymap="${keymap}" --locale="${locale}" --timezone="${timezone}" --hostname="${host}" + +# [Install] +# WantedBy=sysinit.target +# EOF + +# systemctl enable systemd-firstboot.service + ########## # Editing mkinitcpio.conf @@ -363,6 +407,8 @@ arch-chroot "/mnt" systemctl enable NetworkManager plasmalogin echo "Done." echo +########## + # Set root password # https://wiki.archlinux.org/title/Installation_guide#Root_password echo "Setting root password.." @@ -432,27 +478,6 @@ EOF echo "Done." echo -# Set keymap, locale, timezone and hostname -# https://wiki.archlinux.org/title/Systemd-firstboot -service_dir="/mnt/etc/systemd/system/systemd-firstboot.service.d" -mkdir "${service_dir}" - -rootdir="/mnt" -keymap="de-latin1-nodeadkeys" -locale="en_US.UTF-8" -timezone="Europe/Berlin" - -cat << EOF > "${service_dir}/install.conf" -[Service] -ExecStart= -ExecStart=/usr/bin/systemd-firstboot --root="${rootdir}" --keymap="${keymap}" --locale="${locale}" --timezone="${timezone}" --hostname="${host}" - -[Install] -WantedBy=sysinit.target -EOF - -systemctl enable systemd-firstboot.service - clear echo "Installation finished!"