mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[syslinux] disable MBR install for images using SysLinux 4.x with a >4 GB file
* The presence of a > 4 GB file forces the use of NTFS which is incompatible with SysLinux 4.x or earlier. As such, if an image uses SysLinux only, there's no point in enabling MBR as SysLinux won't boot. * Required for ISOs such as securityonion-2.0.1-rc1.iso.
This commit is contained in:
parent
a8f3c6c572
commit
1bb2b3b126
2 changed files with 16 additions and 10 deletions
16
src/rufus.c
16
src/rufus.c
|
@ -279,6 +279,12 @@ static void SetPartitionSchemeAndTargetSystem(BOOL only_target)
|
||||||
allowed_target_system[1] = TRUE;
|
allowed_target_system[1] = TRUE;
|
||||||
allowed_target_system[2] = TRUE;
|
allowed_target_system[2] = TRUE;
|
||||||
}
|
}
|
||||||
|
// Syslinux 4.x or earlier has no support for NTFS so if an image is using Syslinux 4.x only
|
||||||
|
// and has a 4 GB file (which forces us to use NTFS) then disable MBR altogether as we won't
|
||||||
|
// be able to make a working MBR install of Syslinux.
|
||||||
|
if (HAS_SYSLINUX(img_report) && (SL_MAJOR(img_report.sl_version) < 5) && img_report.has_4GB_file &&
|
||||||
|
!HAS_BOOTMGR(img_report) && !HAS_WINPE(img_report) && !HAS_GRUB(img_report))
|
||||||
|
allowed_partition_scheme[PARTITION_STYLE_MBR] = FALSE;
|
||||||
} else {
|
} else {
|
||||||
allowed_target_system[0] = FALSE;
|
allowed_target_system[0] = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1373,12 +1379,12 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
|
||||||
} else if (target_type == TT_UEFI) {
|
} else if (target_type == TT_UEFI) {
|
||||||
if (!IS_EFI_BOOTABLE(img_report)) {
|
if (!IS_EFI_BOOTABLE(img_report)) {
|
||||||
// Unsupported ISO
|
// Unsupported ISO
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_091), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
|
MessageBoxExU(hMainDialog, lmprintf(MSG_091), lmprintf(MSG_090), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (HAS_WIN7_EFI(img_report) && (!WimExtractCheck(FALSE))) {
|
if (HAS_WIN7_EFI(img_report) && (!WimExtractCheck(FALSE))) {
|
||||||
// Your platform cannot extract files from WIM archives => download 7-zip?
|
// Your platform cannot extract files from WIM archives => download 7-zip?
|
||||||
if (MessageBoxExU(hMainDialog, lmprintf(MSG_102), lmprintf(MSG_101), MB_YESNO|MB_ICONERROR|MB_IS_RTL, selected_langid) == IDYES)
|
if (MessageBoxExU(hMainDialog, lmprintf(MSG_102), lmprintf(MSG_101), MB_YESNO | MB_ICONERROR | MB_IS_RTL, selected_langid) == IDYES)
|
||||||
ShellExecuteA(hMainDialog, "open", SEVENZIP_URL, NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteA(hMainDialog, "open", SEVENZIP_URL, NULL, NULL, SW_SHOWNORMAL);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -1388,16 +1394,16 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
|
||||||
(!HAS_REACTOS(img_report)) && !HAS_KOLIBRIOS(img_report) && (!HAS_GRUB(img_report)))
|
(!HAS_REACTOS(img_report)) && !HAS_KOLIBRIOS(img_report) && (!HAS_GRUB(img_report)))
|
||||||
|| ((IS_FAT(fs_type)) && (HAS_WINDOWS(img_report) || HAS_WININST(img_report)) && (!allow_dual_uefi_bios)) ) {
|
|| ((IS_FAT(fs_type)) && (HAS_WINDOWS(img_report) || HAS_WININST(img_report)) && (!allow_dual_uefi_bios)) ) {
|
||||||
// Incompatible FS and ISO
|
// Incompatible FS and ISO
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_096), lmprintf(MSG_092), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
|
MessageBoxExU(hMainDialog, lmprintf(MSG_096), lmprintf(MSG_092), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
||||||
goto out;
|
goto out;
|
||||||
} else if ((fs_type == FS_FAT16) && HAS_KOLIBRIOS(img_report)) {
|
} else if ((fs_type == FS_FAT16) && HAS_KOLIBRIOS(img_report)) {
|
||||||
// KolibriOS doesn't support FAT16
|
// KolibriOS doesn't support FAT16
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_189), lmprintf(MSG_099), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
|
MessageBoxExU(hMainDialog, lmprintf(MSG_189), lmprintf(MSG_099), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if ((IS_FAT(fs_type)) && (img_report.has_4GB_file)) {
|
if ((IS_FAT(fs_type)) && (img_report.has_4GB_file)) {
|
||||||
// This ISO image contains a file larger than 4GB file (FAT32)
|
// This ISO image contains a file larger than 4GB file (FAT32)
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
|
MessageBoxExU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 3.12.1702"
|
CAPTION "Rufus 3.12.1703"
|
||||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||||
|
@ -395,8 +395,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,12,1702,0
|
FILEVERSION 3,12,1703,0
|
||||||
PRODUCTVERSION 3,12,1702,0
|
PRODUCTVERSION 3,12,1703,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -414,13 +414,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://rufus.ie"
|
VALUE "Comments", "https://rufus.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.12.1702"
|
VALUE "FileVersion", "3.12.1703"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.12.exe"
|
VALUE "OriginalFilename", "rufus-3.12.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.12.1702"
|
VALUE "ProductVersion", "3.12.1703"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue