This commit is contained in:
Tracker-Friendly 2024-02-22 16:20:48 +00:00
parent 7c31233858
commit 92058a9864
1 changed files with 14 additions and 7 deletions

View File

@ -41,6 +41,9 @@ else
uefi=false uefi=false
fi fi
insmod /root/vfat-modules/fat.ko.zst
insmod /root/vfat-modules/vfat.ko.zst
dialog --title "Welcome" --msgbox "Welcome to the EvolutionOS installer! \n\nThis installer is meant to be straightforward, no need for technical skill. \n\nPress enter to select buttons, tab to move between text boxes, and left / right to move between buttons." 0 0 dialog --title "Welcome" --msgbox "Welcome to the EvolutionOS installer! \n\nThis installer is meant to be straightforward, no need for technical skill. \n\nPress enter to select buttons, tab to move between text boxes, and left / right to move between buttons." 0 0
choice=$(dialog --menu "Select an installation drive:" 20 60 10 $(create_menu $(parted -l | grep -oE '^Disk /dev/[a-zA-Z0-9]+' | cut -d' ' -f2- | cut -c 6-)) 2>&1 >/dev/tty) choice=$(dialog --menu "Select an installation drive:" 20 60 10 $(create_menu $(parted -l | grep -oE '^Disk /dev/[a-zA-Z0-9]+' | cut -d' ' -f2- | cut -c 6-)) 2>&1 >/dev/tty)
@ -83,7 +86,8 @@ if [[ $? = 0 ]]; then
dialog --msgbox "Mounting failed!" 0 0 dialog --msgbox "Mounting failed!" 0 0
failinstall failinstall
fi fi
mount /dev/${choice}1 /mnt/boot/efi --mkdir mkdir -p /mnt/boot/efi
sh -c "mount /dev/${choice}1 /mnt/boot/efi"
if [[ $? = 1 ]]; then if [[ $? = 1 ]]; then
dialog --msgbox "Mounting ESP failed!" 0 0 dialog --msgbox "Mounting ESP failed!" 0 0
failinstall failinstall
@ -129,13 +133,14 @@ while true; do
failinstall failinstall
fi fi
mkdir /mnt/dev /mnt/tmp /mnt/proc /mnt/sys mkdir /mnt/dev /mnt/tmp /mnt/proc /mnt/sys
rm -rf /etc/dinit.d/rcboot.sh rm -rf /mnt/etc/dinit.d/rcboot.sh
mv /etc/dinit.d/rcboot-real.sh /etc/dinit.d/rcboot.sh rm -rf /mnt/root/vfat-modules
mv /mnt/etc/dinit.d/rcboot-real.sh /mnt/etc/dinit.d/rcboot.sh
xbps-remove -OoR dialog parted e2fsprogs btrfs-progs xtools-minimal ncurses -r /mnt -y xbps-remove -OoR dialog parted e2fsprogs btrfs-progs xtools-minimal ncurses -r /mnt -y
if [[ $uefi = false ]]; then if [[ $uefi = false ]]; then
xbps-remove -OoR dosfstools grub-x86_64-efi -y xbps-remove -OoR dosfstools grub-x86_64-efi -r /mnt -y
fi fi
rm -rf /mnt/usr/bin/evolution-installer /mnt/usr/bin/genfstab rm -rf /mnt/usr/bin/evolution-installer
break break
else else
ping -c 1 example.org >/dev/null 2>&1 ping -c 1 example.org >/dev/null 2>&1
@ -175,7 +180,10 @@ xchroot /mnt useradd -m "${username}"
echo -e "$userpasswd\n$userpasswd" | xchroot /mnt passwd "${username}" echo -e "$userpasswd\n$userpasswd" | xchroot /mnt passwd "${username}"
echo $hostname > /mnt/etc/hostname echo $hostname > /mnt/etc/hostname
if [[ $uefi = true ]]; then if [[ $uefi = true ]]; then
xchroot /mnt grub-install --efi-directory=/boot/efi /dev/${choice} xchroot /mnt grub-install --no-nvram --efi-directory=/boot/efi /dev/${choice}
mkdir -p /mnt/boot/efi/EFI/boot/
mv /mnt/boot/efi/EFI/void*/grubx64.efi /mnt/boot/efi/EFI/boot/bootx64.efi
rm -rf /mnt/boot/efi/EFI/void*
else else
xchroot /mnt grub-install /dev/${choice} xchroot /mnt grub-install /dev/${choice}
fi fi
@ -190,7 +198,6 @@ if [[ $? = 1 ]]; then
dialog --msgbox "Package configuration failed!" 0 0 dialog --msgbox "Package configuration failed!" 0 0
failinstall failinstall
fi fi
genfstab -t UUID /mnt > /mnt/etc/fstab
dialog --yesno "EvolutionOS has been installed! Would you like to reboot?" 0 0 dialog --yesno "EvolutionOS has been installed! Would you like to reboot?" 0 0
if [[ $? = 1 ]]; then if [[ $? = 1 ]]; then
clear clear