fix: run systemd-firstboot instead of enabling the service, re-add locale-gen

This commit is contained in:
2026-07-01 19:26:48 +02:00
parent 4b481315a0
commit b1192cd5ad
+46 -21
View File
@@ -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!"