@@ -952,6 +952,7 @@ menu_network() {
952952validate_filesystems () {
953953 local mnts dev size fstype mntpt mkfs rootfound fmt
954954 local usrfound efi_system_partition
955+ local bootdev=$( get_option BOOTLOADER)
955956
956957 unset TARGETFS
957958 mnts=$( grep -E ' ^MOUNTPOINT.*' $CONF_FILE )
@@ -985,10 +986,11 @@ the mount point for the root filesystem (/) has not yet been configured." ${MSGB
985986 DIALOG --msgbox " ${BOLD}${RED} ERROR:${RESET} \
986987/usr mount point has been configured but is not supported, please remove it to continue." ${MSGBOXSIZE}
987988 return 1
988- elif [ -n " $EFI_SYSTEM " -a -z " $efi_system_partition " ]; then
989+ elif [ -n " $EFI_SYSTEM " -a " $bootdev " != " none " -a -z " $efi_system_partition " ]; then
989990 DIALOG --msgbox " ${BOLD}${RED} ERROR:${RESET} \
990991The EFI System Partition has not yet been configured, please create it\n
991992as FAT32, mountpoint /boot/efi and at least with 100MB of size." ${MSGBOXSIZE}
993+ return 1
992994 fi
993995 FILESYSTEMS_DONE=1
994996}
@@ -1191,17 +1193,10 @@ enable_dhcpd() {
11911193}
11921194
11931195menu_install () {
1194- # Don't continue if filesystems are not ready.
1195- validate_filesystems || return 1
1196-
11971196 ROOTPASSWORD_DONE=" $( get_option ROOTPASSWORD) "
11981197 BOOTLOADER_DONE=" $( get_option BOOTLOADER) "
11991198
1200- if [ -z " $FILESYSTEMS_DONE " ]; then
1201- DIALOG --msgbox " ${BOLD} Required filesystems were not configured, \
1202- please do so before starting the installation.${RESET} " ${MSGBOXSIZE}
1203- return 1
1204- elif [ -z " $ROOTPASSWORD_DONE " ]; then
1199+ if [ -z " $ROOTPASSWORD_DONE " ]; then
12051200 DIALOG --msgbox " ${BOLD} The root password has not been configured, \
12061201please do so before starting the installation.${RESET} " ${MSGBOXSIZE}
12071202 return 1
@@ -1211,6 +1206,16 @@ configured, please do so before starting the installation.${RESET}" ${MSGBOXSIZE
12111206 return 1
12121207 fi
12131208
1209+ # Validate filesystems after making sure bootloader is done,
1210+ # so that specific checks can be made based on the selection
1211+ validate_filesystems || return 1
1212+
1213+ if [ -z " $FILESYSTEMS_DONE " ]; then
1214+ DIALOG --msgbox " ${BOLD} Required filesystems were not configured, \
1215+ please do so before starting the installation.${RESET} " ${MSGBOXSIZE}
1216+ return 1
1217+ fi
1218+
12141219 DIALOG --yesno " ${BOLD} The following operations will be executed:${RESET} \n\n
12151220${BOLD}${TARGETFS}${RESET} \n
12161221${BOLD}${RED} WARNING: data on partitions will be COMPLETELY DESTROYED for new \
0 commit comments