forked from dataprolet/Arch-Linux-Installer
fix: run systemd-firstboot instead of enabling the service, re-add locale-gen
This commit is contained in:
+46
-21
@@ -28,6 +28,8 @@ 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:"
|
||||||
@@ -54,6 +56,8 @@ dev="${array[0]}"
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "2. ENCRYPTION"
|
echo "2. ENCRYPTION"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -79,6 +83,8 @@ done
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "3. HOSTNAME"
|
echo "3. HOSTNAME"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -88,6 +94,8 @@ read -r host
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "4. ROOT PASSWORD"
|
echo "4. ROOT PASSWORD"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -144,6 +152,8 @@ done
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
echo "5. INSTALLING SYSTEM.."
|
echo "5. INSTALLING SYSTEM.."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -202,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
|
||||||
@@ -238,6 +250,8 @@ 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
|
# https://wiki.archlinux.org/title/Installation_guide#Select_the_mirrors
|
||||||
echo "Updating mirrors.."
|
echo "Updating mirrors.."
|
||||||
@@ -328,6 +342,8 @@ 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
|
# https://wiki.archlinux.org/title/Installation_guide#Fstab
|
||||||
echo "Generating fstab.."
|
echo "Generating fstab.."
|
||||||
@@ -339,6 +355,34 @@ echo
|
|||||||
# https://wiki.archlinux.org/title/Installation_guide#Time
|
# https://wiki.archlinux.org/title/Installation_guide#Time
|
||||||
arch-chroot "/mnt" hwclock --systohc # Set the Hardware Clock to the current System 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
|
# Editing mkinitcpio.conf
|
||||||
@@ -363,6 +407,8 @@ 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
|
# https://wiki.archlinux.org/title/Installation_guide#Root_password
|
||||||
echo "Setting root password.."
|
echo "Setting root password.."
|
||||||
@@ -432,27 +478,6 @@ EOF
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
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
|
clear
|
||||||
|
|
||||||
echo "Installation finished!"
|
echo "Installation finished!"
|
||||||
|
|||||||
Reference in New Issue
Block a user