ravynsoft / ravynos

A BSD-based OS project that aims to provide source and binary compatibility with macOS® and a similar user experience.
https://www.ravynos.com
Other
5.68k stars 192 forks source link

Two Installation Modes: Clean Install and Dual-Boot #453

Closed chris-romanov closed 4 days ago

chris-romanov commented 6 days ago

Hi @mszoek,

Description: This pull request introduces two installation modes for the ravynOS installer:

  1. Clean Install: • This option wipes the entire disk and performs a fresh installation of ravynOS. • Thoroughly tested multiple times, and everything works as expected.
  2. Dual-Boot Installation: • This option allows ravynOS to coexist with an existing operating system by utilizing the existing EFI partition. • This feature has not been fully tested yet and requires further refinement.

I would greatly appreciate feedback, suggestions, and testing, especially for the Dual-Boot mode. Let me know your thoughts! 😊

chris-romanov commented 6 days ago

If ravynOS is already installed on the disk, the installation script blocks the Dual Boot option. Only the Clean Install option will be available.

chris-romanov commented 6 days ago

?

# Check for existing bootloader entries
if [[ "$install_mode" -eq 2 ]]; then
    echo -e "${GRAY}Adding ravynOS to the existing EFI partition...${RESET}"

    # Extract the EFI partition number using awk instead of grep -P
    efi_partition=$(gpart show $device | awk '/efi/ {print $3}')

    # Ensure we got a valid partition number
    if [[ -z "$efi_partition" ]]; then
        echo -e "${RED}Error: EFI partition not found on $device.${RESET}"
        exit 1
    fi

    efibootmgr -c -d /dev/$device -p $efi_partition -L "ravynOS" -l '/tmp/efi/efi/ravynos/bootx64.efi'
    efibootmgr -t 10
    echo -e "\033[0;32mTimeout of 10 seconds has been set.\033[0m"
    echo -e "To change it, use: \033[0;36mefibootmgr -t 5\033[0m"
else
    echo -e "${GRAY}Setting up new EFI boot entry...${RESET}"
    mkdir -p /tmp/efi/efi/boot
    cp /boot/loader.efi /tmp/efi/efi/boot/bootx64.efi
fi
chris-romanov commented 6 days ago

Fixed several issues. Changed folder names from efi to EFI, EFI\RAVYNOS, EFI\BOOT. UEFI SPECS

chris-romanov commented 5 days ago

Added SSH enablement for the Dev machine.