mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
Move bootloader selection in calamares module (#76)
This commit is contained in:
1 parent
e556dad8d0
commit
b13da0aadc
2 files changed
+8
-65
No files matched your search
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
Main() {
|
||||
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
|
||||
@@ -21,87 +21,31 @@ Main() {
|
||||
local log="/home/liveuser/cachy-install.log"
|
||||
local mode="online" # TODO: keep this line for now
|
||||
|
||||
local _efi_check_dir="/sys/firmware/efi"
|
||||
local _exitcode=2 # by default use grub
|
||||
|
||||
local SYSTEM=""
|
||||
local BOOTLOADER=""
|
||||
if [ -d "${_efi_check_dir}" ]; then
|
||||
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
SYSTEM="UEFI SYSTEM"
|
||||
_exitcode=$(yad --width 300 --title "Bootloader" \
|
||||
--image=gnome-shutdown \
|
||||
--button="Grub:2" \
|
||||
--button="Systemd-boot(Default):3" \
|
||||
--button="Refind:4" \
|
||||
--button="AI SDK / Refind:5" \
|
||||
--button="Limine:6" \
|
||||
--text "Choose Bootloader/Edition:" ; echo $?)
|
||||
else
|
||||
SYSTEM="BIOS/MBR SYSTEM"
|
||||
_exitcode=$(yad --width 300 --title "Bootloader" \
|
||||
--image=gnome-shutdown \
|
||||
--button="Grub:2" \
|
||||
--button="Limine:6" \
|
||||
--text "Choose Bootloader/Edition:" ; echo $?)
|
||||
fi
|
||||
|
||||
local ISO_VERSION="$(cat /etc/version-tag)"
|
||||
echo "USING ISO VERSION: ${ISO_VERSION}"
|
||||
|
||||
if [[ "${_exitcode}" -eq 2 ]]; then
|
||||
BOOTLOADER="GRUB"
|
||||
echo "USING GRUB!"
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-limine
|
||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-grub
|
||||
elif [[ "${_exitcode}" -eq 3 ]]; then
|
||||
BOOTLOADER="SYSTEMD-BOOT"
|
||||
echo "USING SYSTEMD-BOOT!"
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-limine
|
||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-systemd
|
||||
elif [[ "${_exitcode}" -eq 4 ]]; then
|
||||
BOOTLOADER="REFIND"
|
||||
echo "USING REFIND!"
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-limine
|
||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-refind
|
||||
elif [[ "${_exitcode}" -eq 5 ]]; then
|
||||
BOOTLOADER="AI-SDK/Refind"
|
||||
echo "USING AI SDK and Refind!"
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-limine
|
||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-ai
|
||||
elif [[ "${_exitcode}" -eq 6 ]]; then
|
||||
BOOTLOADER="Limine"
|
||||
echo "USING Limine"
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-limine
|
||||
else
|
||||
exit
|
||||
fi
|
||||
sudo pacman -Sy --noconfirm cachyos-calamares-next
|
||||
|
||||
# Get Hardware Informations
|
||||
inxi -F > $log
|
||||
inxi -F > "$log"
|
||||
|
||||
cat <<EOF >> $log
|
||||
cat <<EOF >> "$log"
|
||||
########## $log by $progname
|
||||
########## Started (UTC): $(date -u "+%x %X")
|
||||
########## ISO version: $ISO_VERSION
|
||||
########## System: $SYSTEM
|
||||
########## Bootloader: $BOOTLOADER
|
||||
EOF
|
||||
|
||||
sudo cp "/usr/share/calamares/settings_${mode}.conf" /etc/calamares/settings.conf
|
||||
sudo -E dbus-launch calamares -D6 >> $log &
|
||||
}
|
||||
|
||||
Main "$@"
|
||||
main "$@"
|
||||
Reference in new issue
Block a user