fix partitioning for mmcblk and nvme devices #1

Merged
arzumify merged 2 commits from :main into main 2024-04-03 10:32:07 +01:00
1 changed files with 11 additions and 0 deletions
Showing only changes of commit f5c20d724e - Show all commits

View File

@ -47,6 +47,17 @@ 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)
if [[ ${choice} =~ "nvme" ]]; then
part1="p1"
part2="p2"
elif [[ ${choice} =~ "mmcblk" ]]; then
part1="p1"
part2="p2"
else
part1="1"
part2="2"
fi
if [[ "$(cat /sys/block/${choice}/ro)" = "1" ]]; then
dialog --title "Scan disk" --msgbox "You are not able to install evolutionOS on a non-writable disk" 0 0
failinstall