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
|
#!/bin/bash
|
||||||
|
|
||||||
Main() {
|
main() {
|
||||||
# Remove current keyring first, to complete initiate it
|
# Remove current keyring first, to complete initiate it
|
||||||
sudo rm -rf /etc/pacman.d/gnupg
|
sudo rm -rf /etc/pacman.d/gnupg
|
||||||
# We are using this, because archlinux is signing the keyring often with a newly created keyring
|
# 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 log="/home/liveuser/cachy-install.log"
|
||||||
local mode="online" # TODO: keep this line for now
|
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 SYSTEM=""
|
||||||
local BOOTLOADER=""
|
|
||||||
if [ -d "${_efi_check_dir}" ]; then
|
if [ -d /sys/firmware/efi ]; then
|
||||||
SYSTEM="UEFI SYSTEM"
|
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
|
else
|
||||||
SYSTEM="BIOS/MBR SYSTEM"
|
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
|
fi
|
||||||
|
|
||||||
local ISO_VERSION="$(cat /etc/version-tag)"
|
local ISO_VERSION="$(cat /etc/version-tag)"
|
||||||
echo "USING ISO VERSION: ${ISO_VERSION}"
|
echo "USING ISO VERSION: ${ISO_VERSION}"
|
||||||
|
|
||||||
if [[ "${_exitcode}" -eq 2 ]]; then
|
sudo pacman -Sy --noconfirm cachyos-calamares-next
|
||||||
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
|
|
||||||
|
|
||||||
# Get Hardware Informations
|
# Get Hardware Informations
|
||||||
inxi -F > $log
|
inxi -F > "$log"
|
||||||
|
|
||||||
cat <<EOF >> $log
|
cat <<EOF >> "$log"
|
||||||
########## $log by $progname
|
########## $log by $progname
|
||||||
########## Started (UTC): $(date -u "+%x %X")
|
########## Started (UTC): $(date -u "+%x %X")
|
||||||
########## ISO version: $ISO_VERSION
|
########## ISO version: $ISO_VERSION
|
||||||
########## System: $SYSTEM
|
########## System: $SYSTEM
|
||||||
########## Bootloader: $BOOTLOADER
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo cp "/usr/share/calamares/settings_${mode}.conf" /etc/calamares/settings.conf
|
sudo cp "/usr/share/calamares/settings_${mode}.conf" /etc/calamares/settings.conf
|
||||||
sudo -E dbus-launch calamares -D6 >> $log &
|
sudo -E dbus-launch calamares -D6 >> $log &
|
||||||
}
|
}
|
||||||
|
|
||||||
Main "$@"
|
main "$@"
|
||||||
@@ -14,7 +14,7 @@ breeze-gtk
|
|||||||
brltty
|
brltty
|
||||||
btrfs-progs
|
btrfs-progs
|
||||||
cachy-chroot
|
cachy-chroot
|
||||||
cachyos-calamares-qt6-next-grub
|
cachyos-calamares-next
|
||||||
cachyos-cli-installer-new
|
cachyos-cli-installer-new
|
||||||
cachyos-fish-config
|
cachyos-fish-config
|
||||||
cachyos-hello
|
cachyos-hello
|
||||||
@@ -209,5 +209,4 @@ xorg-xinit
|
|||||||
xorg-xkill
|
xorg-xkill
|
||||||
xorg-xrandr
|
xorg-xrandr
|
||||||
xorg-xrdb
|
xorg-xrdb
|
||||||
yad
|
|
||||||
zfs-utils
|
zfs-utils
|
||||||
Reference in new issue
Block a user