From 92058a986451857100cc39eff2faf0e89a0ba5b6 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Thu, 22 Feb 2024 16:20:48 +0000 Subject: [PATCH] FINAL --- installer.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/installer.sh b/installer.sh index fce3863..da5b915 100755 --- a/installer.sh +++ b/installer.sh @@ -41,6 +41,9 @@ else uefi=false 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 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 failinstall 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 dialog --msgbox "Mounting ESP failed!" 0 0 failinstall @@ -129,13 +133,14 @@ while true; do failinstall fi mkdir /mnt/dev /mnt/tmp /mnt/proc /mnt/sys - rm -rf /etc/dinit.d/rcboot.sh - mv /etc/dinit.d/rcboot-real.sh /etc/dinit.d/rcboot.sh + rm -rf /mnt/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 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 - rm -rf /mnt/usr/bin/evolution-installer /mnt/usr/bin/genfstab + rm -rf /mnt/usr/bin/evolution-installer break else 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 $hostname > /mnt/etc/hostname 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 xchroot /mnt grub-install /dev/${choice} fi @@ -190,7 +198,6 @@ if [[ $? = 1 ]]; then dialog --msgbox "Package configuration failed!" 0 0 failinstall fi -genfstab -t UUID /mnt > /mnt/etc/fstab dialog --yesno "EvolutionOS has been installed! Would you like to reboot?" 0 0 if [[ $? = 1 ]]; then clear