From c09ede16b3cbe71d536fb33d412afb535f0fb4fc Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 1 Oct 2021 16:46:35 +0200 Subject: [PATCH] [iso] add kernel options update for Red Hat derivatives * Since version 8.2, and rhinstaller/anaconda@a7661019546ec1d8b0935f9cb0f151015f2e1d95, Red Hat derivatives have changed their CD-ROM detection policy which leads to the installation source not being found when writing the media in ISO mode. * Replace 'inst.stage2' by 'inst.repo' in the kernel options. * Closes #1777 (See also rhinstaller/anaconda#rhinstaller/anaconda#3529). * Note that this reverts part of 9c8fa409959a4713f1a9c85043962e6cb4cc465b. --- res/appstore/Package.appxmanifest | 2 +- src/iso.c | 9 +++++++++ src/rufus.c | 20 +------------------- src/rufus.rc | 10 +++++----- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/res/appstore/Package.appxmanifest b/res/appstore/Package.appxmanifest index a0938244..316367a7 100644 --- a/res/appstore/Package.appxmanifest +++ b/res/appstore/Package.appxmanifest @@ -11,7 +11,7 @@ + Version="3.16.1828.0" /> Rufus diff --git a/src/iso.c b/src/iso.c index 35e3d494..20886bda 100644 --- a/src/iso.c +++ b/src/iso.c @@ -372,6 +372,15 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); modified = TRUE; } + // + // Since version 8.2, and https://github.com/rhinstaller/anaconda/commit/a7661019546ec1d8b0935f9cb0f151015f2e1d95, + // Red Hat derivatives have changed their CD-ROM detection policy which leads to the installation source not + // being found. So we need to use 'inst.repo' instead of 'inst.stage2' in the kernel options. + // + if (replace_in_token_data(src, props->is_grub_cfg ? "linuxefi" : "append", "inst.stage2", "inst.repo", TRUE) != NULL) { + uprintf(" Patched %s: '%s' ➔ '%s'\n", src, "inst.stage2", "inst.repo"); + modified = TRUE; + } } safe_free(iso_label); safe_free(usb_label); diff --git a/src/rufus.c b/src/rufus.c index f4b7d468..4c884e94 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -1204,18 +1204,7 @@ out: // The scanning process can be blocking for message processing => use a thread DWORD WINAPI ImageScanThread(LPVOID param) { - // Regexp patterns used to match ISO labels for distros whose - // maintainers have drunk the "ISOHybrid = DD only" kool aid... - const char* dd_koolaid_drinkers[] = { - "^CentOS-8-[3-9].*", // CentOS 8.3 or later - "^CentOS-9-.*", // CentOS 9.x - "^OL-.*-BaseOS-.*", // Oracle Linux - "^RHEL-8.[2-9].*", // Red Hat 8.2 or later - "^RHEL-9.*", // Red Hat 9.x - // Don't bother with Fedora for now, even as they use - // the same problematic Anaconda... - }; - int i, len; + int i; uint8_t arch; char tmp_path[MAX_PATH]; @@ -1276,13 +1265,6 @@ DWORD WINAPI ImageScanThread(LPVOID param) if (img_report.is_iso) { DisplayISOProps(); - for (i = 0; i < ARRAYSIZE(dd_koolaid_drinkers); i++) { - if (re_match(dd_koolaid_drinkers[i], img_report.label, &len) >= 0) { - img_report.disable_iso = TRUE; - break; - } - } - // If we have an ISOHybrid, but without an ISO method we support, disable ISO support altogether if (IS_DD_BOOTABLE(img_report) && (img_report.disable_iso || (!IS_BIOS_BOOTABLE(img_report) && !IS_EFI_BOOTABLE(img_report)))) { diff --git a/src/rufus.rc b/src/rufus.rc index 6472f173..2c4000c2 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.16.1827" +CAPTION "Rufus 3.16.1828" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,16,1827,0 - PRODUCTVERSION 3,16,1827,0 + FILEVERSION 3,16,1828,0 + PRODUCTVERSION 3,16,1828,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.16.1827" + VALUE "FileVersion", "3.16.1828" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.16.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.16.1827" + VALUE "ProductVersion", "3.16.1828" END END BLOCK "VarFileInfo"