mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
52 lines
1.8 KiB
Bash
Executable File
52 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
main() {
|
|
# Remove current keyring first, to complete initiate it
|
|
sudo rm -rf /etc/pacman.d/gnupg
|
|
# We are using this, because archlinux is signing the keyring often with a newly created keyring
|
|
# This results into a failed installation for the user.
|
|
# Installing archlinux-keyring fails due not being correctly signed
|
|
# Mitigate this by installing the latest archlinux-keyring on the ISO, before starting the installation
|
|
# The issue could also happen, when the installation does rank the mirrors and then a "faulty" mirror gets used
|
|
sudo pacman -Sy --noconfirm archlinux-keyring cachyos-keyring
|
|
# Also populate the keys, before starting the Installer, to avoid above issue
|
|
sudo pacman-key --init
|
|
sudo pacman-key --populate archlinux cachyos
|
|
# Also use timedatectl to sync the time with the hardware clock
|
|
# There has been a bunch of reports, that the keyring was created in the future
|
|
# Syncing appears to fix it
|
|
timedatectl set-ntp true
|
|
|
|
local progname="$(basename "$0")"
|
|
local log="/home/liveuser/cachy-install.log"
|
|
local mode="online" # TODO: keep this line for now
|
|
|
|
local SYSTEM=""
|
|
|
|
if [ -d /sys/firmware/efi ]; then
|
|
SYSTEM="UEFI SYSTEM"
|
|
else
|
|
SYSTEM="BIOS/MBR SYSTEM"
|
|
fi
|
|
|
|
local ISO_VERSION="$(cat /etc/version-tag)"
|
|
echo "USING ISO VERSION: ${ISO_VERSION}"
|
|
|
|
sudo pacman -Sy --noconfirm cachyos-calamares
|
|
|
|
# Get Hardware Informations
|
|
inxi -F > "$log"
|
|
|
|
cat <<EOF >> "$log"
|
|
########## $log by $progname
|
|
########## Started (UTC): $(date -u "+%x %X")
|
|
########## ISO version: $ISO_VERSION
|
|
########## System: $SYSTEM
|
|
EOF
|
|
|
|
sudo cp "/usr/share/calamares/settings_${mode}.conf" /etc/calamares/settings.conf
|
|
exec pkexec-wrapper calamares -D6 >> $log
|
|
}
|
|
|
|
main "$@"
|