forked from dataprolet/Arch-Linux-Installer
Fix systemd-firstboot
This commit is contained in:
+13
-72
@@ -327,86 +327,27 @@ genfstab -Up "/mnt" > "/mnt/etc/fstab"
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
##########
|
# Set hardware clock
|
||||||
|
# https://wiki.archlinux.org/title/Installation_guide#Time
|
||||||
# Setting timezone to Europe/Berlin
|
|
||||||
echo "Setting timezone.."
|
|
||||||
|
|
||||||
## Replaced by systemd-firstboot
|
|
||||||
# arch-chroot "/mnt" ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
echo "Done."
|
# Set keymap, locale, timezone and hostname
|
||||||
echo
|
|
||||||
|
|
||||||
##########
|
|
||||||
|
|
||||||
## Replaced by systemd-firstboot
|
|
||||||
# Setting hostname
|
|
||||||
# echo "Setting hostname.."
|
|
||||||
# echo "${host}" > "/mnt/etc/hostname"
|
|
||||||
# echo "Done."
|
|
||||||
# echo
|
|
||||||
|
|
||||||
##########
|
|
||||||
|
|
||||||
# Setting locale
|
|
||||||
# https://wiki.archlinux.org/title/Installation_guide#Localization
|
|
||||||
echo "Setting and generating locale.."
|
|
||||||
cat << EOF > "/mnt/etc/locale.gen"
|
|
||||||
en_US.UTF-8 UTF-8
|
|
||||||
EOF
|
|
||||||
# https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Persistent_configuration
|
|
||||||
arch-chroot "/mnt" locale-gen
|
|
||||||
|
|
||||||
## Replaced by systemd-firstboot
|
|
||||||
# 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."
|
|
||||||
|
|
||||||
## Replaced by systemd-firstboot
|
|
||||||
#arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys
|
|
||||||
|
|
||||||
##########
|
|
||||||
|
|
||||||
# https://wiki.archlinux.org/title/Systemd-firstboot
|
# https://wiki.archlinux.org/title/Systemd-firstboot
|
||||||
systemd-firstboot \
|
rm /etc/{machine-id,localtime,hostname,shadow,locale.conf}
|
||||||
--root=/mnt \
|
|
||||||
--keymap=de-latin1-nodeadkeys \
|
cat << EOF > /etc/systemd/system/systemd-firstboot.service.d/install.conf
|
||||||
--locale=en_US.UTF-8 \
|
[Service]
|
||||||
--timezone=Europe/Berlin \
|
ExecStart=
|
||||||
--hostname="${host}" # https://wiki.archlinux.org/title/Installation_guide#Network_configuration
|
ExecStart=/usr/bin/systemd-firstboot --root=/mnt --keymap=de-latin1-nodeadkeys --locale=en_US.UTF-8 --timezone=Europe/Berlin --hostname="${host}"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sysinit.target
|
||||||
|
EOF
|
||||||
|
|
||||||
systemctl enable systemd-firstboot
|
systemctl enable systemd-firstboot
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
## Obsolete for Wayland
|
|
||||||
# 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
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user